IP Geolocation API

Returns the city, state and country for an IPv4 or IPv6 address. Authentication via API key.

Request

GET https://geoapi.charotartelelink.com/v1/lookup?ip=8.8.8.8
X-API-Key: YOUR_API_KEY

You can also send Authorization: Bearer YOUR_API_KEY. Several IPs: ?ip=8.8.8.8,1.1.1.1 (max 50).

Response

{
  "ip": "8.8.8.8",
  "city": "Mountain View",
  "state": "California",
  "country": "United States",
  "country_code": "US",
  "attribution": "IP geolocation by DB-IP.com (https://db-ip.com), CC BY 4.0"
}

Errors

HTTPerror
400missing_ip, invalid_ip, private_or_reserved_ip, too_many_ips
401missing_api_key, invalid_api_key
403tenant_suspended, ip_not_allowed
404not_found
429rate_limited, quota_exceeded