Route tenants to the nearest region
API call → 54.93.x.x
country: Germany → route to EU region, keep data in-region
Send each request to the nearest region, the right backend, or the correct data boundary — from one lookup.
Where a request originates decides where it should go. One IP lookup gives you the country, EU status, and region to route tenants to the nearest infrastructure, keep data in-region, and pick the right backend — before your app does any real work.
The teams that lean on this most, in rough order of how often we see it.
Every one ships in the standard response — no add-ons, no tiers.
country / countryCode Pick the nearest region or data centre is_in_eu Keep EU traffic on EU infrastructure for residency region Finer routing within large markets timezone Schedule jobs and support in the user's local time continent Coarse first-hop routing decisions The same lookup, applied to how each team routes traffic.
API call → 54.93.x.x
country: Germany → route to EU region, keep data in-region
Playback → 13.35.x.x
country: Singapore → APAC origin selected for lower latency
Checkout → 99.239.x.x
country: Canada → NA payment + fulfilment stack
Search → 94.200.x.x
country: UAE → MEA inventory and pricing backend
import math
REGIONS = {"eu-west": (50.11, 8.68), "us-east": (38.0, -78.5),
"us-west": (45.8, -119.7), "ap-northeast": (35.69, 139.69)}
def haversine(a, b):
R = 6371
la1, lo1, la2, lo2 = map(math.radians, [a[0], a[1], b[0], b[1]])
h = math.sin((la2-la1)/2)**2 + math.cos(la1)*math.cos(la2)*math.sin((lo2-lo1)/2)**2
return 2 * R * math.asin(math.sqrt(h))
def nearest_region(data):
geo = data.get("geoLocation") or {}
lat, lon = geo.get("latitude"), geo.get("longitude")
if lat is None: return "default" # no coords -> fallback
return min(REGIONS, key=lambda r: haversine((lat, lon), REGIONS[r])) CDN and anycast routing handle static edge delivery. This use case is about application-level decisions — which region or data centre serves a tenant, where data is stored, which backend a checkout hits — based on the country and EU status in the response, resolved in your own code.
Yes. The country and is_in_eu fields let you keep EU users on EU infrastructure, or pin a tenant to a specific region, from the first request. It's a routing signal, not a legal guarantee — pair it with your storage and processing controls to meet residency obligations.
Yes. A lookup resolves server-side with a median response under 50ms, so it fits inline in routing logic without noticeable overhead, and results can be cached per session to avoid repeat calls.
Free tier: 2,000 lookups/day, no card. Paid plans from $2.50/month. One call per session, under 50ms median response.