Skip to main content
Twilio Lookup API

Build secure experiences using data with Lookup API

Lookup API transforms your phone intelligence data into trusted interactions. Build onboarding and engagement experiences that improve delivery and mitigate risk seamlessly without user input.

Illustration of authenticating consumer and secure experiences using Lookup API.

Boku Mobile Identity is now part of Twilio

Twilio has acquired Boku Mobile Identity to forge one seamless customer identity and onboarding solution.
With Boku verification, every Twilio engagement enjoys unmatched security and performance.

Illustration of authenticating consumer and secure experiences using Lookup API.

Verify, secure, and optimize engagement
with one integrated API

Lookup API adds a seamless layer of security to customer relationships using real-time phone data. Improve conversion and delivery rates, spot risk, and halt fraud. Then integrate with Twilio Verify, Programmable Messaging, and more to enhance your engagement solution with best-in-class security.

Benefits

Improve security, conversions,
and delivery at once

Diagram of real-time phone integration using secure code to deliver smooth messaging experience.

Reduce risk and fraud

Protect against fraud with authoritative phone intelligence data. Lookup API uses real-time risk signals to detect fraud and trigger step-up authentication when needed. Determine if a number is valid by identifying the line type as mobile, landline, VoIP, temporary number, and more. Stop fraudulent SIM swaps and fake accounts for secure relationships at scale.

  • Integrate with Twilio Verify, Programmable Messaging, and more to secure uses cases for onboarding, engagement, and support.
  • Spot risk signals in real-time by requesting data packages from multiple sources for accuracy and fill rates without slowdown.
  • Secure accounts with high throughput for zero throttling, plus latency checks scaled to your contact list and message volume.
  • Node.js
  • C#
  • PHP
  • Ruby
  • Python
  • Java
  • curl
  • twilio-cli
//Downloadthehelperlibraryfromhttps://www.twilio.com/docs/node/install//FindyourAccountSIDandAuthTokenattwilio.com/console//andsettheenvironmentvariables.Seehttp://twil.io/secureconstaccountSid=process.env.TWILIO_ACCOUNT_SID;constauthToken=process.env.TWILIO_AUTH_TOKEN;constclient=require('twilio')(accountSid,authToken);client.lookups.v2.phoneNumbers('+447772000001').fetch({fields:'sim_swap'}).then(phone_number=>console.log(phone_number.callerName));
// Install the C# / .NET helper library from twilio.com/docs/csharp/installusingSystem;usingTwilio;usingTwilio.Rest.Lookups.V2;classProgram{staticvoidMain(string[]args){// Find your Account SID and Auth Token at twilio.com/console// and set the environment variables. See http://twil.io/securestringaccountSid=Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");stringauthToken=Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");TwilioClient.Init(accountSid,authToken);varphoneNumber=PhoneNumberResource.Fetch(fields:"sim_swap",pathPhoneNumber:"+447772000001");Console.WriteLine(phoneNumber.CallerName);}}
<?php// Update the path below to your autoload.php,// see https://getcomposer.org/doc/01-basic-usage.mdrequire_once'/path/to/vendor/autoload.php';useTwilio\Rest\Client;// Find your Account SID and Auth Token at twilio.com/console// and set the environment variables. See http://twil.io/secure$sid=getenv("TWILIO_ACCOUNT_SID");$token=getenv("TWILIO_AUTH_TOKEN");$twilio=newClient($sid,$token);$phone_number=$twilio->lookups->v2->phoneNumbers("+447772000001")->fetch(["fields"=>"sim_swap"]);print($phone_number->callerName);
# Download the helper library from https://www.twilio.com/docs/ruby/installrequire'rubygems'require'twilio-ruby'# Find your Account SID and Auth Token at twilio.com/console# and set the environment variables. See http://twil.io/secureaccount_sid=ENV['TWILIO_ACCOUNT_SID']auth_token=ENV['TWILIO_AUTH_TOKEN']@client=Twilio::REST::Client.new(account_sid,auth_token)phone_number=@client.lookups.v2.phone_numbers('+447772000001').fetch(fields:'sim_swap')putsphone_number.caller_name
# Download the helper library from https://www.twilio.com/docs/python/installimportosfromtwilio.restimportClient# Find your Account SID and Auth Token at twilio.com/console# and set the environment variables. See http://twil.io/secureaccount_sid=os.environ['TWILIO_ACCOUNT_SID']auth_token=os.environ['TWILIO_AUTH_TOKEN']client=Client(account_sid,auth_token)phone_number=client.lookups \ .v2 \ .phone_numbers('+447772000001') \ .fetch(fields='sim_swap')print(phone_number.caller_name)
// Install the Java helper library from twilio.com/docs/java/installimportcom.twilio.Twilio;importcom.twilio.rest.lookups.v2.PhoneNumber;publicclassExample{// Find your Account SID and Auth Token at twilio.com/console// and set the environment variables. See http://twil.io/securepublicstaticfinalStringACCOUNT_SID=System.getenv("TWILIO_ACCOUNT_SID");publicstaticfinalStringAUTH_TOKEN=System.getenv("TWILIO_AUTH_TOKEN");publicstaticvoidmain(String[]args){Twilio.init(ACCOUNT_SID,AUTH_TOKEN);PhoneNumberphoneNumber=PhoneNumber.fetcher("+447772000001").setFields("sim_swap").fetch();System.out.println(phoneNumber.getCallerName());}}
curl -X GET 'https://lookups.twilio.com/v2/PhoneNumbers/+447772000001?Fields=sim_swap'\-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
# Install the twilio-cli from https://twil.io/cli twilio api:lookups:v2:phone-numbers:fetch \ --phone-number +447772000001 \ --fields sim_swap

Increase conversions

Streamline and personalize onboarding to boost conversion rates. Enable passive authentication that doesn’t rely on user input with Twilio’s Line Type Intelligence. This frictionless feature reduces churn, lifts conversions, and integrates easily with Twilio onboarding and engagement solutions.

  • Request data signals in real-time from multiple sources for superior accuracy and fill rates without slowdown.
  • Reach more customers with global coverage via Twilio’s carrier partnerships and one of the largest SIM swap data networks.
  • Gain insights from data signals that enhance marketing, improve key metrics, and help you make business decisions confidently.
  • Node.js
  • C#
  • PHP
  • Ruby
  • Python
  • Java
  • curl
  • twilio-cli
//Downloadthehelperlibraryfromhttps://www.twilio.com/docs/node/install//FindyourAccountSIDandAuthTokenattwilio.com/console//andsettheenvironmentvariables.Seehttp://twil.io/secureconstaccountSid=process.env.TWILIO_ACCOUNT_SID;constauthToken=process.env.TWILIO_AUTH_TOKEN;constclient=require('twilio')(accountSid,authToken);client.lookups.v2.phoneNumbers('+14159929960').fetch({fields:'line_type_intelligence'}).then(phone_number=>console.log(phone_number.callerName));
// Install the C# / .NET helper library from twilio.com/docs/csharp/installusingSystem;usingTwilio;usingTwilio.Rest.Lookups.V2;classProgram{staticvoidMain(string[]args){// Find your Account SID and Auth Token at twilio.com/console// and set the environment variables. See http://twil.io/securestringaccountSid=Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");stringauthToken=Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");TwilioClient.Init(accountSid,authToken);varphoneNumber=PhoneNumberResource.Fetch(fields:"line_type_intelligence",pathPhoneNumber:"+14159929960");Console.WriteLine(phoneNumber.CallerName);}}
<?php// Update the path below to your autoload.php,// see https://getcomposer.org/doc/01-basic-usage.mdrequire_once'/path/to/vendor/autoload.php';useTwilio\Rest\Client;// Find your Account SID and Auth Token at twilio.com/console// and set the environment variables. See http://twil.io/secure$sid=getenv("TWILIO_ACCOUNT_SID");$token=getenv("TWILIO_AUTH_TOKEN");$twilio=newClient($sid,$token);$phone_number=$twilio->lookups->v2->phoneNumbers("+14159929960")->fetch(["fields"=>"line_type_intelligence"]);print($phone_number->callerName);
# Download the helper library from https://www.twilio.com/docs/ruby/installrequire'rubygems'require'twilio-ruby'# Find your Account SID and Auth Token at twilio.com/console# and set the environment variables. See http://twil.io/secureaccount_sid=ENV['TWILIO_ACCOUNT_SID']auth_token=ENV['TWILIO_AUTH_TOKEN']@client=Twilio::REST::Client.new(account_sid,auth_token)phone_number=@client.lookups.v2.phone_numbers('+14159929960').fetch(fields:'line_type_intelligence')putsphone_number.caller_name
# Download the helper library from https://www.twilio.com/docs/python/installimportosfromtwilio.restimportClient# Find your Account SID and Auth Token at twilio.com/console# and set the environment variables. See http://twil.io/secureaccount_sid=os.environ['TWILIO_ACCOUNT_SID']auth_token=os.environ['TWILIO_AUTH_TOKEN']client=Client(account_sid,auth_token)phone_number=client.lookups \ .v2 \ .phone_numbers('+14159929960') \ .fetch(fields='line_type_intelligence')print(phone_number.caller_name)
// Install the Java helper library from twilio.com/docs/java/installimportcom.twilio.Twilio;importcom.twilio.rest.lookups.v2.PhoneNumber;publicclassExample{// Find your Account SID and Auth Token at twilio.com/console// and set the environment variables. See http://twil.io/securepublicstaticfinalStringACCOUNT_SID=System.getenv("TWILIO_ACCOUNT_SID");publicstaticfinalStringAUTH_TOKEN=System.getenv("TWILIO_AUTH_TOKEN");publicstaticvoidmain(String[]args){Twilio.init(ACCOUNT_SID,AUTH_TOKEN);PhoneNumberphoneNumber=PhoneNumber.fetcher("+14159929960").setFields("line_type_intelligence").fetch();System.out.println(phoneNumber.getCallerName());}}
curl -X GET 'https://lookups.twilio.com/v2/PhoneNumbers/+14159929960?Fields=line_type_intelligence'\-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
# Install the twilio-cli from https://twil.io/cli twilio api:lookups:v2:phone-numbers:fetch \ --phone-number +14159929960 \ --fields line_type_intelligence

Improve message deliverability

Increase delivery rates and cut costs with Twilio’s real-time phone number validation. Confirm if a number is legitimate before you send, distinguish mobile numbers from temporary VoIP numbers and landlines, plus verify the correct number format to reduce delivery errors.

  • Integrate with Twilio Verify and Programmable Messaging for secure engagement with marketing and contact centers.
  • Ensure compliance with global messaging regulations like SOC2 Type 2 for optimal delivery, plus added data residency controls.
  • Secure accounts with high throughput for zero throttling, plus latency checks scaled to your contact list and message volume.

Use cases

Put up-to-date phone
intelligence to work at scale

Lookup API distinguishing a mobile number from a landline to optimize SMS deliverability.

Improve message deliverability

Delivery errors frustrate users who expect real-time communications. Improve contact rates by validating a number before you send. Distinguish mobile numbers from landlines, format numbers correctly, and optimize SMS routing with carrier data for optimal delivery.

Lookup API identifying inbound callers associated with phone numbers.

Personalize messaging and voice calls

Personalization is key to a quality customer experience. Identify inbound callers globally by determining the name associated with phone number to personalize engagement over SMS and voice calls, and enhance your marketing at any scale.

Lookup API accessing real-time user signals such as phone line type to stop fraud.

Enrich data and risk models

Businesses use customer data to enrich user profiles and understand risk. Access real-time user signals like phone line type, SIM tenure, connectivity status, carrier, and more to improve risk models, scrub contact lists, and make more accurate business decisions.

Lookup API showing phone data signals to reveal fraudulant accounts.

Mitigate fake accounts and takeovers

Stopping SIM swap fraud, fake account creation, account takeovers, and promo abuse is a business priority. Halt takeovers when you identify risk signals of compromised numbers. Mitigate fakery with Line Type Intelligence that spots suspicious virtual numbers.

Features

Build trusted relationships
upon real-time insights

  • Formatting and Validation

    Validate and reformat phone numbers automatically to match national and global dialing standards for optimal deliverability.

  • Caller Name

    Identify inbound callers then personalize outreach using the verified caller or business name to improve conversions, security, and customer experience. Only available in the US.

  • Line Type Intelligence

    Identify the carrier and phone line type from mobile, landline, fixed VoIP, non-fixed VoIP, toll free, and more to mitigate fake accounts, scrub contact lists, and improve deliverability.

  • SIM Swap

    Detect SIM swap to stop fraud and account takeovers with timestamps and dates of any SIM changes, plus configurable risk tolerance that enables accurate modeling and metrics.

  • Call Forwarding

    Expose voice channel compromise and at-risk numbers with real-time access to the call forwarding status for mobile numbers. Only available in the UK.

messaging-customer-quote-portrait.png

“We’ve never had a reliability issue with Twilio, and I think that speaks to the nature of its scalability and reflects on every single product we’ve worked with Twilio on so far.”

Marcelo Oliviera, VP Engineering, Luma Health

Pricing

Enhance your engagement solution
with seamless security in one API

Sign up for Twilio free to start building without commitments. Only pay for what you use with flexible pay-as-you-go pricing.