Blog
HLR lookup explained: what a network query tells you about a mobile number
What an HLR lookup is, how it queries the mobile network, what it returns and what it cannot, and when a live carrier lookup is worth paying for.
Updated 2026-11-24
An HLR lookup is a question put to a mobile network: what do you know about this number? The answer can include which operator serves it now, whether it was ported away from the operator its range was assigned to, and sometimes its subscriber state. It does not ring the phone, send a message or reveal who owns the number. It is the one check that sees the network instead of the plan, which is why it catches what a numbering-plan check cannot.
What the register is
Every mobile subscription has a record in its operator's core network. In a GSM network, the Home Location Register (HLR) is the database that holds subscriber profiles and the network currently serving each subscriber. The 3GPP specifications define the architecture. Later generations replaced the register with successors: the Home Subscriber Server (HSS) in 4G and the Unified Data Management (UDM) function in 5G. In everyday use, the term HLR lookup stuck and covers a query to any of them.
A subscription is identified inside the network by its IMSI, the international mobile subscriber identity. Its first digits are the mobile country code (MCC) and the mobile network code (MNC), the pair ITU-T Recommendation E.212 defines to name a country and a network. The phone number your customer types is a separate identifier, the MSISDN, that the network maps to the IMSI. That mapping is what a lookup reads. See the glossary entries on HLR lookup and MCC and MNC.
How a lookup travels
Operators exchange signalling messages to route calls and texts. For decades this traffic ran over SS7, the signalling system standardized by ITU-T, using the Mobile Application Part (MAP) defined by 3GPP. A message that asks for routing information for a text is the typical form of the query: the HLR answers with the subscriber's IMSI and the address of the network node currently serving them. Newer networks carry equivalent exchanges over IP-based signalling.
You rarely send those messages yourself. A lookup provider holds connections to the networks, sends the query, reads the answer and hands you a clean result over HTTP. Qelka's live level gives you the same kind of answer without the plumbing: it asks an upstream number-lookup provider about the number at the time of your call and returns the carrier, the mobile codes and the porting flag.
| Step | What happens |
|---|---|
| 1 | You send a number to the lookup API |
| 2 | The provider works out which network the number belongs to, using ranges and porting data |
| 3 | It queries that network's subscriber database over signalling |
| 4 | The answer is mapped to fields: operator, codes, ported flag, sometimes a state |
| 5 | You receive the fields in one response |
The query reads records. No message goes to the handset, so the person behind the number sees nothing.
What a network lookup can return
Different routes return different amounts. This is what a lookup can show, and what Qelka returns at the live level.
| Data | What it means | In the Qelka live response |
|---|---|---|
| Current operator | The network serving the number now | carrier.name |
| Mobile country and network codes | The E.212 pair naming that network | carrier.mcc and carrier.mnc |
| Ported flag | The number left the operator its range was assigned to | ported |
| Line type | Mobile, landline, VoIP and others, as the provider reports it | line_type |
| Subscriber state | Reachable, absent, roaming | Not returned |
At the live level the provider's line type replaces the plan's when the provider reports one. A US number that is fixed_line_or_mobile in plan data can come back mobile, because the network knows what the plan does not.
Subscriber state deserves a warning. Where a route reports it, "absent" means the network could not reach the phone at that moment. That covers a phone that is off, out of coverage in a tunnel or abroad without roaming, and a subscription that was cancelled. Reading it as "the number is dead" will reject real people. Qelka leaves it out on purpose and makes no promise about reachability.
What it cannot do
- Identify the subscriber. The API never returns the name or address behind a number. The network holds those records, and a lookup is not a way to get them.
- Prove possession. A real number answered by a network can still belong to someone other than the person at your form. Only a one-time code that comes back proves possession.
- Detect a SIM swap. A swap changes the SIM, not the operator. The
portedflag describes a move between operators. See SIM swap for what protects against it. - Work the same everywhere. Networks differ in what they expose, and some routes give less detail. Treat a missing field as unknown, not as failure.
Plan data versus network data
The comparison below is the reason both levels exist. They answer different questions, and they differ in speed and price.
| Basic level | Live level | |
|---|---|---|
| Question | Can this number exist, and what was its range for? | Who serves this number today? |
| Source | Numbering plan data from Google's libphonenumber | An upstream lookup provider, queried at call time |
| Cost | 1 credit | 3 credits |
carrier.name |
The operator the range was originally assigned to, when named | The operator serving the number now |
carrier.mcc, carrier.mnc |
null |
The codes of the serving network |
ported |
null |
true or false |
| Number leaves our systems | No | Yes, to the lookup provider |
The last row matters for privacy. At the basic level the number is not sent to any lookup provider. At the live level it is, and data and privacy lists who receives it. Only choose the live level when the answer is worth it.
When the network answer is worth paying for
Spend the extra credits where knowing the current operator changes an outcome.
- Routing and pricing messages. Operators charge differently, and the serving network decides which route carries a text.
- Reviewing a sensitive change. A number added to an account right before a password reset, or an account recovery to a number that was ported in the last day, is worth a second look. A ported number is not suspicious by itself, since people switch operators every day. It is a signal that lines up with other signals.
- Cleaning a list before a costly send. A live pass over a list you are about to message by SMS removes numbers the network does not know.
- Checking line type where the plan cannot. In North America, the live provider's line type separates mobile from landline where the plan returns
fixed_line_or_mobile.
For a plain signup form, a basic check is enough, and it costs a fraction. Run it first, then escalate. Phone number validation shows the layers in order.
Call the live level
curl https://api.qelka.com/v1/phone \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone": "+14155550123", "level": "live"}'
Read the fields that matter and leave the rest:
const response = await fetch('https://api.qelka.com/v1/phone', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ phone: '+14155550123', level: 'live' }),
signal: AbortSignal.timeout(10000),
})
if (response.status === 502) {
console.log('Provider unavailable, not billed: fall back to the basic result')
} else if (response.ok) {
const result = await response.json()
console.log(result.carrier.name, result.carrier.mcc, result.carrier.mnc, result.ported)
}
When the upstream provider fails, the API answers 502 upstream_unavailable and bills nothing, so a fallback to the basic level is cheap. Results are cached for 7 days; pass "fresh": true to skip the cache when you need the current answer, for example right after a customer says they changed operator. Every field is described in the phone API reference. The free carrier lookup shows the carrier for any number.
A decision table
| You see | Do |
|---|---|
ported: true, carrier you expect |
Nothing: people change operator |
ported: true, a new account, a recovery request and a fresh device |
Add a confirmation step |
carrier.name is a VoIP provider and the flow needs a mobile phone |
Ask for a mobile number, or apply your VoIP policy |
502 upstream_unavailable |
Use the basic result and retry later |
line_type: "mobile" on a number that was fixed_line_or_mobile in plan data |
Accept it as a mobile number and send the SMS |
Where to go next
- Mobile number portability explains why the carrier in plan data goes stale.
- Is this phone number real? puts the network answer next to the other checks.
- SMS pumping fraud shows why validating before sending a code matters.
- Check if a phone number is active walks through the lookup step by step.
Frequently asked questions
What does HLR stand for?
Is an HLR lookup the same as phone number validation?
Does an HLR lookup send an SMS or ring the phone?
Can an HLR lookup tell me whether a phone is switched on?
ported flag, and makes no claim about reachability.How accurate is an HLR lookup?
How much does a live phone lookup cost with Qelka?
502 upstream_unavailable and does not bill the call. The free plan includes 100 credits a month, and test keys never spend credits.Put this check in your product
Get an API key in under a minute. 100 free credits every month, no card required.
- 100 free credits a month
- No card
- Test keys spend nothing
- Cancel any time