IP Address location

Free IP geolocation webservice

This is a free for finding IP address geo location. The database is very accurate and contains the following items as out:

  • Country (code/name)
  • Region (code/name)
  • City
  • Zip Code
  • Latitude
  • Longitude

Data is served in different formats, such as CSV, XML or JSON.

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]

Requests are simple REST URLs, allowing anyone to query from any language.
for example: in Asp.Net

XmlTextReader reader = new XmlTextReader(“http://freegeoip.appspot.com/xml/” +Request.ServerVariables[“REMOTE_ADDR”]);
reader.WhitespaceHandling = WhitespaceHandling.Significant;
string state = “”;
string city = “”;
if (reader.Name.ToString() == “RegionName”)
state = reader.ReadString().ToString();
if (reader.Name.ToString() == “City”)
city = reader.ReadString().ToString();
Data formats

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.


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″?>
<RegionName>Tamil Nadu</RegionName>

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:

“regioncode”:”TN”,”regionname”:”Tamil Nadu”,

*Note:-Latitude,Longitude are very useful for Map service.

Thank you,
Naga Harish.
Follow me on Twitter Naga harish

One thought on “IP Address location

  1. Sometimes it is showing this message.
    “This Google App Engine application is temporarily over its serving quota. Please try again later.”
    I hope, Freegeoip is developed by Google.

Leave a Reply