LRN lookup API
LRN lookup API: routing number and porting status for US and Canadian numbers
An LRN (Local Routing Number) is the 10-digit number that identifies the switch serving a phone
number. When a number is ported to another carrier, calls and texts are routed on its LRN, not
on its own digits. The CheckThatPhone LRN lookup API returns that routing number for any US or
Canadian number as dipLrn, together with dipPorted,
dipOcn, dipCarrier, dipCarrierType and
dipCarrierSubType, from a live carrier dip at lookup time.
The FCC's number portability orders call it the location routing number: each central office
switch is assigned a unique 10-digit number that "serves as a network address" for routing
(FCC 97-289, para. 8). Number portability itself is
the ability to keep your number when you switch carriers at the same location
(47 CFR 52.21). One POST /v1/lookup
call costs one credit, and the Free plan includes 500 lookups a month.
Want the carrier name for display, filtering or line type? The carrier lookup API page covers which carrier serves a number. This page is about the routing side of the same lookup: the LRN, the ported flag and the OCN.
Fields an LRN lookup returns
A lookup returns these routing fields. Values are strings, including booleans.
| Field | Example | Meaning |
|---|---|---|
dip | "success" | Status of the live carrier dip: "success", "error" or "invalid". Read the fields below only when it is "success"; otherwise they can be missing. |
dipLrn | "4695550198" | Local Routing Number: the number actually used for call and SMS routing. For a number that hasn't been ported it matches the number itself. |
dipPorted | "true" | "true" when dipLrn differs from the number, the standard industry method for detecting that a number has moved to a different carrier than it was originally assigned to. |
dipOcn | "6529" | Operating Company Number: the code that identifies the carrier currently operating the number. |
dipCarrier | "T-Mobile" | Name of the carrier serving the number now, from the live carrier dip. |
dipCarrierType | "mobile" | Broad carrier type: "mobile", "landline", "invalid" or "undefined". |
dipCarrierSubType | "PCS" | Sub-classification such as WIRELESS or PCS (mobile), ILEC, RBOC or CLEC (wireline) and IPES (VoIP). The docs list every code. |
Ported vs original carrier
Phone numbers are handed to carriers in blocks, by area code and prefix (the NPA-NXX). A prefix table can tell you which carrier a block was assigned to, and an area code tells you where the number was issued: see the area code directory. Neither tells you who serves the number today. When a subscriber ports, the number keeps its area code and prefix and moves to a new carrier, so any answer built on the digits alone still points at the original block holder.
The live carrier dip reads current routing data instead. For a ported number,
dipLrn holds the routing number of the new carrier's switch,
dipPorted is "true", and dipCarrier and
dipOcn name the carrier the number moved to. The numbering-plan view is in
nanpCarrier, which the docs flag as not authoritative after a port: prefer
dipCarrier. The carrier lookup API page goes
deeper on the carrier fields.
Example request and response
Send the number in any common format.
curl --request POST \
--url 'https://api.checkthatphone.com/v1/lookup' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"phone": "469-555-0163"}'
An illustrative response for a ported mobile number (a fictional 555 number; field names and
formats match the live API). dipLrn differs from subscriber, so
dipPorted is "true":
{
"success": true,
"credits_used": 1,
"data": {
"subscriber": "4695550163",
"optDate": "2026-10-08T16:21:09.514Z",
"action": "send",
"deliverable": "true",
"nanpType": "mobile",
"blackList": "false",
"dip": "success",
"dipLrn": "4695550198",
"dipPorted": "true",
"dipOcn": "6529",
"dipCarrierSubType": "PCS",
"dipCarrier": "T-Mobile",
"dipCarrierType": "mobile",
"geoState": "TX",
"geoCity": "dallas",
"geoCountry": "US",
"timezone": "America/Chicago",
"tzOffset": 6,
"geoSource": "area-code",
"error": "false",
"smsEligible": "true"
}
} credits_used: 1 is the whole cost of this call. The same fields come back from the
official Node.js and Python SDKs and in every row of a
bulk CSV upload.
What teams use LRN and porting data for
- SMS and voice routing. If you pick a route or a carrier connection per
destination, you need the network that serves the number now.
dipLrnidentifies the serving switch anddipOcnthe carrier, so a ported number goes to its new network instead of the one its prefix suggests. - Least-cost routing and rating. Voice rate decks are often keyed by NPA-NXX. Rating a ported number on its own digits prices the call as if it ended on the original carrier's network; rating on its LRN prices it by the switch that will actually take it.
- Fraud signals from porting. Porting is common and usually innocent (people
change carriers), so treat
dipPorted: "true"as one input, not a verdict. It carries more weight stacked with other signals, such as a VoIP carrier (dipCarrierSubType: "IPES") on a brand-new account. StoringdipCarrieranddipOcnat signup and re-checking on a sensitive action shows whether the number has changed carriers since you last looked. KYC phone verification walks through it. - Keeping carrier records current. Re-checking a list on a schedule catches numbers that moved carriers since they were collected. Upload a CSV to validate a whole list.
Limits worth knowing
- No porting date or history. You get the current routing number, carrier and ported flag. We don't return when a number was ported or which carriers it passed through.
- No SIM-swap detection. A SIM swap normally keeps the number on the same carrier, so the LRN and carrier don't change.
- Porting is not reassignment. A ported number usually still belongs to the same person; a reassigned one belongs to someone new. A lookup can't tell you who holds a number. For recent carrier deactivations, see the disconnected number check.
- US and Canada only. NANP numbers. For other countries, use a global provider.
Pricing
LRN and porting data are part of every lookup: one credit, no separate fee. The Free plan has 500 lookups a month, hard-capped. Paid plans are $5 for 1,000, $30 for 10,000, $100 for 100,000 and $450 for 500,000 lookups a month, with overage from $0.005 down to $0.0009 per lookup. Failed lookups are free. See pricing.
LRN lookup: common questions
What is an LRN lookup?
A query, sometimes called a number portability lookup, that returns the Local Routing Number (LRN) for a phone number: the 10-digit number of the switch that serves it, which is what calls and texts to a ported number are routed on. A CheckThatPhone lookup returns it as dipLrn, together with dipPorted, dipOcn, dipCarrier, dipCarrierType and dipCarrierSubType, from a live carrier dip.
How do I know if a number has been ported?
Read dipPorted. It is "true" when dipLrn differs from the number itself, the standard way to detect a port, and dipCarrier and dipOcn then name the carrier the number moved to. Values are strings, so compare against "true", not a boolean.
Does the LRN lookup work for Canadian numbers?
Yes. The API accepts US and Canadian (NANP) numbers in any common format: 10 digits, or 11 digits starting with 1. Every lookup runs the same live carrier dip. Numbers outside North America are not supported.
Does it show when a number was ported, or whether its SIM was swapped?
No. A lookup returns the current state only: today's routing number, carrier and ported flag. There is no porting date, no port history and no SIM-swap signal. A SIM swap usually keeps the number on the same carrier, so carrier data doesn't change.
What is the difference between dipLrn and dipOcn?
dipLrn is a routing number: the 10-digit address of the switch that serves the number. dipOcn is the Operating Company Number, the code that identifies the carrier operating the number. Use the first for routing and the second for carrier-level rules.
How much does an LRN lookup cost?
One credit, and the same call also returns line type, deliverability and location. The Free plan includes 500 lookups a month, hard-capped; paid plans start at $5 a month for 1,000 lookups. Failed lookups are not billed. See pricing.
Related
- Field reference: carrier dip fields in the docs
- Which carrier: Carrier lookup API
- Mobile, landline or VoIP: Line type lookup API
- Recent disconnections: Disconnected number check API
- Background: What is a carrier lookup?
- Background: The North American Numbering Plan
- Fraud scoring: Vetting inbound leads: the phone signals that flag obvious fraud