# Search available numbers

Searches available numbers.

```http
GET https://api.pozy.ai/v1/phone-numbers/available
```

- Area: Phone & voice / Phone Numbers
- Auth: Authorization: Bearer pz_live_...

## Query parameters

- `country` (string)
- `numberType` (string): one of local, mobile, national, toll_free
- `areaCode` (string)
- `type` (string)
- `prefix` (string)
- `locality` (string)
- `contains` (string)
- `sms` (boolean)
- `limit` (integer)
- `masked` (boolean)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/phone-numbers/available?limit=20" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/phone-numbers/available?limit=20", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/phone-numbers/available",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    params={
        "limit": 20,
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `country`, string
- `numberType`, string
- `requireSms`, boolean
- `numbers`, array of object
  - `phoneNumber`, string
  - `features`, array of string
  - `locality`, string
  - `bestEffort`, boolean
  - `maskedNumber`, string
  - `numberType`, string
  - `claimId`, string
  - `claimUrl`, string
- `masked`, boolean
- `near`, string: Can be null
- `claimId`, string
- `claimUrl`, string

```json
{
  "country": "US",
  "numberType": "string",
  "requireSms": true,
  "numbers": [
    {
      "phoneNumber": "+14155550123",
      "features": [
        "string"
      ],
      "locality": "string",
      "bestEffort": true,
      "maskedNumber": "string",
      "numberType": "string",
      "claimId": "64d7462a13b28690b007b884",
      "claimUrl": "https://pozy.ai/media/example-1.jpg"
    }
  ],
  "masked": true,
  "near": "string",
  "claimId": "64d7462a13b28690b007b884",
  "claimUrl": "https://pozy.ai/media/example-1.jpg"
}
```
