free IP geolocation webservice
free IP geolocation webservice
It’s easy: you send an HTTP request to our service, and the service replies with all the information about an IP address in the format of your choice!
Currently supported formats are:
➡CSV: http://freegeoip.appspot.com/csv/ip-address
➡XML: http://freegeoip.appspot.com/xml/ip-address
➡JSON: http://freegeoip.appspot.com/json/ip-address
After selecting the format, you put the IP address you’re looking for, like this:
http://freegeoip.appspot.com/xml/72.14.247.141
This will return all the information related to the IP address 72.14.247.141, or a failure code. The failure code will always respect the chosen data format.
Data formats
Text data is always encoded as UTF-8.
➡CSV
The Comma Separated Values format will always return 10 columns in a single line, like this:
status,ip,countrycode,countryname, \
regioncode,regionname,city,zipcode, \
latitude,longitude
The data in the first two columns will always be present. Status can be either true or false, and must be used to determine the success or failure of the query.
➡XML
The Extensible Markup Language format will always return the same document structure, with a Status node containing either true or false, used to determine the success or failure of a query.
Here is an example of the reply:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Status>true</Status>
<Ip>x.x.x.x</Ip>
<CountryCode>BR</CountryCode>
<CountryName>Brazil</CountryName>
<RegionCode>27</RegionCode>
<RegionName>Sao Paulo</RegionName>
<City>São Paulo</City>
<ZipCode></ZipCode>
<Latitude>-23.5333</Latitude>
<Longitude>-46.6167</Longitude>
</Response>
➡JSON
The JavaScript Object Notation is also available, and is the preferred method for retrieving the results.
The status key can be either true or false and is used to determine the success or failure of a query:
{"status":true,"ip":"x.x.x.x",
"countrycode":"BR","countryname":"Brazil",
"regioncode":"27","regionname":"Sao Paulo",
"city":"São Paulo","zipcode":"",
"latitude":-23.5333,"longitude":-46.6167}
This is a free tool for finding IP address geo location. The database is very accurate and contains the following items:
• Country (code/name)
• Region (code/name)
• City
• Zip Code
• Latitude
• Longitude
Data is served in different formats, such as CSV, XML or JSON.
Requests are simple REST URLs, allowing anyone to query from any language, or even small scripts using tools like wget or curl.
see also:
free web-segmentation tool that allows sites to create user clusters based on their behavior
my blog, featuring interesting tech articles and code snippets (portuguese and python)
this webservice is currently using Marc’s geolocation database.
How to use it