Number Lookup

Lookup phone number data

Changed on

Returns information about the provided phone number.

get/number_lookup/{phone_number}

Request

  • Base URL
    https://api.telnyx.com/v2
  • URL
    https://api.telnyx.com/v2/number_lookup/{phone_number}
  • Auth
    HTTP bearer

Path parameters

phone_numberstring required
Example:+18665552368

The phone number to be looked up

Query parameters

type'carrier' | 'caller-name' | 'caller-identity' | 'enhanced-caller-name'

Specifies the type of number lookup to be performed. May be supplied more than once to request several data sources in a single call (for example, ?type=carrier&type=enhanced-caller-name). Each requested type populates the corresponding object in the response.

Response

Successful response

Example response

{
  "data": {
    "record_type": "number_lookup",
    "country_code": "US",
    "national_format": "(0312) 945-7420",
    "phone_number": "+13129457420",
    "carrier": {
      "mobile_country_code": "US",
      "mobile_network_code": "0866",
      "name": "Telnyx/4",
      "type": "voip",
      "normalized_carrier": "AT&T"
    },
    "caller_name": {
      "caller_name": "TELNYX LLC",
      "error_code": "10001"
    },
    "portability": {
      "lrn": "2245701999",
      "ported_status": "Y",
      "ported_date": "2017-10-20",
      "ocn": "073H",
      "line_type": "voip",
      "spid": "073H",
      "spid_carrier_name": "Telnyx/4",
      "spid_carrier_type": "3",
      "altspid": "073H",
      "altspid_carrier_name": "Telnyx/4",
      "altspid_carrier_type": "3",
      "city": "WAUKEGAN",
      "state": "Illinois"
    },
    "valid_number": true,
    "enhanced_caller_name": {
      "caller_name": "Jane Doe"
    },
    "caller_identity": {
      "name": "Jane Doe",
      "address": {
        "street_line_1": "123 Main St",
        "city": "Anytown",
        "state_code": "CA",
        "postal_code": "90210",
        "zip4": "1234",
        "country_code": "US"
      },
      "confidence_score": 80
    }
  }
}

Changes

    • warning

      added the new fixed line enum value to the // response property for the response status

    • warning

      added the new fixed line or mobile enum value to the // response property for the response status

    • warning

      added the new mobile enum value to the // response property for the response status

    • warning

      added the new pager enum value to the // response property for the response status

    • warning

      added the new personal number enum value to the // response property for the response status

    • warning

      added the new premium rate enum value to the // response property for the response status

    • warning

      added the new shared cost enum value to the // response property for the response status

    • warning

      added the new toll free enum value to the // response property for the response status

    • warning

      added the new uan enum value to the // response property for the response status

    • warning

      added the new unknown enum value to the // response property for the response status

    • warning

      added the new voicemail enum value to the // response property for the response status

    • warning

      added the new voip enum value to the // response property for the response status

    • info

      added the new enum value caller-identity to the query request parameter type

    • info

      added the new enum value enhanced-caller-name to the query request parameter type

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • breaking

      the // response's property type changed from integer to string, and format from int32 to no format for status

    • breaking

      the // response's property type changed from integer to string, and format from int32 to no format for status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status