> ## Documentation Index
> Fetch the complete documentation index at: https://docs.askui.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Extracting Numbers

> Get numeric values like counts, prices, and metrics from UI

Extract numeric values from your UI using integer and float response schemas. This is essential for reading counts, prices, percentages, and other numeric data.

## Basic Usage

```python theme={null}
from askui import VisionAgent

with VisionAgent() as agent:
    agent.tools.webbrowser.open_new("http://www.example.com")
    agent.wait(3)

    result = agent.get("How many headings do you see?", response_schema=int)
    print(f"result: {result}")
```

## Best Practices

1. **Specify Units When Relevant**: Be clear about what units you expect
   ```python theme={null}
   # Good - clear about units
   price_dollars = agent.get("What is the price in dollars?", response_schema=float)
   weight_kg = agent.get("What is the weight in kilograms?", response_schema=float)

   # Less clear
   price = agent.get("What is the price?", response_schema=float)
   ```

2. **Validate Numeric Ranges**: Check if values are within expected ranges
   ```python theme={null}
   percentage = agent.get("What is the progress percentage?", response_schema=float)

   # Validate percentage is between 0 and 100
   assert 0 <= percentage <= 100, f"Invalid percentage: {percentage}"
   ```
