positionstack turns addresses into coordinates and back again

A user hands you a typed address, something like 1600 Pennsylvania Avenue NW, Washington, DC, USA, and your application needs details that aren't in the string itself: the correct country code, the latitude and longitude, or the postal code.

positionstack is an API built for exactly that job.

The lookup runs in the other direction as well. Give the API a set of coordinates and it responds with information about what sits at that exact spot.

https://api.positionstack.com/v1/reverse
    ? access_key = YOUR_ACCESS_KEY
    & query = 40.7638435,-73.9729691
{
   "data": {
      "results": [
         {
            "latitude": 40.763841,
            "longitude": -73.972972,
            "label": "Apple Store, Manhattan, New York, NY, USA",   
            "name": "Apple Store",
            "type": "venue",
            "distance": 0,
            "number": "767",
            "street": "5th Avenue",
            "postal_code": "10153",
            "confidence": 1,
            "region": "New York",
            "region_code": "NY",
            "administrative_area": null,
            "neighbourhood": "Midtown East",
            "country": "United States",
            "country_code": "US",
            "map_url": "http://map.positionstack.com/40.763841,-73.972972",
         }
      ]
   }
}

The service comes from apilayer, a company that builds narrowly focused APIs for a range of developer tasks.

Direct Link →