v77

OpenAPI 3.1.0MITraw.githubusercontent.com2026-08-012528701.8 MB
Phone Numbers

Search phone numbers

Searches for available phone numbers to purchase.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Numbers.

Learn more about API scopes.

get/api/relay/rest/phone_numbers/search

Query parameters

areacodestring

An areacode to search within.

number_typestring

Search for either local or toll-free numbers. Defaults to local.

starts_withstring

A string of 3 to 7 digits that should be used as the start of a number. Cannot be used in combination with contains or ends_with.

containsstring

A string of 3 to 7 digits that should appear somewhere in the number. Cannot be used in combination with starts_with or ends_with.

ends_withstring

A string of 3 to 7 digits that should be used as the end of a number. Cannot be used in combination with starts_with or contains.

max_resultsinteger

The maximum number of matches to return. Upper limit of 100. Defaults to 50.

regionstring

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.

citystring

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

The request has succeeded.

Example response

{
  "data": [
    {
      "number": "+15551234567",
      "region": "CA",
      "city": "Los Angeles"
    }
  ]
}