Thanks to visit codestin.com
Credit goes to old.geoplugin.com

geoPlugin API is no longer available for free use. To continue access, please upgrade to a paid plan at geoplugin.com/subscription

geoPlugin Home


IP Geolocation Web Service APIs


We offer a number of different free geolocation web service APIs to allow you to efficiently localize your visitors1) and pull up vital information on them.

The APIs we offer allow a great deal of flexibility in how you use them, either in your back-end scripts or front-end HTML pages.

The services are based either on:


They all return the same data, just presented in a different way to make your programming life easier! If you require the data presented in a way that we don't currently offer, please drop us a line and we'll do our best to incorporate it.

The geolocalised data that is returned by these services gives you all you need to know about your visitor. You can be as creative as you want with this information! You are probably a lot more creative than us, but have a look at our example page to get some basic ideas.

The data on your visitor returned to you by all of the web services shows their:



Use of any of our web services implies agreement to our Privacy Policy and User Agreement


IP Geolocation accuracy

IP geolocation is a reliable method to geolocate an IP to a country. However, geolocation to the correct city may be less reliable for certain IPs, like those distributed by mobile operators.

To give an indication of the reliability of the geolocalised IP address, all IP geolocation calls to geoplugin.net will contain a variable geoplugin_locationAccuracyRadius that contains an estimation (in miles) of the radius of the geolocalised city.



Nearby Places

In addition to the IP geolocation web service, there is also a reverse IP geocoding web service API that will find nearby places based on latitude/longitude coordinates.
So, once you've geolocalized your webvisitor, that gives you their latitude/longitude coordinates, you can find places nearby (within a 10km radius).
This webservice can give data ready for use in PHP scripts (default), JSON, or XML languages.

Query this service using the following URL:

http://www.geoplugin.net/extras/nearby.gp?lat=XXX&long=YYY&output=ZZZ

Where

  • XXX = latitude coordinate
  • YYY = longitude coordinate
  • ZZZ = how the data should be output. Accepted values are:
    1. php (default)
    2. json
    3. xml


Nearby places to you include:


1:
Place: Holborn
Region: England
County:
Latitude: 51.5175300
Longitude: -0.1204500
Distance (miles): 0.72
Distance (km): 1.17
Direction (degrees) 13.71
Direction (heading) NNE
2:
Place: Mayfair
Region: England
County:
Latitude: 51.5095400
Longitude: -0.1490000
Distance (miles): 0.92
Distance (km): 1.48
Direction (degrees) 77.5
Direction (heading) ENE
3:
Place: Victoria
Region: England
County:
Latitude: 51.4962400
Longitude: -0.1440200
Distance (miles): 1.08
Distance (km): 1.73
Direction (degrees) 155.41
Direction (heading) SSE
4:
Place: Saint Marylebone
Region: England
County:
Latitude: 51.5000000
Longitude: -0.1500000
Distance (miles): 1.11
Distance (km): 1.78
Direction (degrees) 137.6
Direction (heading) SE
5:
Place: Clerkenwell
Region: England
County:
Latitude: 51.5243800
Longitude: -0.1102200
Distance (miles): 1.36
Distance (km): 2.18
Direction (degrees) 18.29
Direction (heading) NNE






See also

1) This product includes GeoLite data created by MaxMind, available from http://maxmind.com/
 
 


Acceptable Use Policy    Privacy Policy and User Agreement    Contact geoPlugin


©2006 - 2026 geoPlugin® is a registered trademark of GEOPLUGIN, SAS