Skip to main content
GET
/
number_lookup
/
{phone_number}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const numberLookup = await client.numberLookup.retrieve('+18665552368');

console.log(numberLookup.data);
{
  "data": {
    "record_type": "number_lookup",
    "country_code": "US",
    "national_format": "(0312) 945-7420",
    "phone_number": "+13129457420",
    "fraud": null,
    "carrier": {
      "mobile_country_code": "US",
      "mobile_network_code": "0866",
      "name": "Telnyx/4",
      "type": "voip",
      "error_code": null,
      "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"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

phone_number
string
required

The phone number to be looked up

Example:

"+18665552368"

Query Parameters

type
enum<string>

Specifies the type of number lookup to be performed

Available options:
carrier,
caller-name

Response

Successful response

data
NumberLookup · object