MaxMind
Support My Account FAQ My Order
Support My Account FAQ My Order

Apache Module
C
C# Class
Java Class
MS COM Object
Pascal
Perl Module
PHP Module
Python Class
Ruby Module
VB.Net
Support Center


GeoIP JavaScript Web Service

GeoIP JavaScript is a service offered by MaxMind to return the Country, Region, City, Latitude, and Longitude for your web visitors.

It uses JavaScript, is easy to program and works on both static and dynamically served web pages.

If you only need to display the country, please use our GeoIP Country JavaScript service.

In order to use this JavaScript on your website, a link back to the www.maxmind.com website should be provided, or a JavaScript attribution-free license can be purchased for $250/year.

Example:
Country Code:
Country Name:
Region:
Region Name:
City:
Postal Code:
Latitude:
Longitude:

Source code:

<script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script>

<br>Country Code:
<script language="JavaScript">document.write(geoip_country_code());</script>
<br>Country Name:
<script language="JavaScript">document.write(geoip_country_name());</script>
<br>City:
<script language="JavaScript">document.write(geoip_city());</script>
<br>Region:
<script language="JavaScript">document.write(geoip_region());</script>
<br>Region Name:
<script language="JavaScript">document.write(geoip_region_name());</script>
<br>Latitude:
<script language="JavaScript">document.write(geoip_latitude());</script>
<br>Longitude:
<script language="JavaScript">document.write(geoip_longitude());</script>
<br>Postal Code:
<script language="JavaScript">document.write(geoip_postal_code());</script>

Mailing List:
If you use the code on your website, please sign up for our JavaScript mailing list. This is a low-volume mailing list with announcements regarding any new features or API changes.

E-mail:

The uptime for the JavaScript service is about 99.95%.

Rick Winscot has created an ActionScript wrapper for this service which facilitates usage with Flash.


MaxMind, GeoIP, minFraud and related marks are registered trademarks of MaxMind, Inc.
Copyright© 2012 MaxMind, Inc. All Rights Reserved. Terms of use.