search
Search for available phone numbers that can be purchased.
Query parameters
areacode
An areacode to search within.
number_type
Search for local or toll-free numbers: `local`, `tollfree`, or `toll-free`. Defaults to `local`. Any other value returns a `400` with no body.
starts_with
3 to 7 digits the number must start with, not counting the `+1` country code. When `areacode` is also set, the match starts right after the area code. To find a vanity number, search by its keypad digits, for example `3569377` for `FLOWERS`. Cannot be used in combination with `contains` or `ends_with`.
contains
3 to 7 digits that must appear somewhere in the number, after the area code when `areacode` is also set. On Spaces limited to 10 toll-free results, a toll-free `contains` search matches only the end of the number. To find a vanity number, search by its keypad digits. Cannot be used in combination with `starts_with` or `ends_with`.
ends_with
3 to 7 digits the number must end with. To find a vanity number, search by its keypad digits. Cannot be used in combination with `starts_with` or `contains`.
max_results
The maximum number of matches to return. Defaults to 50. Toll-free searches accept up to 100; some Spaces are limited to 10 toll-free results, with a default of 5. Local searches have no fixed upper limit, but a very large value can make the search return no numbers or fail with an error; narrow the search with `areacode`, `region`, `city`, or `starts_with` rather than raising `max_results` that far.
region
A region or state to search within. Must be an ISO 3166-2 alpha-2 code, i.e. TX for Texas. Only supported for local searches; not supported when `number_type` is toll-free.
city
A specific City to search within. Must be used in combination with region. Only supported for local searches; not supported when `number_type` is toll-free.
Response
links
Always an empty object. Search results aren't paginated, so there are no `next` or `prev` links.
filters
The search filters that were applied, keyed by query parameter name. Always includes `max_results`; other filters appear only when you set them.
ignored_parameters
The names of any query parameters in the request that this operation doesn't recognize and ignored.
data
List of available phone numbers.
Response Example
Response