Labsco
openai logo

twilio-lookup-phone-intelligence

✓ Official4,081

by openai · part of openai/plugins

Look up phone number intelligence via Twilio Lookup v2 API. Covers number validation, line type detection (mobile/landline/VoIP), SIM swap detection, caller name, identity match, and SMS pumping risk scoring. Use this skill to validate numbers or assess fraud risk before sending messages or calls.

🧩 One of 7 skills in the openai/plugins package — works on its own, and pairs well with its siblings.

This is the playbook your agent receives when the skill activates — you don't need to read it to use the skill, but it's here to audit before installing.

Overview

Twilio Lookup validates phone numbers and provides optional intelligence packages. Basic validation is free; data packages (line type, SIM swap, etc.) are paid per lookup.


Key Patterns

Line Type Intelligence (paid)

Identifies mobile, landline, VoIP, toll-free, etc.

Python

phone = client.lookups.v2.phone_numbers("+15108675310").fetch(
    fields="line_type_intelligence"
)
print(phone.line_type_intelligence)
# {'type': 'mobile', 'carrier_name': 'T-Mobile USA', ...}

Node.js

const phone = await client.lookups.v2.phoneNumbers("+15108675310").fetch({
    fields: "line_type_intelligence",
});
console.log(phone.lineTypeIntelligence);

Line types: mobile, landline, voip, toll-free, fixedVoip, nonFixedVoip, personal, payphone, unknown

Multiple Packages in One Request

Python

phone = client.lookups.v2.phone_numbers("+15108675310").fetch(
    fields="line_type_intelligence,sim_swap,caller_name"
)

Node.js

const phone = await client.lookups.v2.phoneNumbers("+15108675310").fetch({
    fields: "line_type_intelligence,sim_swap,caller_name",
});

Validate Before Sending

Python

phone = client.lookups.v2.phone_numbers("+invalid").fetch()
if not phone.valid:
    print(f"Invalid number: {phone.validation_errors}")
    # Handle gracefully — do not attempt to send

Node.js

const phone = await client.lookups.v2.phoneNumbers("+invalid").fetch();
if (!phone.valid) {
    console.log("Invalid number:", phone.validationErrors);
}

Available Data Packages

Packagefields valueCoverageUse case
Line Type Intelligenceline_type_intelligenceWorldwideRoute by line type; block VoIP
Caller Namecaller_nameUS onlyShow caller ID
SIM Swapsim_swapSelect regionsFraud detection
Identity Matchidentity_matchSelect regionsVerify ownership
SMS Pumping Risksms_pumping_riskWorldwideFraud prevention
Reassigned Numberreassigned_numberUS onlyCheck if recycled

CANNOT

  • Cannot look up by name or address — Input is always a phone number. No reverse search.
  • Cannot get caller_name for non-US numbers — Returns error 60600 (out of coverage).
  • Cannot detect conditional call forwarding — Only unconditional forwarding is detected, and only for UK carriers.
  • Cannot guarantee SIM swap data without carrier registration — Returns error 60606 until carrier approval is in place.
  • Cannot use Reassigned Number outside the US — US-only dataset with monthly update cadence.
  • Cannot get real-time SMS pumping scores — Scores are statistical models, not live traffic analysis.
  • Cannot write data — Lookup v2 is read-only (GET only). The one exception is Line Type Override (POST/DELETE).
  • Cannot batch multiple phone numbers in one request — One number per API call. Loop for bulk lookups.
  • Cannot avoid billing on caller_name requests that return no data — Billed per request regardless of whether data is returned.
  • Cannot use Phone Number Quality Score or Pre-fill without provisioning — Returns 60606. Contact Twilio sales to enable.
  • Cannot guarantee deliverability from a valid lookup — A valid number may still be unreachable (carrier issues, ported, etc.)

Next Steps

  • Send SMS after validation: twilio-sms-send-message
  • Send OTP after validation: twilio-verify-send-otp