IP Locator API

This API provides geolocation of an IP address. By default, the lookup only returns IP Country.

Access to the API:

IP Country lookup is available for FREE. We may offer premium lookup including country, region, city, ISP, organization, latitude and longitude in the future.

API Endpoint:
https://api.iplocation.net/?ip=XX.XX.XX.XX
Or
https://api.iplocation.net/?cmd=ip-country&ip=XX.XX.XX.XX

Request parameters:

Name Required Description Default
key no No API key is required. -
format no Output format, the following formats are supported: plain xml json jsonp php csv serialized json
delimiter no Delimiter between proxies. Can be used only with format plain. The following types are supported: 1 for "\n", 2 for "<br>". 1
ip yes An IPv4 or IPv6 address that you would like to lookup. -

Response Parameters:

Name Description
ip IPv4 or IPv6 address used to lookup geolocation.
ip_number IP number in long integer.
ip_version IP version either 4 or 6.
country_name Full name of the IP country.
country_code2 ISO ALPHA-2 Country Code.
isp Internet Service Provider (ISP) who owns the IP address.
response_code Response status code to indicate success or failed completion of the API call.
response_message Response message to indicate success or failed completion of the API call.

Response Codes & Messages:

Name Message Description
200 OK Successfully processed the request.
400 Bad Request Failed to complete the request.
404 Not Found Command not found.

Example API Call

Example Request:
https://api.iplocation.net/?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"}

IP Location

Your IP    Hide my ip
IP Location   
ISP
Browser

Advertisement