Access methods
You can run the same Number Lookup in four ways. Each method returns a different level of detail, so choose one based on how you integrate and what data you need:
| Method | Best for | Where to go |
|---|---|---|
| Web interface (Broadcast) | Ad hoc lookups and database cleaning without code | Web interface steps |
| REST API | Application integrations, synchronous or asynchronous | REST API details |
| SMPP | Clients already bound over SMPP (system_type = HLR) | SMPP details |
| ENUM | High-volume, low-latency lookups over DNS | ENUM details |
Web interface [#over-the-web-interface]
To run a lookup from the web interface (Broadcast):
- Log in to the web interface.
- Go to Broadcast > Broadcasts, then select Create Broadcast.
- Select Number Lookup as the supporting feature.
- Add the recipients to check. Paste a list of numbers, select destinations from People or Customer Profiles, or upload a file.
- Select Continue to preview to validate the numbers.
- Create the report, or use Analyze to build and download it.
REST API [#over-the-api]
Call the Number Lookup API with the list of numbers to check. The API reference is the source of truth for request and response formats, the returned fields, and the full status list.
The API supports two modes:
- Synchronous: The lookup completes before the API responds, so the HTTP response contains the result directly. Use this mode when your code proceeds only once the result is available.
- Asynchronous: The API responds immediately, then sends the result to a
notifyUrlyou provide when the lookup completes. Use this mode for bulk or non-blocking workflows.
The API provides these endpoints:
| Method and path | Purpose |
|---|---|
POST /number/1/query | Synchronous lookup. Returns the result in the HTTP response. |
POST /number/1/notify | Asynchronous lookup. Returns immediately, then sends the result to your notifyUrl. |
GET /number/1/logs | Retrieve logs of past lookups. Returns the most recent 50 by default, up to 1,000, for the last 48 hours. |
Phone numbers must be in international format (for example, 41793026727). Send the numbers to check in the to array:
Example: Request
Each result reports the network, portability, roaming, and a status for one number:
Example: Response
This example shows one simple case. Ported, roaming, and error responses return additional fields. The fields you receive depend on your package. To change your package, contact your account manager or Support.
SMPP [#over-smpp]
If you already connect over SMPP, you can request a lookup on the same connection instead of calling the REST API. This suits clients that are bound over SMPP and want lookups without a separate HTTP integration. For the SMPP protocol itself (binding, PDUs, sessions), see the SMPP specification.
To request a lookup over SMPP:
- Bind with your default
system_idandpassword, settingsystem_type = HLRin the bind PDU. - Send a
SubmitSMPDU withdestAddressset to the number to check. The lookup ignores other parameters, such assrcAddressand TON/NPI. - The Number Lookup subsystem replies with a
SubmitSMRespcontaining themessage_idreference. - When the lookup finishes, you receive a
DeliverSMPDU. It carries the IMSI for the destination address when it is available, or an error code on failure. It can also include additional fields.
The IMSI is not available for all destinations. For some destinations, Number Lookup returns only portability information. Live HLR coverage varies by destination and can change.
The DeliverSM PDU returns the result fields as these TLVs:
| Field | Type | Hex | Decimal |
|---|---|---|---|
| Original network name | TLVString | 0x1412 | 5138 |
| Original network prefix | TLVString | 0x140B | 5131 |
| Original country | TLVString | 0x1422 | 5154 |
| Original country code | TLVString | 0x1423 | 5155 |
| Original country prefix | TLVString | 0x1424 | 5156 |
| Ported network name | TLVString | 0x1413 | 5139 |
| Ported country prefix | TLVString | 0x1442 | 5186 |
| Ported network prefix | TLVString | 0x143e | 5182 |
| Ported network country name | TLVString | 0x143f | 5183 |
| Is number ported | TLVInt | 0x1421 | 5153 |
| Roaming network name | TLVString | 0x1414 | 5140 |
| Roaming network prefix | TLVString | 0x1419 | 5145 |
| Roaming country name | TLVString | 0x1415 | 5141 |
| Roaming country code | TLVString | 0x1417 | 5143 |
| Roaming country prefix | TLVString | 0x1420 | 5152 |
| MCCMNC | TLVString | 0x1416 | 5142 |
| Price per message (×100 for compatibility) | TLVInt | 0x1418 | 5144 |
| Serving HLR | TLVString | 0x1409 | 5129 |
| Is number correct | TLVInt | 0x1425 | 5157 |
| IMSI | Oct | 0x1403 | 5123 |
In addition to the Number Lookup custom TLVs in the preceding table, the DeliverSM PDU includes the standard SMPP delivery receipt TLVs:
receipted_message_id(0x001E, 30): Themessage_idfrom theSubmitSMResp. Use it to correlate the result with the request.message_state(0x0427, 1063): The overall status of the lookup.network_error_code(0x0423, 1059): The network error code, if the lookup failed.
Your existing SMPP delivery receipt handler correlates Number Lookup results through receipted_message_id, so you do not need custom correlation logic.
Example: Successful lookup
Example: Failed lookup
ENUM [#over-enum]
For high-volume, low-latency lookups, query Number Lookup over DNS with ENUM. For the query and response formats, see the ENUM integration manual.
Number Lookup
What each lookup returns, and how to use the results.
Number Lookup API reference
Full request and response schemas, all response variants, and the status and error list.
SMPP specification
Binding, PDU types, and delivery reports for SMPP connections.
ENUM integration manual
DNS-based Number Lookup queries and response formats.
Was this page helpful?