Skip to main content

Search locations by prefix

GET 

/api/v2/numbers/countries/:country_id/locations

Search for locations (cities) that have DID numbers starting with a specific prefix.

Important notes:

  • Useful for finding locations with specific area codes
  • Prefix can be partial number (e.g., "212" for NYC area code)
  • Returns combined location information (country, state, city)

When to use:

  • Implementing "vanity number" search by prefix
  • Finding locations with specific area codes
  • Reverse lookup of number to location

locations[].city_id feeds numbers_countries_cities_dids_index and numbers_search_show (city_id). locations[].state_id feeds numbers_search_show (region_id).

Request​

Responses​

returns list of locations