Skip to contentSkip to navigationSkip to topbar
On this page

Line Type Intelligence


Lookup's Line Type Intelligence package allows you to get the line type of a phone number including mobile, landline, fixed VoIP, non-fixed VoIP, toll-free, and more.

To make a Line Type Intelligence request, add line_type_intelligence to the optional query parameter Fields when making a standard Lookup request.

1
curl -X GET "https://lookups.twilio.com/v2/PhoneNumbers/{PhoneNumber}?Fields=line_type_intelligence" \ -u
2
$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Coverage and Limitations: Worldwide support. Canada requires special approval, please read this support article(link takes you to an external page) to learn more. Querying a Canada phone number without access will return a 60601 error.

Release Stage and Access: Public Beta, available via self-service.


Response properties

response-properties page anchor

The following additional properties are returned for a Line Type Intelligence request.

NameDescription
MobileCountryCodeThe three digit mobile country code of the carrier, used with the mobile network code to identify a mobile network operator.
MobileNetworkCodeThe two-three digit mobile network code of the carrier, used with the mobile country code to identify a mobile network operator (only returned for mobile numbers).
CarrierNameThe name of the carrier; subject to change.
TypeThe phone number type. See Type property values for more information.
ErrorCodeThe error code, if any, associated with your request.

Type property values

type-property-values page anchor
(warning)

Warning

Carrier data is not available for phone number types: personal, tollFree, premium, sharedCost, uan, voicemail, pager, or unknown. In these cases MobileCountryCode, MobileNetworkCode, and CarrierName values will be null.

The following are the possible values for the Type property.

TypeDescription
landlineThe phone number is a landline number; generally not capable of receiving SMS messages.
mobileThe phone number is a mobile number; generally capable of receiving SMS messages.
fixedVoipA virtual phone number associated with a physical device (e.g., Comcast or Vonage).
nonFixedVoipA virtual phone number that can be obtained on the internet without the need for a physical device (e.g., Google Voice or Enflick).
personalA phone number designated for personal use.
tollFreeA toll-free phone number, which is one where calls are free for the calling party.
premiumA premium rate phone number, which typically charges higher than normal rates for special services.
sharedCostA shared cost phone number, which is one where the charge is partially paid by the calling party and charges higher than normal rates.
uanA universal access number, which is a national number which can route incoming calls to different destinations.
voicemailA phone number associated with a voicemail service.
pagerA phone number associated with a pager device.
unknownA valid phone number, but the line type could not be determined.
Line Type Intelligence LookupLink to code sample: Line Type Intelligence Lookup
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchPhoneNumber() {
11
const phoneNumber = await client.lookups.v2
12
.phoneNumbers("+14159929960")
13
.fetch({ fields: "line_type_intelligence" });
14
15
console.log(phoneNumber.lineTypeIntelligence);
16
}
17
18
fetchPhoneNumber();

Output

1
{
2
"calling_country_code": "1",
3
"country_code": "US",
4
"phone_number": "+14159929960",
5
"national_format": "(415) 992-9960",
6
"valid": true,
7
"validation_errors": null,
8
"caller_name": null,
9
"sim_swap": null,
10
"call_forwarding": null,
11
"line_status": null,
12
"line_type_intelligence": {
13
"error_code": null,
14
"mobile_country_code": "240",
15
"mobile_network_code": "38",
16
"carrier_name": "Twilio - SMS/MMS-SVR",
17
"type": "nonFixedVoip"
18
},
19
"identity_match": null,
20
"reassigned_number": null,
21
"sms_pumping_risk": null,
22
"phone_number_quality_score": null,
23
"pre_fill": null,
24
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960"
25
}

The video below shows how to check a phone number's line type with Lookup using Node.js and the Twilio Node Helper Library.

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.