Search Phone Numbers

GET https://api.plivo.com/v1/Account/{{auth_id}}/PhoneNumber/?country_iso=US&type=local&limit=3

Returns a list of phone numbers that are available for purchase. You can search for tollfree, mobile, local, national and fixed phone numbers. The API allows you to filter phone numbers based on the country_iso, pattern, type and region.

Below is the list of arguments that can be passed in this API request, more information can be found here

ArgumentsDescriptionRequired/Conditional/Optional
country_isoThe ISO country code of the country. For more information on supported countries, refer to our incoming Voice and SMS coverage.Required
typeFilters by the type of the phone number. Possible values are tollfree, local, mobile, national and fixed.Optional
patternA pattern to match the phone number with. Phone numbers starting with (country calling code + pattern) are filtered in. The allowed values are A-Z, 0-9, *, and ?.For example, in order to search for phone numbers in the US starting with 415 prefix, Pattern = 415. Filtered results will be of form '1415XXXXXXX'.Optional
regionThis filter is only applicable when the type is fixed. If the type is not provided, it is assumed to be fixed. You could use the exact name of the region, for instance region=Frankfurt for a phone number in Frankfurt.Optional
servicesFilters phone numbers which provide the selected services . Possible values are:
voice: Indicates that phone numbers which can receive calls are to be returned.
sms: Indicates that phone numbers which can receive SMS are to be returned.
mms: Indicates that phone numbers that can receive MMS are to be returned.
voice,sms: Indicates that phone numbers which can receive both calls and SMS are to be returned.
voice,sms,mms: Indicates that phone numbers that can receive calls, SMS and MMS are to be returned.
Optional
cityFilter phone number based on the city name. This filter is only applicable when the type is Local.Optional
lataFilters phone numbers in a LATA. This filter is applicable only for US and Canada.Optional
rate_centerFilters phone numbers based on the rate center. This filter is applicable only for US and Canada.Optional
limitA limit on the number phone numbers to be returned. limit can range between 1 and 20, and the default is 20.Optional
offsetDenotes the number of value items by which the results should be offset. Defaults to 0. Read more about offset based pagination here.Optional

Request Params

KeyDatatypeRequiredDescription
country_isostringThe ISO country code of the country.
typestringFilters by the type of the phone number. Possible values are tollfree, local, mobile, national and fixed.
patternnumberA pattern to match the phone number with. Phone numbers starting with (country calling code + pattern) are filtered in.
regionstringYou could use the exact name of the region, for instance region=Frankfurt for a phone number in Frankfurt.
servicesstringFilters phone numbers which provide the selected services such as voice, sms & mms
citystringFilter phone number based on the city name. This filter is only applicable when the type is Local.
latanumberFilters phone numbers in a LATA. This filter is applicable only for US and Canada
rate_centernumberFilters phone numbers based on the rate center. This filter is applicable only for US and Canada.
limitnumberA limit on the number phone numbers to be returned. limit can range between 1 and 20, and the default is 20.
offsetnumberDenotes the number of value items by which the results should be offset. Defaults to 0

RESPONSES

status: OK

{"api_id":"1a75dad2-5ef4-11eb-91fe-0242ac110003","meta":{"limit":3,"next":"/v1/Account/MAMDC1NTE3ZGQ4NWNJNM/PhoneNumber/?limit=3\u0026offset=3\u0026type=local\u0026country_iso=US","offset":0,"previous":null,"total_count":14227},"objects":[{"city":"Saddleback Valley","compliance_requirement":{"business":null,"individual":null},"country":"UNITED STATES","lata":730,"mms_enabled":true,"mms_rate":"0.00400","monthly_rental_rate":"0.18000","number":"19496031645","prefix":"949","prerequisites":[],"rate_center":"Saddleback Valley","region":"California","resource_uri":"/v1/Account/MAMDC1NTE3ZGQ4NWNJNM/PhoneNumber/19496031645/","restriction":"","restriction_text":"","setup_rate":"0.00000","sms_enabled":true,"sms_rate":"0.00000","sub_type":"local","type":"fixed","voice_enabled":true,"voice_rate":"0.00300"},{"city":"Elwin","compliance_requirement":{"business":null,"individual":null},"country":"UNITED STATES","lata":374,"mms_enabled":true,"mms_rate":"0.00400","monthly_rental_rate":"0.18000","number":"12177674383","prefix":"217","prerequisites":[],"rate_center":"Elwin","region":"Illinois","resource_uri":"/v1/Account/MAMDC1NTE3ZGQ4NWNJNM/PhoneNumber/12177674383/","restriction":"","restriction_text":"","setup_rate":"0.00000","sms_enabled":true,"sms_rate":"0.00000","sub_type":"local","type":"fixed","voice_enabled":true,"voice_rate":"0.00300"},{"city":"Westwood","compliance_requirement":{"business":null,"individual":null},"country":"UNITED STATES","lata":224,"mms_enabled":true,"mms_rate":"0.00400","monthly_rental_rate":"0.18000","number":"15513105271","prefix":"551","prerequisites":[],"rate_center":"Westwood","region":"New Jersey","resource_uri":"/v1/Account/MAMDC1NTE3ZGQ4NWNJNM/PhoneNumber/15513105271/","restriction":"","restriction_text":"","setup_rate":"0.00000","sms_enabled":true,"sms_rate":"0.00000","sub_type":"local","type":"fixed","voice_enabled":true,"voice_rate":"0.00300"}]}