Search Phone Numbers
Returns a list of phone numbers that are available for purchase. You can search for toll-free, mobile, local, national, and fixed phone numbers. The API lets you filter phone numbers based on several criteria.
API Endpoint
Arguments
country_isoRequired string | The ISO 3166 alpha-2 country code of the country. To see what number types we support in each country, visit our voice and SMS coverage pages. |
type string | Filters by the type of the phone number. Allowed values are |
pattern string | A pattern to match the phone number with. Phone numbers starting with (numeric country code + For example, to search for phone numbers in the US starting with a 415 prefix, specify |
npanxx six-digit integer | Filters local US and CA numbers based on the provided six-digit prefix. The filter is applicable only if the country is US or CA. For example, to search for 1 (737) 977-nnnn, “npanxx” = 737 977. To be used in combination with the |
local_calling_area boolean | If set to The filter is only applicable if Defaults to |
Note: If | |
region string min. length is 2 | Filters by the exact name of a region: for instance, This filter is applicable only when the type is |
services string | Filters phone numbers that provide the selected services. Allowed values are:
|
city string | Filters based on the city name. This filter is applicable only when the type is |
lata | Filters by LATA. This filter is applicable only for US and Canada. |
rate_center | Filters by rate center. This filter is applicable only for US and Canada. |
limit default is 20 | A limit on the number of phone numbers to be returned. |
offset integer | Denotes the number of value items by which the results should be offset. Defaults to 0. Read more about offset-based pagination. |
compliance_requirementstring | References the Compliance requirements associated with the phone number. denotes that the phone number does not have any regulatory requirements. |
Returns
A dictionary with an objects property that contains a list of up to limit phone numbers. Each tuple in the list is a separate PhoneNumber object. An empty list is returned if there are no phone numbers matching the provided criteria.