What is an HLR lookup?
An HLR lookup asks a mobile network about a phone number before you send anything to it. The name comes from the home location register, a database inside a mobile network that holds the details of its subscribers. A lookup returns whether the number is registered and active, which operator it belongs to now, its country and, in many cases, whether it has been moved from another network.
Why do that? Because sending to a number that does not exist costs money, damages your delivery statistics and can trigger spam filters. Cleaning a list with a lookup takes minutes and often pays for itself on the first large campaign. This guide covers how lookups work, what the data means, how they differ from simple validation, and where they fall short. For hands-on checking, our free number lookup tool shows the basics.
How an HLR lookup works
- You send the number. Your application calls a lookup API with a number in international format.
- The platform normalises it. It checks the format against the E.164 numbering plan and finds the country.
- It queries the network. The platform sends a signalling query to the network that owns the number, or to a database that mirrors it.
- The network responds. It returns the subscriber status and routing details.
- You receive a structured result. The platform returns it as JSON, so your code can act on it.
No message is sent to the phone and the owner is not notified. That is what makes lookups safe to run on large lists.
What an HLR lookup returns
| Field | What it tells you | How to use it |
|---|---|---|
| Status | Whether the number is active, inactive or unknown | Drop inactive numbers from campaigns |
| Country and network (MCC and MNC) | The country code and the operator, identified by mobile country and network codes | Route by operator, analyse delivery by network |
| Original and current network | Whether the number was ported and where it is now. See mobile number portability | Avoid sending through the wrong route |
| Line type | Mobile, landline, VoIP or other | Do not send SMS to landlines |
| Roaming | Whether the subscriber is abroad | Adjust timing or channel |
| Format and validity | Is the number correctly formed | Reject typing errors at the form |
Fields differ by country and by provider, so treat the list as typical rather than guaranteed. In some countries operators restrict what an HLR query returns, and you receive less detail.
HLR lookup vs number validation
| Format validation | Number lookup (carrier and type) | HLR or live lookup | |
|---|---|---|---|
| What it checks | Digits, length and country code | Numbering plan: carrier of original allocation and line type | The network: is it active now, current operator |
| Speed | Instant, local | Fast | Slower; contacts the network |
| Cost | Free | Low | Per lookup |
| Catches typos | Yes | Yes | Yes |
| Catches dead numbers | No | No | Yes, in most cases |
| Best for | Sign-up forms | Segmenting lists | Cleaning before a large send |
A layered approach works best. Validate format as the user types, run a cheap lookup at registration and do a live lookup before a big campaign or a high-value flow. Our number lookup product offers these in one API.
When to use HLR lookup
- Before a large SMS campaign. Remove dead numbers and landlines. See SMS marketing and bulk SMS in India.
- At sign-up. Check that a mobile number is real before you send an OTP, which saves money and reduces OTP abuse.
- For fraud checks. VoIP and recently ported numbers are signals worth scoring.
- For routing and reporting. Knowing the current operator explains delivery differences by network.
- For list hygiene. Re-check old lists before you reactivate them.
Do not over-rely on it. A lookup tells you the state of a number at one moment. A phone can be off, full or in a tunnel and still be a good number. Use the result to remove clearly dead numbers, not to judge every borderline case.
Calling the lookup API
A lookup is a simple authenticated request. This example uses our illustrative lookup endpoint; the exact response fields are in the API reference.
curl https://api.telnxo.com/v1/lookup/+919812345670 \
-H "Authorization: Bearer $TELNXO_KEY"
# Example response
{
"number": "+919812345670",
"valid": true,
"type": "mobile",
"country": "IN",
"network": { "name": "Example Telecom", "mcc": "404", "mnc": "10" },
"ported": true,
"status": "active"
}Apply simple rules to the result: reject if valid is false, drop if status is inactive, skip SMS if type is landline, and store the result with a date so that you can re-check it later.
Using lookup in a sign-up flow
- Validate as the user types. Check the format locally and show the country code, so typos are caught before any request is made.
- Look up on submit. Call the lookup API once the user submits. Reject numbers that are invalid or are landlines when you need a mobile.
- Score the result. Treat VoIP, newly ported and unknown numbers as higher risk and ask for extra verification instead of blocking.
- Send the code. Only now send the one-time code, so you do not pay for messages to numbers that cannot receive them.
- Store the result. Keep the lookup date and outcome with the account, to explain decisions and to know when to check again.
Common mistakes
- Running a lookup on numbers that are not in international format, which gives false failures.
- Treating "unknown" as "dead". Unknown means the network gave no answer.
- Blocking every VoIP number, which excludes legitimate users of app-based lines.
- Never refreshing the data, so a list that was clean last year is trusted today.
- Ignoring country differences: a result that is rich in one market may be thin in another.
Costs and limits
| Item | What to know |
|---|---|
| Price per lookup | Varies by country and the depth of data |
| Rate limits | Large lists must be run in batches. See limits |
| Freshness | The answer is valid at that moment; refresh before important sends |
| Coverage | Some countries return limited data or none |
A worked example shows why it can pay. If a list of 100,000 numbers has 8 per cent dead numbers and each failed message costs a fraction of a rupee or cent, the lookup cost is usually lower than the cost of the wasted messages, before counting the improved delivery rate and sender reputation. Use the cost calculator to test your own numbers, and the pricing page for current lookup rates.
Privacy and good practice
- Use lookups for data quality and security, not to track or profile individuals.
- Tell people in your privacy policy how you process their number.
- Keep only the fields you need and set a retention period.
- Do not share raw results beyond the systems that need them.
- Follow local telecom and data protection rules in each country you serve.
Lookups also help when you move between providers. Cleaning your list before you migrate gives the new route a fair start; the guides for MSG91 and Twilio include this step.
A lookup costs a few paise. A bad list costs your reputation.
Clean your list before you send. Validate, classify and check numbers through one API.
Frequently asked questions
What is an HLR lookup?
It is a query to the mobile network's home location register or an equivalent database to find out whether a phone number is active, which operator it currently belongs to and, often, whether it is roaming or has been ported.
What does HLR stand for?
HLR stands for home location register, a database in a mobile network that holds subscriber information, such as which services are active and where the phone is registered.
What is the difference between HLR lookup and number lookup?
Basic number lookup checks format and country and gives the line type from numbering plans. An HLR lookup contacts the network and can tell if the number is live now. Many providers offer both under one lookup API.
Can HLR lookup tell if a number is switched on?
It can often tell if the subscriber is reachable or the SIM is active, but not with certainty. A phone that is off, out of coverage or roaming may return different statuses, and some countries limit the data available.
Is HLR lookup legal?
It is widely used for data quality and fraud prevention. Privacy and telecom rules differ by country, so use it only for legitimate purposes, tell users how you process their data and check local requirements.
How much does an HLR lookup cost?
Prices are per lookup and vary by country and depth of data. Lookups cost far less than a failed message campaign to a dirty list, but they are not free, so apply them where they save more than they cost.
How accurate is HLR lookup?
It is very good at showing whether a number exists and which network it is on. It is less reliable for exact reachability, because the answer is a snapshot and some operators return limited or cached information.