Logo

Twilio

Authentication Type: API Key
Description: Get phone number line type intelligence data using Twilio Lookup V2 API.


Phone Number Lookup

Lookup phone number line type intelligence information.

Get Line Type Intelligence

Retrieve line type intelligence data for a phone number including carrier, line type, and validation status.

Operation Type: Query (Read)

Parameters:

  • phoneNumber string (required): Phone number in E.164 format (e.g., +14159929960)

Returns:

  • value string (nullable): Phone number in E.164 format
  • country string (nullable): Country code (ISO-2)
  • isValid boolean (nullable): Whether the phone number is valid
  • lineType string (nullable): Type of phone line (e.g., mobile, landline, voip)
  • carrier string (nullable): Carrier name
  • callingCountryCode string (nullable): Calling country code
  • nationalFormat string (nullable): National format of the phone number
  • validationErrors array of strings (nullable): Validation errors if any
  • mobileCountryCode string (nullable): Mobile country code
  • mobileNetworkCode string (nullable): Mobile network code
  • errorCode string (nullable): Error code from line type intelligence

Example Usage:

{
  "phoneNumber": "+14159929960"
}

Common Use Cases

Phone Number Validation:

  • Verify phone numbers before sending SMS or making calls
  • Identify line types for appropriate communication channels
  • Validate customer contact information during registration

Fraud Prevention:

  • Check for VOIP numbers that might indicate fraudulent activity
  • Validate carrier information for risk assessment
  • Identify suspicious phone number patterns

Communication Optimization:

  • Choose optimal communication methods based on line type
  • Route calls appropriately based on carrier information
  • Improve deliverability by understanding number characteristics