IP Location.net API site

API V1

IP Country Command

Return country-level IP location data through the legacy command interface.

GET /?cmd=ip-country&ip=8.8.8.8

Parameters

Name Required Description
cmd Yes Use ip-country.
ip Yes IPv4 or IPv6 address to look up.
format No Optional response format: json plain xml jsonp php csv serialized.

Example Request

https://api.iplocation.net/?cmd=ip-country&ip=8.8.8.8

Example Response

{
    "ip": "8.8.8.8",
    "ip_number": "134744072",
    "ip_version": 4,
    "country_name": "United States of America",
    "country_code2": "US",
    "isp": "Google LLC",
    "response_code": "200",
    "response_message": "OK"
}