Important Notice We have teamed up with ipstack.com to offer an even better IP Intelligence API.
To continue using the free iplocate service, please click the button on the rightbelow.Keep using the Free API

iplocate API Guide

Our API provides IP related information using a REST interface that returns the following data:

  • hostname
  • owner
  • continent name, continent code
  • country name, country code
  • region name, region code
  • county name
  • city name
  • latitude, longitude
  • timezone
  • official language
  • currency


Calling the iplocate API is easy and intuitive. Make the request by appending valid parameters for your query:


the parameters can be specified in any order inside URL


Parameter Required Default Value Description
ip no client IP address IP address
key yes empty API key provided for registered application
output no xml specifies the format for responses: xml, json, raw
timezone no false specifies the timezone for responses: true, false
hostname no false specifies the hostname for responses: true, false
language no false specifies the official language for responses: true, false
currency no false specifies the currency for responses: true, false

In order to obtain a valid API key for your application or website, please register for a iplocate user account.


Element Description
ip referenced IP address
hostname hostname of the supplied IP address
owner owner of the suplied IP address
continent_name continent name
continent_code continent code
country_name ISO-3166 country name
country_code ISO-3166 two-letter country code
region_name region name
region_code region code
county_name county name
city_name city name
latitude latitude of the identified location, with positive numbers representing North and negative numbers representing South
longitude longitude of the identified location, with positive numbers representing East and negative numbers representing West
timezone timezone

By default, iplocate API sends responses in structured XML data format. You can also request the response in JSON data format or plain text (RAW).

Sample XML Response

<status>Propper Request</status>
<notes>The following results has been returned</notes>
<continent_name>NORTH AMERICA</continent_name>
<country_name>UNITED STATES</country_name>
<county_name>SANTA CLARA</county_name>
<city_name>MOUNTAIN VIEW</city_name>
<currency_name>US DOLLAR</currency_name>

Sample JSON Response

"response": {
"status": "Propper Request",
"message": "Success",
"notes": "The following results has been returned",
"code": "200_1",
"location": {
"ip": "",
"continent_name": "NORTH AMERICA",
"continent_code": "NA",
"country_name": "UNITED STATES",
"country_code": "US",
"region_name": "CALIFORNIA",
"region_code": "CA",
"county_name": "SANTA CLARA",
"city_name": "MOUNTAIN VIEW",
"latitude": "37.3801",
"longitude": "-122.0865",
"timezone": "PST"
"languages": {
"language": [
"alpha2_code": "EN",
"alpha3_code": "ENG",
"language_name": "ENGLISH",
"native_name": "ENGLISH"
"currencies": {
"currency": [
"alpha_code": "USD",
"numeric_code": "840",
"currency_name": "US DOLLAR",
"currency_symbol": "$",
"fractional_unit": "CENT"
"unit_test": {
"elapsed_time": "0.0609",
"memory_usage": "0.76MB"

Sample RAW Response

Propper Request,Success,The following results has been returned,200_1,,LEVEL 3 COMMUNICATIONS INC,NORTH AMERICA,NA,UNITED STATES,US,CALIFORNIA,CA,SANTA CLARA,MOUNTAIN VIEW,37.3801,-122.0865,PST, languages,1,EN,ENG,ENGLISH,ENGLISH, currencies,1,USD,840,US DOLLAR,$,CENT, unit_test,0.609,0.76MB

Code Status Message Description
200_1 Propper Request Success The following results has been returned.
200_2 Propper Request Not Found No result set has been returned.

Error Messages

If a request fails, the iplocate API returns an error message. By default, the message is returned as structured XML, but JSON and RAW messages are also available.


Code Status Message Description
400_1 Bad Request Error in the URI The API call should include an API key parameter.
400_2 Bad Request Error in the URI The API call should include a valid IP address.
403_1 Forbidden Not Authorized The API key associated with your request was not recognized.
403_2 Forbidden Account Inactive The API key has not been approved or has been disabled.
403_3 Forbidden Limit Exceeded The service you have requested is over capacity.


Contact us

Want to know more about iplocate and its services? For more information, please contact us using the following email address: .