[{"data":1,"prerenderedAt":62},["ShallowReactive",2],{"content:en:blog\u002Fhlr-lookup-explained":3},{"path":4,"locale":5,"section":6,"title":7,"description":8,"html":9,"headings":10,"faq":39,"updated":58,"order":59,"words":60,"meta":61},"blog\u002Fhlr-lookup-explained","en","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.","\u003Cp>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.\u003C\u002Fp>\n\u003Ch2 id=\"what-the-register-is\">\u003Ca class=\"heading-link\" href=\"#what-the-register-is\">\u003Cspan>What the register is\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>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.\u003C\u002Fp>\n\u003Cp>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 \u003Ca href=\"\u002Fglossary\u002Fhlr-lookup\">HLR lookup\u003C\u002Fa> and \u003Ca href=\"\u002Fglossary\u002Fmcc-mnc\">MCC and MNC\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"how-a-lookup-travels\">\u003Ca class=\"heading-link\" href=\"#how-a-lookup-travels\">\u003Cspan>How a lookup travels\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>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.\u003C\u002Fp>\n\u003Cp>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.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Step\u003C\u002Fth>\n\u003Cth>What happens\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>1\u003C\u002Ftd>\n\u003Ctd>You send a number to the lookup API\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>2\u003C\u002Ftd>\n\u003Ctd>The provider works out which network the number belongs to, using ranges and porting data\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>3\u003C\u002Ftd>\n\u003Ctd>It queries that network's subscriber database over signalling\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>4\u003C\u002Ftd>\n\u003Ctd>The answer is mapped to fields: operator, codes, ported flag, sometimes a state\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>5\u003C\u002Ftd>\n\u003Ctd>You receive the fields in one response\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>The query reads records. No message goes to the handset, so the person behind the number sees nothing.\u003C\u002Fp>\n\u003Ch2 id=\"what-a-network-lookup-can-return\">\u003Ca class=\"heading-link\" href=\"#what-a-network-lookup-can-return\">\u003Cspan>What a network lookup can return\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Different routes return different amounts. This is what a lookup can show, and what Qelka returns at the live level.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Data\u003C\u002Fth>\n\u003Cth>What it means\u003C\u002Fth>\n\u003Cth>In the Qelka live response\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Current operator\u003C\u002Ftd>\n\u003Ctd>The network serving the number now\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>carrier.name\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Mobile country and network codes\u003C\u002Ftd>\n\u003Ctd>The E.212 pair naming that network\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>carrier.mcc\u003C\u002Fcode> and \u003Ccode>carrier.mnc\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Ported flag\u003C\u002Ftd>\n\u003Ctd>The number left the operator its range was assigned to\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>ported\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Line type\u003C\u002Ftd>\n\u003Ctd>Mobile, landline, VoIP and others, as the provider reports it\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>line_type\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Subscriber state\u003C\u002Ftd>\n\u003Ctd>Reachable, absent, roaming\u003C\u002Ftd>\n\u003Ctd>Not returned\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>At the live level the provider's line type replaces the plan's when the provider reports one. A US number that is \u003Ccode>fixed_line_or_mobile\u003C\u002Fcode> in plan data can come back \u003Ccode>mobile\u003C\u002Fcode>, because the network knows what the plan does not.\u003C\u002Fp>\n\u003Cp>Subscriber state deserves a warning. Where a route reports it, &quot;absent&quot; 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 &quot;the number is dead&quot; will reject real people. Qelka leaves it out on purpose and makes no promise about reachability.\u003C\u002Fp>\n\u003Ch2 id=\"what-it-cannot-do\">\u003Ca class=\"heading-link\" href=\"#what-it-cannot-do\">\u003Cspan>What it cannot do\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Identify the subscriber.\u003C\u002Fstrong> 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.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Prove possession.\u003C\u002Fstrong> 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.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Detect a SIM swap.\u003C\u002Fstrong> A swap changes the SIM, not the operator. The \u003Ccode>ported\u003C\u002Fcode> flag describes a move between operators. See \u003Ca href=\"\u002Fglossary\u002Fsim-swap\">SIM swap\u003C\u002Fa> for what protects against it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Work the same everywhere.\u003C\u002Fstrong> Networks differ in what they expose, and some routes give less detail. Treat a missing field as unknown, not as failure.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"plan-data-versus-network-data\">\u003Ca class=\"heading-link\" href=\"#plan-data-versus-network-data\">\u003Cspan>Plan data versus network data\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>The comparison below is the reason both levels exist. They answer different questions, and they differ in speed and price.\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>\u003C\u002Fth>\n\u003Cth>Basic level\u003C\u002Fth>\n\u003Cth>Live level\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Question\u003C\u002Ftd>\n\u003Ctd>Can this number exist, and what was its range for?\u003C\u002Ftd>\n\u003Ctd>Who serves this number today?\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Source\u003C\u002Ftd>\n\u003Ctd>Numbering plan data from Google's libphonenumber\u003C\u002Ftd>\n\u003Ctd>An upstream lookup provider, queried at call time\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Cost\u003C\u002Ftd>\n\u003Ctd>1 credit\u003C\u002Ftd>\n\u003Ctd>3 credits\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>carrier.name\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>The operator the range was originally assigned to, when named\u003C\u002Ftd>\n\u003Ctd>The operator serving the number now\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>carrier.mcc\u003C\u002Fcode>, \u003Ccode>carrier.mnc\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>null\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>The codes of the serving network\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>ported\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>null\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>true\u003C\u002Fcode> or \u003Ccode>false\u003C\u002Fcode>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Number leaves our systems\u003C\u002Ftd>\n\u003Ctd>No\u003C\u002Ftd>\n\u003Ctd>Yes, to the lookup provider\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>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 \u003Ca href=\"\u002Fdocs\u002Fdata-and-privacy\">data and privacy\u003C\u002Fa> lists who receives it. Only choose the live level when the answer is worth it.\u003C\u002Fp>\n\u003Ch2 id=\"when-the-network-answer-is-worth-paying-for\">\u003Ca class=\"heading-link\" href=\"#when-the-network-answer-is-worth-paying-for\">\u003Cspan>When the network answer is worth paying for\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Spend the extra credits where knowing the current operator changes an outcome.\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Routing and pricing messages.\u003C\u002Fstrong> Operators charge differently, and the serving network decides which route carries a text.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Reviewing a sensitive change.\u003C\u002Fstrong> 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.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Cleaning a list before a costly send.\u003C\u002Fstrong> A live pass over a list you are about to message by SMS removes numbers the network does not know.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Checking line type where the plan cannot.\u003C\u002Fstrong> In North America, the live provider's line type separates mobile from landline where the plan returns \u003Ccode>fixed_line_or_mobile\u003C\u002Fcode>.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>For a plain signup form, a basic check is enough, and it costs a fraction. Run it first, then escalate. \u003Ca href=\"\u002Fblog\u002Fphone-number-validation\">Phone number validation\u003C\u002Fa> shows the layers in order.\u003C\u002Fp>\n\u003Ch2 id=\"call-the-live-level\">\u003Ca class=\"heading-link\" href=\"#call-the-live-level\">\u003Cspan>Call the live level\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"code-block\" data-code-block>\u003Cdiv class=\"code-head\">\u003Cspan class=\"code-label\">bash\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cpre class=\"shiki shiki-themes github-light github-dark\" style=\"--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode class=\"language-bash\">\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">curl\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> https:\u002F\u002Fapi.qelka.com\u002Fv1\u002Fphone\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  -H\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> \"Authorization: Bearer \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">$API_KEY\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  -H\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> \"Content-Type: application\u002Fjson\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> \\\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">  -d\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\"> '{\"phone\": \"+14155550123\", \"level\": \"live\"}'\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdiv>\n\u003Cp>Read the fields that matter and leave the rest:\u003C\u002Fp>\n\u003Cdiv class=\"code-block\" data-code-block>\u003Cdiv class=\"code-head\">\u003Cspan class=\"code-label\">javascript\u003C\u002Fspan>\u003C\u002Fdiv>\u003Cpre class=\"shiki shiki-themes github-light github-dark\" style=\"--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode class=\"language-javascript\">\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> response\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> await\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> fetch\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'https:\u002F\u002Fapi.qelka.com\u002Fv1\u002Fphone'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  method: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'POST'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  headers: {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    Authorization: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">`Bearer ${\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">process\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">env\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">API_KEY\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">}`\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">    'Content-Type'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'application\u002Fjson'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  body: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">JSON\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">stringify\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">({ phone: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'+14155550123'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, level: \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'live'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> }),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  signal: AbortSignal.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">timeout\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\">10000\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">),\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">})\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (response.status \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">===\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> 502\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  console.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">log\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">'Provider unavailable, not billed: fall back to the basic result'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">} \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">else\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> if\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> (response.ok) {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">  const\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#005CC5;--shiki-dark:#79B8FF\"> result\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> =\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> await\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> response.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">json\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">  console.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">log\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(result.carrier.name, result.carrier.mcc, result.carrier.mnc, result.ported)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\u003C\u002Fdiv>\n\u003Cp>When the upstream provider fails, the API answers \u003Ccode>502 upstream_unavailable\u003C\u002Fcode> and bills nothing, so a fallback to the basic level is cheap. Results are cached for 7 days; pass \u003Ccode>&quot;fresh&quot;: true\u003C\u002Fcode> 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 \u003Ca href=\"\u002Fdocs\u002Fapi-reference\u002Fphone\">phone API reference\u003C\u002Fa>. The free \u003Ca href=\"\u002Ftools\u002Fcarrier-lookup\">carrier lookup\u003C\u002Fa> shows the carrier for any number.\u003C\u002Fp>\n\u003Ch2 id=\"a-decision-table\">\u003Ca class=\"heading-link\" href=\"#a-decision-table\">\u003Cspan>A decision table\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>You see\u003C\u002Fth>\n\u003Cth>Do\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>ported: true\u003C\u002Fcode>, carrier you expect\u003C\u002Ftd>\n\u003Ctd>Nothing: people change operator\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>ported: true\u003C\u002Fcode>, a new account, a recovery request and a fresh device\u003C\u002Ftd>\n\u003Ctd>Add a confirmation step\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>carrier.name\u003C\u002Fcode> is a VoIP provider and the flow needs a mobile phone\u003C\u002Ftd>\n\u003Ctd>Ask for a mobile number, or apply your VoIP policy\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>502 upstream_unavailable\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Use the basic result and retry later\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>line_type: &quot;mobile&quot;\u003C\u002Fcode> on a number that was \u003Ccode>fixed_line_or_mobile\u003C\u002Fcode> in plan data\u003C\u002Ftd>\n\u003Ctd>Accept it as a mobile number and send the SMS\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Ch2 id=\"where-to-go-next\">\u003Ca class=\"heading-link\" href=\"#where-to-go-next\">\u003Cspan>Where to go next\u003C\u002Fspan>\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fmobile-number-portability\">Mobile number portability\u003C\u002Fa> explains why the carrier in plan data goes stale.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fis-this-phone-number-real\">Is this phone number real?\u003C\u002Fa> puts the network answer next to the other checks.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fblog\u002Fsms-pumping-fraud\">SMS pumping fraud\u003C\u002Fa> shows why validating before sending a code matters.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fhelp\u002Fcheck-if-phone-number-is-active\">Check if a phone number is active\u003C\u002Fa> walks through the lookup step by step.\u003C\u002Fli>\n\u003C\u002Ful>\n",[11,15,18,21,24,27,30,33,36],{"id":12,"text":13,"depth":14},"what-the-register-is","What the register is",2,{"id":16,"text":17,"depth":14},"how-a-lookup-travels","How a lookup travels",{"id":19,"text":20,"depth":14},"what-a-network-lookup-can-return","What a network lookup can return",{"id":22,"text":23,"depth":14},"what-it-cannot-do","What it cannot do",{"id":25,"text":26,"depth":14},"plan-data-versus-network-data","Plan data versus network data",{"id":28,"text":29,"depth":14},"when-the-network-answer-is-worth-paying-for","When the network answer is worth paying for",{"id":31,"text":32,"depth":14},"call-the-live-level","Call the live level",{"id":34,"text":35,"depth":14},"a-decision-table","A decision table",{"id":37,"text":38,"depth":14},"where-to-go-next","Where to go next",[40,43,46,49,52,55],{"q":41,"a":42},"What does HLR stand for?","HLR stands for Home Location Register, the database in a GSM mobile network that holds each subscriber's profile and the network currently serving them. Later network generations use successor functions: the Home Subscriber Server in 4G and the Unified Data Management function in 5G. People still say HLR lookup for any query that reaches the operator's subscriber database.",{"q":44,"a":45},"Is an HLR lookup the same as phone number validation?","No. Validation checks the number against the national numbering plan: length, prefix and range. It is instant, runs locally and never touches the network. An HLR-style lookup asks a live network about the number, so it can see the current operator and porting. Validate first, and pay for the network query only where the answer changes what you do.",{"q":47,"a":48},"Does an HLR lookup send an SMS or ring the phone?","No. It is a signalling query between networks, not a call or a message. The phone does not ring and the owner is not notified. The result reflects what the network answered at that moment. Qelka's live level is a carrier and porting lookup that works the same way for the user: nothing is sent to the handset.",{"q":50,"a":51},"Can an HLR lookup tell me whether a phone is switched on?","Some routes report subscriber state, such as reachable, absent or roaming, but what comes back depends on the operator and the lookup provider, and an absent phone can look like a dead number. Do not treat it as proof. The Qelka API returns the current carrier, its mobile country and network codes and a \u003Ccode>ported\u003C\u002Fcode> flag, and makes no claim about reachability.",{"q":53,"a":54},"How accurate is an HLR lookup?","It is as accurate as the record the operator holds at the moment of the query, which makes it the best source for the current carrier and porting status. It cannot tell you who the subscriber is or whether the person typing the number owns it. Results also vary by country, because some networks answer such queries differently or not at all.",{"q":56,"a":57},"How much does a live phone lookup cost with Qelka?","A live lookup costs 3 credits, against 1 credit for a basic check against the numbering plan. If the upstream provider fails, the API answers \u003Ccode>502 upstream_unavailable\u003C\u002Fcode> and does not bill the call. The free plan includes 100 credits a month, and test keys never spend credits.","2026-11-24",15,1519,{},1795559739195]