Frequently Asked Questions
The Phone Number Lookup API retrieves detailed information about phone numbers. This includes carrier details, portability status, and fraud detection, supporting E.164 formatted numbers for global use.
Send a GET request to the /phone-lookup endpoint with the phone number as a query parameter. The number should be in E.164 format (e.g., +12345678900) and the base URL is https://www.sent.dm/api.
The API has a rate limit of 15 requests per 60 seconds across multiple regions. Exceeding this limit will result in a 429 Too Many Requests error.
Use the Phone Number Lookup API's /phone-lookup endpoint. The response includes details like mobile country code, mobile network code, carrier name, and type, within the 'carrier' object.
E.164 is an international standard for phone number formatting. It ensures global compatibility and includes a plus sign (+) followed by the country code and national number, like +12345678900.
The E.164 format is required for global compatibility and consistent processing of phone numbers from different countries. This ensures the API can accurately identify and retrieve information.
The endpoint is /phone-lookup, accessed via a GET request to the base URL https://www.sent.dm/api. The request must include the phone number as a query parameter named 'phone'.
The Phone Number Lookup API includes fraud detection capabilities. The response to a /phone-lookup request contains a 'fraud' field, providing information about potential fraudulent activity associated with the number.
Use this API when you need to verify phone number details, identify carriers, detect potential fraud, check portability, or obtain other information related to a given phone number in your application.
A 400 Bad Request error usually indicates an invalid phone number format. Ensure the provided number adheres to the E.164 standard, including the '+' sign and correct country code.
Yes, the Phone Number Lookup API provides portability information. The 'portability' object in the API response includes details on whether a number has been ported, along with relevant dates and carrier information.
The API returns various details, including country code, national format, carrier information (name, type, codes), fraud indicators, portability status, and caller name (if available), plus validation status.
This error indicates you've exceeded the API's rate limit (15 requests per 60 seconds). Wait for a minute before sending another request to avoid further issues.
The 'poweredBy' field acknowledges Sent.dm as the provider of the API and includes a link to their website (https://www.sent.dm).
Phone Number Lookup API
API Authentication
All API requests require authentication using an API key. Include your API key in the
Authorizationheader with theBearerscheme:Obtain your API key from your account administrator or the API dashboard. Keep your API key secure – never share it publicly or commit it to version control.
The Phone Number Lookup API retrieves comprehensive phone number intelligence in real-time. Get carrier identification, number portability status, and fraud detection data for any phone number worldwide. The REST API supports E.164 international phone number format and returns Location Routing Number (LRN), Service Provider ID (SPID), Operating Company Number (OCN), line type classification, and porting history. Use it to validate customer phone numbers, prevent fraud, optimize SMS delivery routes, and maintain accurate contact databases.
Quick Start: Phone Number Validation Example
Get started with a complete example:
Overview: How Phone Lookup Works
The Phone Number Lookup API retrieves detailed information about phone numbers, including carrier details, portability status, and fraud detection. Use E.164 format for global compatibility.
Coverage: This API supports phone number lookups worldwide. Data availability and detail level vary by country and carrier. North American numbers (US, Canada) include comprehensive LRN and portability data through integration with the Number Portability Administration Center (NPAC). International number data depends on local carrier database availability.
E.164 Format Requirements: E.164 is the ITU-T (International Telecommunication Union) international standard for telephone numbering. Start numbers with a plus sign (+), followed by the country code (1–3 digits), and the subscriber number. Total length: 15 digits maximum (excluding the + sign). Example:
+12345678900(US number with country code 1).Key Features
Carrier Information: Identify the service provider, network type, mobile country code (MCC), and mobile network code (MNC). Use this data to optimize message routing and understand network characteristics.
Fraud Detection: Detects high-risk indicators including VoIP numbers (non-fixed VoIP services like Google Voice are commonly associated with fraud), recent porting activity (frequent number porting may indicate suspicious behavior), and invalid or disconnected numbers. The
fraudfield returns risk indicators when suspicious patterns are detected. Anullvalue indicates no fraud flags.Portability Status: Check if a number has been ported to a different carrier. Returns porting date, original and current service providers, and Location Routing Number (LRN) for proper call routing. Essential for TCPA compliance and accurate carrier billing.
Common Use Cases:
API Rate Limits
Rate Limit Best Practices:
Retry Strategy: When a 429 error occurs, wait 60 seconds before retrying. For 5xx errors, implement exponential backoff starting with a 1-second delay, doubling after each failure, up to a maximum of 32 seconds.
API Base URL
https://www.sent.dm/apiAPI Endpoints
GET /phone-lookup- Validate and Lookup Phone NumbersSummary
Perform a lookup for a phone number in E.164 format. Returns comprehensive data including carrier, portability, and fraud status.
Request Parameters
phone+12345678900). Must match the pattern:^\+[1-9]\d{1,14}$Required Headers:
AuthorizationBearer YOUR_API_KEYResponse
200 OK
A successful response includes detailed phone number information.
Response Fields Explained
Top-Level Fields:
country_code: Two-letter ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "CA").national_format: Phone number formatted according to national conventions (e.g., "(234) 567-8900" for US).phone_number: The original phone number in E.164 format as queried.fraud: Fraud risk indicators. Returnsnullif no fraud flags detected. When populated, may include risk scores, VoIP detection flags, or other security indicators.caller_name: CNAM (Caller Name) lookup result displaying the registered name associated with the phone number. Returnsnullif CNAM data is unavailable or not subscribed. Useful for caller identification and trust scoring.nnid_override: Network Numbering ID override value used in specialized routing scenarios. Typicallynullfor standard lookups.valid_number: Boolean indicating whether the phone number is valid according to E.164 format and numbering plan rules.truemeans the number is properly formatted and assigned;falseindicates an invalid or unassigned number.record_type: Always returns"number_lookup"to identify the response type.Portability Fields:
lrn(Location Routing Number): A 10-digit number assigned to the telephone switch serving the number. Used for call routing in the North American Numbering Plan (NANP). When a number is ported, the LRN identifies the destination switch regardless of the original number's area code. Format: NPA-NXX-XXXX (e.g., "2345678900"). Source: NPACported_status: Indicates whether the number has been moved from its original carrier. Possible values:"not_ported": Number remains with original carrier"ported": Number has been ported to a different service provider""(empty string): Porting status unknown or unavailableported_date: ISO 8601 timestamp of when the number was most recently ported (e.g., "2024-03-15T10:30:00Z"). Returnsnullif never ported or date unavailable.ocn(Operating Company Number): A 4-character code assigned by NECA (National Exchange Carrier Association) that uniquely identifies the telecommunications service provider. Used for billing and regulatory purposes. Source: NECA Company Codesline_type: Type of telephone line. Possible values based on Twilio Line Type Intelligence:"mobile": Mobile/cellular number that can receive SMS"landline": Fixed landline that typically cannot receive SMS"fixedVoip": VoIP number tied to a physical location (e.g., Comcast, Vonage)"nonFixedVoip": Virtual VoIP number not tied to physical device (e.g., Google Voice) – higher fraud risk"tollFree": Toll-free number (800, 888, 877, etc.)"premium": Premium-rate number with higher charges"voicemail": Voicemail service number"unknown": Valid number but line type cannot be determinedspid(Service Provider ID): A 4-character alphanumeric identifier assigned by the Number Portability Administration Center (NPAC) to identify the current service provider in the number portability system. Often matches the OCN. Source: NPAC SPID Documentationspid_carrier_name: Full legal name of the service provider identified by the SPID.spid_carrier_type: Type of service provider. Common values:"wireless","wireline","voip", or empty string if unavailable.altspid(Alternative Service Provider ID): The 4-character identifier for a wholesale or reseller service provider associated with the number. Used when a number is served through a wholesale relationship (e.g., MVNO on a host carrier's network). Returns empty string if not applicable. Source: NPAC AltSPID Documentationaltspid_carrier_name: Name of the alternative/wholesale service provider.altspid_carrier_type: Type of alternative service provider (e.g.,"wireless","voip"). Empty string if not applicable.city: City where the number's switch or rate center is located.state: State or province where the number's switch is located (full name, e.g., "New York", "California").Carrier Fields:
mobile_country_code(MCC): A 3-digit code identifying the country per ITU-T E.212 standard. Used in mobile networks as part of IMSI identification. Examples: "310" (USA), "234" (UK), "262" (Germany). Source: ITU-T E.212mobile_network_code(MNC): A 2–3 digit code identifying the mobile network operator within the country. Combined with MCC to uniquely identify a carrier globally.name: Commercial name of the carrier (e.g., "Verizon Wireless", "AT&T Mobility").type: Carrier/line type classification. Values align withline_typefield:"mobile","landline","voip","fixedVoip","nonFixedVoip","unknown".error_code: Error code if carrier lookup failed. Returnsnullon success. Non-null values indicate data retrieval issues for specific carrier fields.normalized_carrier: Simplified, standardized carrier name for easier matching and deduplication (e.g., "Verizon" instead of "CELLCO PARTNERSHIP DBA VERIZON WIRELESS"). May be empty string if normalization unavailable.Field Null/Empty Handling: Fields return
nullor empty strings ("") when:Error Responses
400 Bad Request
Returned when the phone number format is incorrect.
Common causes: Missing + prefix, invalid country code, exceeds 15 digits, contains non-numeric characters after the +.
401 Unauthorized
Returned when authentication fails or API key is invalid.
Resolution: Verify your API key is correct and included in the
Authorization: Bearer YOUR_API_KEYheader.403 Forbidden
Returned when the API key is valid but lacks permission for this operation.
Resolution: Contact support to enable phone lookup permissions for your account.
429 Too Many Requests
Returned when the rate limit is exceeded.
Resolution: Implement exponential backoff. Wait 60 seconds before retrying.
500 Internal Server Error
Returned when there is an internal error processing the request.
Resolution: Retry with exponential backoff. If the issue persists, contact support with the timestamp and phone number queried.
Troubleshooting Common Scenarios
Partial Data Returned: Some fields may be
nullor empty if:Ported Numbers: When
ported_statusis"ported", use thespidandspid_carrier_namefor current carrier, not the original NPA-NXX assignment. Thelrnfield is critical for proper call routing.VoIP Detection for Fraud Prevention: Numbers with
line_type: "nonFixedVoip"have higher fraud risk. Consider additional verification steps for these numbers during user registration.TCPA Compliance: Use
ported_statusandline_typeto determine if a number is wireless or wireline. The Telephone Consumer Protection Act requires prior express consent before calling/texting wireless numbers.Data Freshness and Caching
Update Frequency: Carrier and portability data updates in near real-time, typically within 15 minutes of database changes. LRN and porting data syncs from NPAC occur every 15–30 minutes.
Recommended Caching: Cache lookup results for 24–48 hours to balance data freshness with API efficiency. Use shorter TTLs (4–6 hours) for fraud-sensitive applications.
Performance: Typical API response time is 200–500 ms for North American numbers, 500 ms–2 s for international numbers depending on upstream carrier database latency.
Best Practices
nonFixedVoip), implement additional verification (SMS OTP, email confirmation)Common Use Cases and Code Examples
How to Filter Landlines for SMS Campaigns
Filter out landlines before sending SMS to avoid failed deliveries:
How to Detect VoIP Numbers for Fraud Prevention
Detect high-risk VoIP numbers:
How to Verify Wireless Numbers for TCPA Compliance
Verify wireless vs. wireline status:
For more information on the E.164 format, visit the official E.164 documentation.
Technical References
Standards and Specifications:
Number Portability and Carrier Identification:
Regulatory: