Using the IP Addresses database - IP Address Lookup

If you're going to be doing a lot of Geotargeting or IP Address Lookups, please take a feed instead which will preserve both our bandwidth and your bandwidth.

Alternatively, you can support us and Download a High-Accuracy Version.
Your IP Address:

... actually we haven't a clue.
IP found in 0.004 seconds

Is this wrong? Make a correction
or Download a High-Accuracy Version

Are you a host? Netblock upload

Simple GET

That said, there is an easy HTTP oriented API to locate IP addresses and Geocode them. If you don't supply the "?" bit, then the ip address lookup of the calling machine will be located instead (here, the aa,bb,cc,dd are decimal digits). If you add &position=true to the end of the URL then latitude and longitude will be returned also. Both HTML and XML formats are supplied for your convenience.
  City: Sugar Grove, IL
  City: Sugar Grove, IL
  Latitude: 41.7696
  Longitude: -88.4588
  {"country_name":"UNITED STATES","country_code":"US","city":"Sugar Grove, IL","ip":""}
  [use the URL above for an example - XML too long to paste below]

Country Flag

Paste the following code into your HTML to get a country flag of the ip address. The database is significantly more accurate (it ought to be 100%) for countries than for cities. It would be nice if y'all would make the flag a link to the home page ( so they can come by if they're interested - it'll only benefit you in the long run. After all, the results get more accurate as more visitors submit their IP addresses!

Flag of visitor's location:
<A HREF="">
 <IMG SRC="" BORDER="0" ALT="IP Address Lookup">
Flag of any IP address:
<A HREF="">
 <IMG SRC="" ALT="IP Address Lookup">

*NIX Shell Script

You can use the following shell script to call in your favorite *NIX environment.
 #!/bin/tcsh -f
lynx -dump "$1"

Testing your API calls

If you're looking to test your API calls through various, worldwide IP addresses you can try a proxy service like Simply configure your browser to use the proxy and your IP address will appear as the proxy's instead of your own.

Commercial Geodatabase

MaxMind - If you're looking for a commercial option, this database maintains a great level of accuracy.