Geo-IP Lookup API

City, country or ASN information from any IP, with emoji flags.

What can you do?
Pin-point city & coordinates

Latitude, longitude, region and more in a single call.

Get ASN & ISP instantly

Discover the owner organisation of any IP block.

Emoji flags, time-zone & currency

Perfect for locale personalisation & analytics.

Try Live
99.9 % Uptime
Response
20 req/s
0.009 Credits / request

City Lookup


POST https://api.yeb.to/v1/geoip/city
ParameterTypeReq.Description
api_key string yes Your API key
ip string opt IPv4/IPv6 (defaults to caller IP)

Example

curl -X POST https://api.yeb.to/v1/geoip/city \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "YOUR_KEY",
  "ip": "8.8.8.8"
}'

Response Example

{
  "data": {
    "ip": "8.8.8.8",
    "hostname": "dns.google",
    "city": "Mountain View",
    "region": "California",
    "country": "US",
    "loc": "37.3860,-122.0840",
    "timezone": "America/Los_Angeles",
    "country_flag": "🇺🇸",
    "emoji": "🇺🇸"
  }
}
{"error":"GeoIP lookup failed: invalid IP","code":422}

Response Codes

CodeDescription
200 SuccessRequest processed OK.
400 Bad RequestInput validation failed.
401 UnauthorizedMissing / wrong API key.
403 ForbiddenKey inactive or not allowed.
429 Rate LimitToo many requests.
500 Server ErrorUnexpected failure.

Country Lookup


POST https://api.yeb.to/v1/geoip/country
ParameterTypeReq.Description
api_key string yes Your API key
ip string opt IPv4/IPv6 (defaults to caller IP)

Example

curl -X POST https://api.yeb.to/v1/geoip/country \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "YOUR_KEY",
  "ip": "1.1.1.1"
}'

Response Example

{
  "ip": "1.1.1.1",
  "country": "AU",
  "country_name": "Australia",
  "isEU": false,
  "country_flag": "🇦🇺",
  "continent": { "code": "OC", "name": "Oceania" }
}
{"error":"GeoIP lookup failed: private range","code":422}

Response Codes

CodeDescription
200 SuccessRequest processed OK.
400 Bad RequestInput validation failed.
401 UnauthorizedMissing / wrong API key.
403 ForbiddenKey inactive or not allowed.
429 Rate LimitToo many requests.
500 Server ErrorUnexpected failure.

ASN Lookup


POST https://api.yeb.to/v1/geoip/asn
ParameterTypeReq.Description
api_key string yes Your API key
ip string opt IPv4/IPv6 (defaults to caller IP)

Example

curl -X POST https://api.yeb.to/v1/geoip/asn \
  -H "Content-Type: application/json" \
  -d '{
  "api_key": "YOUR_KEY",
  "ip": "8.8.4.4"
}'

Response Example

{
  "ip":  "8.8.4.4",
  "org": "Google LLC",
  "asn": 15169,
  "network": "8.8.4.0/24"
}
{"error":"GeoIP lookup failed: database missing","code":422}

Response Codes

CodeDescription
200 SuccessRequest processed OK.
400 Bad RequestInput validation failed.
401 UnauthorizedMissing / wrong API key.
403 ForbiddenKey inactive or not allowed.
429 Rate LimitToo many requests.
500 Server ErrorUnexpected failure.

Frequently Asked Questions

MaxMind GeoLite2 data is typically accurate to city level for 65-70 % of IPv4 addresses worldwide.

Up to 5 requests / second per key. No daily or monthly caps – just pay as you go.

We operate on a credit system. Buy once – credits never expire and there are no subscriptions.

Every HTTP call is one request; each request consumes a number of credits depending on the endpoint.

Yes, they never expire until you spend them (but they are non-refundable).

Credits are non-refundable. Please buy only what you need – you can top-up any time.

Prices are set in credits, not dollars. Each endpoint lists its own cost – see the “Credits / request” badge above.
← Back to APIs