The GeoIP2 JavaScript API enables companies to customize their websites to include the users' geographical information by using a JavaScript function to return the location of their website visitors. The API includes W3C Geolocation functionality, which allows website visitors to share their location through their browser. The GeoIP2 JavaScript API returns the most accurate location, the shared location or IP geolocation.
Why use the GeoIP2 JavaScript API over W3C geolocation alone?
There are two advantages to using the GeoIP2 JavaScript API over using W3C geolocation:
- The API gives you the power of MaxMind's GeoIP2 data and W3C geolocation in one integration. GeoIP2 data is strong for non-mobile connections and W3C geolocation is strong on mobile devices.
- Your site visitors may not want to share their location or may take a long time to make their decision. In these cases, the API allows you to fall back on GeoIP2 data.
The API is easy to integrate and may be used freely with attribution. Technical details about the API are available on the developers website.
Free Service with Attribution
Free use of the GeoIP2 JavaScript API is allowed, if the following link is included on your website. Free users will receive city-level data returned by the GeoIP2 City Web Service and are required to use the W3C Geolocation feature.
This website uses <a href="http://www.maxmind.com/en/javascript">GeoIP2 JavaScript from MaxMind</a>.
Benefits of Purchasing GeoIP2 Web Service Lookups
Paying users of MaxMind's GeoIP2 Web Services may use GeoIP2 and GeoIP Legacy JavaScript APIs without attribution and have the option of disabling W3C geolocation functionality within the GeoIP2 JavaScript API.
While free users may access GeoIP2 City or Country data, paying users may additionally use their GeoIP2 Omni and City/ISP/Organization lookups with the GeoIP2 JavaScript API.
The GeoIP2 JavaScript API may be used on multiple domains. After your order is processed, you will be required to enter the domains the license will cover in your MaxMind account.