Skip to content

Detecting a mobile carrier from an IP address

4 min read API guides

mobile carrier lookup

A mobile carrier lookup maps an address to the operator that owns the mobile range. A mobile carrier lookup starts from one fact: mobile traffic often arrives through a carrier gateway, so the address belongs to the operator rather than the handset. The lookup can tell you which network the request came from and whether the address is mobile at all.

The Carrier detection endpoint matches an address against a mobile carrier database and returns an operator name when it finds a match.

curl "https://api2.globus.studio/v2/carrier?ip=8.8.8.8&format=json"

What a mobile carrier lookup returns

A mobile carrier lookup response has an operator field. When the address is not in a mobile range, the value is undefined. That is a normal answer, not an error. A desktop connection or a data center address will usually return the same value.

When it helps

A mobile carrier lookup can decide whether a storefront offers carrier billing. Offer it only when the network supports it. A fraud check can treat a mobile address differently from a data center address. A support tool can route a request to the right team when the user cannot read a verification code.

The lookup is not a location service. The carrier gateway can be in another city or country. Use the geolocation endpoint for country and city, and the carrier result for the network.

Combine it with other checks

A mobile address from a carrier plus a matching country is a normal pattern. A mobile address from a carrier that does not operate in the user’s country is worth a second look. A request that claims to be a mobile browser but comes from a hosting range is another mismatch.

Keep the decision proportional. A mismatch can trigger a challenge or a manual review. It should not block an account by itself.

Data and limits

The database covers the major mobile ranges that we can identify. Smaller operators and new allocations may be missing. A mobile carrier lookup that returns undefined is still a useful answer: it means the address is not in a known mobile range, so a carrier billing option should stay hidden. The endpoint is fast and rate limited like the other cheap calls. Cache the result per address for a day if you call it often.

Read the endpoint documentation for the parameter list and response examples.

Carrier-grade NAT

Mobile networks often put many users behind one address. The address identifies the gateway, not the handset. Two requests from the same address can come from different people in different cities. Treat the carrier result as a property of the network path.

That also means a mobile address can change between requests. A mobile carrier lookup reports the gateway, not the handset, so two users can share the answer. Do not bind a session to a mobile address without a fallback. Use a cookie or a token for identity, and the address for risk signals.

In a signup flow

A carrier lookup can decide whether to offer a carrier billing option. Call it after the user enters a phone number, not on every page view. Cache the result for the session. If the operator is unknown, hide the option instead of showing a method that will fail.

$carrier = json_decode(file_get_contents(
    'https://api2.globus.studio/v2/carrier?ip=' . urlencode($ip) . '&format=json'
), true);
$mobile = ($carrier['operator'] ?? 'undefined') !== 'undefined';

Roaming and VPNs

A roaming phone can appear on a visited network. A VPN on a phone can hide the carrier entirely. The lookup reports the network that owns the address, which may be neither the home carrier nor the user’s country. Treat a missing operator as a normal result.

For a carrier billing offer, ask the payment provider whether the number is eligible. The IP lookup is a hint, not an authorization.

Related reading

A mobile carrier lookup answers a narrower question than geolocation: which network owns the address, not where the person is. The geolocation guide covers country and city accuracy. If you need to separate a phone from a data center, pair the carrier result with IP bot detection.

Further reading: ITU-T E.212 mobile network codes.

Custom work

Need an API that does not exist yet?

Describe the task and the response format. We will estimate the endpoint, the integration and the maintenance.

Start a conversation