Check out our upcoming events and meetups! View events →
Returns information about the provided phone number.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
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"
}
}
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The phone number to be looked up
"+18665552368"
Specifies the type of number lookup to be performed
carrier, caller-name Successful response
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
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"
}
}
}