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: Ashburn
Region: Virginia
County:
Latitude: 39.0437200
Longitude: -77.4874900
Distance (miles): 0.27
Distance (km): 0.43
Direction (degrees) 168.79
Direction (heading) S
2:
Place: Dulles Town Center
Region: Virginia
County:
Latitude: 39.0376100
Longitude: -77.4158200
Distance (miles): 4.05
Distance (km): 6.51
Direction (degrees) 116.84
Direction (heading) ESE
3:
Place: Sterling
Region: Virginia
County:
Latitude: 39.0062200
Longitude: -77.4286000
Distance (miles): 4.34
Distance (km): 6.99
Direction (degrees) 158.2
Direction (heading) SSE
4:
Place: Herndon
Region: Virginia
County:
Latitude: 38.9695500
Longitude: -77.3861000
Distance (miles): 7.74
Distance (km): 12.45
Direction (degrees) 157.88
Direction (heading) SSE
5:
Place: Poolesville
Region: Maryland
County:
Latitude: 39.1459400
Longitude: -77.4169300
Distance (miles): 7.89
Distance (km): 12.7
Direction (degrees) 5.22
Direction (heading)






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 - 2024 geoPlugin® is a registered trademark of GEOPLUGIN, SAS