• Subscribe to the low volume list for updates.

GeoIP – IP Location Lookup

Find the location of an IP address with this GeoIP lookup tool.


What is a GeoIP lookup?

IP Geolocation involves attempting to discover the location of an IP address in the real world. IP addresses are assigned to an organization, and these are ever-changing associations, it can be difficult to determine exactly where in the world an IP address is located.

Different services provide databases of this information for public use. Maxmind is one of the most well known. Its service is used for many things including fraud prevention. An example is, a merchant can use the IP location of a customer to cross-reference with Credit Card data to reduce credit card fraud.

Maxmind has a number of GeoIP databases and services, the commercial options are quite a bit more accurate than the freely available GeoIP lite version of the database especially for locations outside of the United States. The Maxmind API is relatively inexpensive so if you are interested in performing thousands of GeoIP lookups I recommend using that service directly. The tool I have built here s for ad-hoc lookups, when you are performing security testing or troubleshooting an issue. Note that the service is limited to 100 lookups a day (includes all IP Tools.

GeoIP API

This tool is built on a simple API that we have provided to the public. Signup or keys are not required at this stage. Simply query the API and get your results. The system is in beta at the moment and we make no guarantees about accuracy or service availability.

Using the GeoAPI is uncomplicated. Query the following URL with an IP address appended to the "q" parameter.

See below for an example. You could put this URL into a browser, use curl, or a scripting language such as php, python, or ruby to make the HTTP request.

curl https://api.hackertarget.com/geoip/?q=1.1.1.1

Mapping the Latitude and Longitude on a Google Map

Google has a range of mapping services. Here is a simple process to add those co-ordinates you get from the GeoIP API, or the tool above, to a Google map that is a static exportable image.

http://maps.googleapis.com/maps/api/staticmap?center=38.000000,-97.000000&zoom=5&size=400x400&sensor=false&markers=color:blue|38.000000,-97.000000

While this URL may look a little intimidating, it is really simple. The lat/long are placed at the center of the Google map and also to place the marker. The zoom will affect how much detail the map has, and the size is also pretty obvious. Try it. Grab a location by finding an IP address, paste the URL above into a browser, and swap out the co-ordinates.

The Google Static Map API site has all the details regarding the parameters and usage. It is a fast and easy way to whip up a map to add to a blog post, article, or website.

Have you seen our other Free IP and Network Testing tools.

Discover - Explore - Learn.

Next level testing with advanced Security Vulnerability Scanners.

Trusted tools. Hosted for easy access.