IP Geolocation Lookup & Free API
What is an IP to Geolocation Lookup?
IP Geo-location involves attempting to discover the location of an IP address in the real world. IP addresses are assigned to an organization, and as these are ever-changing associations, it can be difficult to determine exactly where in the world an IP address is located.
Different services maintain datasets of this information for public use. MaxMind is one of the most well known. Its service commercial service known as GeoIP, is used for many things including fraud prevention. As an example, a merchant can use the IP location of a customer to cross-reference with Credit Card data to reduce credit card fraud.
This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com.
MaxMind has a number of products under the GeoIP brand. The commercial options are more accurate than the GeoLite2 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 IP to Geolocation queries I recommend using that service directly. The service hosted here is primarily for ad-hoc lookups, useful for quickly performing security testing or troubleshooting an issue. Note that the Free service is limited to 100 lookups a day (includes all IP Tools).
For those wishing to perform a large number of Geo IP location queries take a look at the MaxMind products, either download the Free GeoLite2 database or sign up for the commercial GeoIP service.
IP Geolocation API
This tool is built on a simple API that we provide to the community. Signup or keys are not required. Simply query the API and get the results in simple plain text. The system is especially targeted to those wishing to query an IP address location from the command line using something as simple as curl
.
Query the following API endpoint with an IP address appended using 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.
Mapping the Latitude and Longitude on a Google Map
Google has a range of mapping services. Here is a simple process to add the co-ordinates you get from the Geolocation API, 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 quite 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 obvious. Try it. Grab a location from 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.
Remove limits with a full membership
More info available