Fetch phone number

GET /v1/PhoneNumbers/{PhoneNumber}

Detailed information on phone numbers

Path parameters

  • PhoneNumber string(phone-number) Required

    The phone number to lookup in E.164 format, which consists of a + followed by the country code and subscriber number.

Query parameters

  • The ISO country code of the phone number to fetch. This is used to specify the country when the phone number is provided in a national format.

  • Type array[string]

    The type of information to return. Can be: carrier or caller-name. The default is null. Carrier information costs $0.005 per phone number looked up. Caller Name information is currently available only in the US and costs $0.01 per phone number looked up. To retrieve both types on information, specify this parameter twice; once with carrier and once with caller-name as the value.

  • AddOns array[string]

    The unique_name of an Add-on you would like to invoke. Can be the unique_name of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about Add-ons, see the Add-ons documentation.

  • AddOnsData object(prefixed-collapsible-map-AddOns)

    Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on.

Responses

  • OK

    Hide response attributes Show response attributes object
    • A JSON string with the results of the Add-ons you specified

    • The name of the phone number's owner

    • The telecom company that provides the phone number

    • country_code string | null

      The ISO country code for the phone number

    • national_format string | null

      The phone number, in national format

    • phone_number string(phone-number) | null

      The phone number in E.164 format

    • url string(uri) | null

      The absolute URL of the resource

GET /v1/PhoneNumbers/{PhoneNumber}
curl \
 -X GET https://lookups.twilio.com/v1/PhoneNumbers/{PhoneNumber} \
 --user "username:password"
Response examples (200)
{
  "country_code": "string",
  "national_format": "string",
  "phone_number": "string",
  "url": "https://example.com"
}
Response examples (200)
{
  "country_code": "string",
  "national_format": "string",
  "phone_number": "string",
  "url": "https://example.com"
}