· Updated ·6 min read·by ByeBouncer

Phone carrier lookup API: prefix, portability and HLR explained

How a phone carrier lookup API works: prefix vs. portability vs. HLR, what each costs, and what a carrier lookup can't tell you about a number.

phonecarrierhlrlatam
Update: this article includes historical references or examples of customer-defined rules. The current ByeBouncer service checks each field and returns independent results, without scoring or a contact acceptance decision. We do not establish identity or ownership, or detect bots or fraud. See /en/docs#validation-v1 for the current contract.

Looking up the carrier behind a phone number sounds simple: is it Movistar, Claro, Personal? But since number portability exists, the prefix alone can't answer it anymore. This guide covers how to do a carrier lookup, what data sources sit behind it, how it differs from an HLR query, and what you do and don't get when you call a carrier lookup API.

Why the prefix no longer tells you the carrier

Years ago, the first digits of a mobile number mapped to one operator. Then number portability arrived: people switch carriers and keep their number. Argentina has had it since 2012, and many other countries have something similar. So a prefix tells you which carrier a range was originally assigned to, not who owns the number today.

For many jobs that's good enough. For others (routing SMS, estimating costs, understanding which networks your list lives on) it leaves you with an error you can't see. That's why it matters which kind of lookup you run.

Three ways to look up a number's carrier

When someone says "carrier lookup" they can mean three different things, with different cost, speed and scope:

Prefix / MNPLive HLRvs
Prefix and HLR answer different questions: who the range belonged to vs. how the line is right now.

Carrier lookup vs. HLR lookup: not the same thing

An HLR lookup queries the operator's subscriber register (the Home Location Register) and can indicate whether the line is active right now. A carrier lookup answers something else: which network owns the number. They complement each other; neither replaces the other.

One nuance: an HLR that returns "connected" tells you the network knows where to deliver, not that the person will read it. And an inconclusive result (operator not answering, handset off, rate limit) is not the same as an invalid number. For when each one pays off, see our comparison of HLR and local validation.

How to run a carrier lookup through an API

The minimal flow looks the same with any provider:

  1. Normalize the number to E.164 (+54 9 11…). A malformed number returns a format error, not a carrier.
  2. Validate format and range before spending a paid query. Every billable lookup has a cost.
  3. Request the carrier and, only if the decision justifies it, the live line status.
  4. Store the result with its date. A carrier fetched six months ago may have changed through a port.
E.164Format and rangeCarrierHLR (optional)
Recommended order: from cheap check to expensive one.

In ByeBouncer you do it with the phone verification endpoint: the carrier lookup costs 3 credits, and HLR is added with live: true only when you need it. Fields, errors and costs are in the docs.

What each lookup is good for

What a carrier lookup does NOT do

Worth putting on the table, because this is where most of the hype lives:

In production we see most teams overspend: they run HLR over the whole list when the carrier (or even just the format) was enough for the decision. A practical rule: format for everything, carrier for what you will segment or score, HLR for what is about to receive a real contact.

How to choose for your case

If you only need to classify and clean, format plus carrier is usually enough. If you are about to send bulk SMS or have a sales team dialing, add HLR on the subset you will actually contact. And if your problem is signup fraud, use carrier and line type as one signal inside a score, together with email and IP.

Before querying blindly, try a sample of a few hundred numbers and count how many results change your decision. If almost none do, don't pay for more. Also decide up front how long you will trust a stored result: for a segmentation field a few months is reasonable, but for a send-or-don't-send decision you should refresh the check close to the moment of contact.

See how phone and carrier validation works →

To see it on your own numbers, try 500 free credits, no card required. The starter includes quota to try line validation.

Try 500 free credits, no card →

Related guides