cURL
curl --request GET \ --url https://api.ip2geo.dev/convert \ --header 'x-api-key: <api-key>'
{ "success": true, "message": "<string>", "code": 123, "_req": { "reqId": "<string>", "resTime": 123 }, "data": { "ip": "<string>", "type": "ipv4", "is_eu": true, "continent": { "name": "<string>", "code": "<string>", "country": { "name": "<string>", "code": "<string>", "phone_code": "<string>", "capital": "<string>", "tld": "<string>", "city": { "name": "<string>", "latitude": 123, "longitude": 123, "postal_code": "<string>", "timezone": { "name": "<string>", "time_now": "<string>" } }, "flag": { "img": "<string>", "emoji": "<string>", "emoji_unicode": "<string>" }, "currency": { "name": "<string>", "code": "<string>", "symbol": "<string>" } } }, "asn": { "number": 123, "name": "<string>" }, "completion_time": { "miliseconds": 123, "seconds": 123 } } }
This http method allows you to convert a single IP address into its corresponding geolocation data.
Use your Ip2Geo API key here. Example: x-api-key: sk_live_abc123
x-api-key: sk_live_abc123
IPv4 or IPv6 address to lookup
Successful geolocation lookup
Whether the request was successful
Response message
HTTP status code
Show child attributes