phoneNumber

View as MarkdownOpen in Claude

Phone Number Lookup namespace.

Path parameters

e164_numberstringRequired
The phone number in E.164 format.

Query parameters

includestringOptional
Further number information to include in the response, some of which are billable. You can specify: carrier (Lookup full carrier information for the number), cnam (Lookup Caller ID information for the number). Separate multiple values with a comma: include=carrier,cnam.

Response

country_code_numberintegerOptional
The Country code associated with the number.
national_numberstringOptional
Number in the countries national format.
possible_numberbooleanOptional
Whether the number supplied is a possible number.
valid_numberbooleanOptional
Whether the number supplied is a valid number.
national_number_formattedstringOptional
The E164 number formatted in national format.
international_number_formattedstringOptional
The E164 number formatted in international format.
e164stringOptional
The number in E164 format.
locationstringOptional
The location of the number based on its area code and NPA.
country_codestringOptional
The ISO3166 alpha 2 country code associated with the number.
timezoneslist of stringsOptional
The time zones associated with the number.
number_typestringOptional
The type of number based on its area code and NPA.
carrierobjectOptional
Carrier information. Adding include=carrier to your request will do a live lookup to determine the current carrier information about this number.
cnamobjectOptional
Caller ID information. Adding include=cnam to your request will do a live lookup to determine the current caller ID information about this number.

Response Example

Response
1{
2 "country_code_number": 1,
3 "national_number": "5551234567",
4 "possible_number": true,
5 "valid_number": true,
6 "national_number_formatted": "(555) 123-4567",
7 "international_number_formatted": "+1 555-123-4567",
8 "e164": "+15551234567",
9 "location": "Texas",
10 "country_code": "US",
11 "timezones": [
12 "string"
13 ],
14 "number_type": "Fixed Line or Mobile",
15 "carrier": {
16 "lrn": "15551234567",
17 "spid": "683X",
18 "ocn": "12345",
19 "lata": "99999",
20 "city": "Aberdeen",
21 "state": "WA",
22 "jurisdiction": "indeterminate",
23 "lec": "Verizon",
24 "linetype": "landline"
25 },
26 "cnam": {
27 "caller_id": "John Smith"
28 }
29}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient();
4const result = await client.lookup.phoneNumber("+15551234567");
5console.log(result);