Lookup phone number data

gethttps://api.telnyx.com/v2/number_lookup/{phone_number}

Returns information about the provided phone number.

curl -X GET \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --header "Authorization: Bearer YOUR_API_KEY" \ --globoff "https://api.telnyx.com/v2/number_lookup/+18665552368?type=carrier&type=caller-name"

Parameters

In Path
phone_number
string
required
The phone number to be looked up
Example: "+18665552368"
In Query
type
string
optional
Specifies the type of number lookup to be performed
Options: [ "carrier", "caller-name" ]

Responses

200
Successful response
422
Unprocessable entity. Check the 'detail' field in response for details.
default
Unexpected error

Success Response

{
  "data": {
    "caller_name": {
      "caller_name": "TELNYX LLC",
      "error_code": "10001"
    },
    "carrier": {
      "error_code": "string",
      "mobile_country_code": "US",
      "mobile_network_code": 866,
      "name": "Telnyx/4",
      "type": "voip"
    },
    "country_code": "US",
    "fraud": "string",
    "national_format": "(0312) 945-7420",
    "phone_number": "+13129457420",
    "portability": {
      "altspid": "073H",
      "altspid_carrier_name": "Telnyx/4",
      "altspid_carrier_type": "3",
      "city": "WAUKEGAN",
      "line_type": "voip",
      "lrn": "2245701999",
      "ocn": "073H",
      "ported_date": "2017-10-20",
      "ported_status": "Y",
      "spid": "073H",
      "spid_carrier_name": "Telnyx/4",
      "spid_carrier_type": "3",
      "state": "Illinois"
    },
    "record_type": "number_lookup"
  }
}
Was this page helpful?