City, country or ASN information from any IP, with emoji flags.
Latitude, longitude, region and more in a single call.
Discover the owner organisation of any IP block.
Perfect for locale personalisation & analytics.
POST https://api.yeb.to/v1/geoip/city
Parameter | Type | Req. | Description |
---|---|---|---|
api_key |
string | yes | Your API key |
ip |
string | opt | IPv4/IPv6 (defaults to caller IP) |
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"
}'
{
"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}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |
POST https://api.yeb.to/v1/geoip/country
Parameter | Type | Req. | Description |
---|---|---|---|
api_key |
string | yes | Your API key |
ip |
string | opt | IPv4/IPv6 (defaults to caller IP) |
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"
}'
{
"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}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |
POST https://api.yeb.to/v1/geoip/asn
Parameter | Type | Req. | Description |
---|---|---|---|
api_key |
string | yes | Your API key |
ip |
string | opt | IPv4/IPv6 (defaults to caller IP) |
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"
}'
{
"ip": "8.8.4.4",
"org": "Google LLC",
"asn": 15169,
"network": "8.8.4.0/24"
}
{"error":"GeoIP lookup failed: database missing","code":422}
Code | Description |
---|---|
200 Success | Request processed OK. |
400 Bad Request | Input validation failed. |
401 Unauthorized | Missing / wrong API key. |
403 Forbidden | Key inactive or not allowed. |
429 Rate Limit | Too many requests. |
500 Server Error | Unexpected failure. |