Access methods

|

View as Markdown

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:

MethodBest forWhere to go
Web interface (Broadcast)Ad hoc lookups and database cleaning without codeWeb interface steps
REST APIApplication integrations, synchronous or asynchronousREST API details
SMPPClients already bound over SMPP (system_type = HLR)SMPP details
ENUMHigh-volume, low-latency lookups over DNSENUM details


Web interface [#over-the-web-interface]

To run a lookup from the web interface (Broadcast):

  1. Log in to the web interface.
  2. Go to Broadcast > Broadcasts, then select Create Broadcast.
  3. Select Number Lookup as the supporting feature.
  4. Add the recipients to check. Paste a list of numbers, select destinations from People or Customer Profiles, or upload a file.
  5. Select Continue to preview to validate the numbers.
  6. Create the report, or use Analyze to build and download it.
LEARN MORE
For a detailed report, Analyze can produce a per-number output that includes the operator, country, portability, and roaming results. For the full list of columns, see Number Lookup detailed report columns.


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 notifyUrl you provide when the lookup completes. Use this mode for bulk or non-blocking workflows.

The API provides these endpoints:

Method and pathPurpose
POST /number/1/querySynchronous lookup. Returns the result in the HTTP response.
POST /number/1/notifyAsynchronous lookup. Returns immediately, then sends the result to your notifyUrl.
GET /number/1/logsRetrieve 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

json
1{
2 "to": [
3 "41793026727"
4 ]
5}

Each result reports the network, portability, roaming, and a status for one number:

Example: Response

json
1{
2 "results": [
3 {
4 "to": "41793026727",
5 "mccMnc": "22801",
6 "imsi": "228011234567890",
7 "originalNetwork": {
8 "networkName": "Swisscom",
9 "countryName": "Switzerland"
10 },
11 "ported": false,
12 "roaming": false,
13 "status": {
14 "groupName": "DELIVERED",
15 "name": "DELIVERED_TO_HANDSET",
16 "description": "Message delivered to handset"
17 },
18 "error": {
19 "groupName": "Ok",
20 "name": "NO_ERROR",
21 "permanent": false
22 }
23 }
24 ]
25}

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.

LEARN MORE
See the Number Lookup API reference for the ported, roaming, and error responses, all fields, and the full status and error list.


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:

  1. Bind with your default system_id and password, setting system_type = HLR in the bind PDU.
  2. Send a SubmitSM PDU with destAddress set to the number to check. The lookup ignores other parameters, such as srcAddress and TON/NPI.
  3. The Number Lookup subsystem replies with a SubmitSMResp containing the message_id reference.
  4. When the lookup finishes, you receive a DeliverSM PDU. It carries the IMSI for the destination address when it is available, or an error code on failure. It can also include additional fields.
NOTE

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:

FieldTypeHexDecimal
Original network nameTLVString0x14125138
Original network prefixTLVString0x140B5131
Original countryTLVString0x14225154
Original country codeTLVString0x14235155
Original country prefixTLVString0x14245156
Ported network nameTLVString0x14135139
Ported country prefixTLVString0x14425186
Ported network prefixTLVString0x143e5182
Ported network country nameTLVString0x143f5183
Is number portedTLVInt0x14215153
Roaming network nameTLVString0x14145140
Roaming network prefixTLVString0x14195145
Roaming country nameTLVString0x14155141
Roaming country codeTLVString0x14175143
Roaming country prefixTLVString0x14205152
MCCMNCTLVString0x14165142
Price per message (×100 for compatibility)TLVInt0x14185144
Serving HLRTLVString0x14095129
Is number correctTLVInt0x14255157
IMSIOct0x14035123

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): The message_id from the SubmitSMResp. 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

json
1addr: 0 0 38591xxxxxxx
2addr: 0 0 0000000000
3msg: id:40072910491427628 sub:001 dlvrd:001 submit date:1007291049 done date:1007291049 stat:DELIVRD err:000
4IMSI:219101100935850 MSC:38591016 HLR:38591xxxxxxx ORN:VipNet PON:VipNet RON:VipNet ROC:HR MCCMNC:21910
5opt: (oct: (tlv: 1059) 030000) (byte: (tlv: 1063) 2) (str: (tlv: 30) 40072910491427628) (str: (tlv: 5129) 38591xxxxxxx)
6(str: (tlv: 5138) VipNet) (str: (tlv: 5139) VipNet) (str: (tlv: 5140) VipNet) (str: (tlv: 5141) Croatia)
7(str: (tlv: 5143) HR) (str: (tlv: 5142) 21910) (int: (tlv: 5144) 1) (str: (tlv: 5145) 91) (str: (tlv: 5152) 385)
8(int: (tlv: 5153) 1) (str: (tlv: 5154) Croatia) (str: (tlv: 5155) HR) (str: (tlv: 5156) 385) (int: (tlv: 5157) 1))
9(extraopt: (oct: (tlv: 5123) 323139313031313030393335383530))

Example: Failed lookup

json
1addr: 0 0 38591xxxxxxx
2addr: 0 0 0000000000
3msg: id:40072910491419819 sub:001 dlvrd:001 submit date:1007291049 done date:1007291049 stat:UNDELIV err:001
4IMSI: MSC: ORN:VipNet MCCMNC:
5opt: (oct: (tlv: 1059) 030001) (byte: (tlv: 1063) 5) (str: (tlv: 30) 40072910491419819) (str: (tlv: 5138) VipNet)
6(str: (tlv: 5142)) (int: (tlv: 5144) 1) (int: (tlv: 5153) 0) (str: (tlv: 5154) Croatia) (str: (tlv: 5155) HR)
7(str: (tlv: 5156) 385) (int: (tlv: 5157) 1))


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.



Related pages

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?