Geocoding is the process of taking input text, such as an address or the name of a place and returning a latitude/longitude location on the Earth's surface for that place.
PositionStack is a REST API that offers forward and reverse geocoding, covering more than 2 billion places and addresses worldwide. You can use this API and embed maps in your application to show their exact location. This will be useful for many businesses e.g., e-commerce, shipping etc. Even it will allow you to know about your users to meet some specific needs based on their location.
PositionStack API Features:
Real-time geocoding: Geocode any global address or set of coordinates in real-time and lookup location components, country, and timezone data.
Batch Geocoding Requests: Allows you to send batch requests to get multiple geocoding requests to the API at once.
Multi-language: Translate the result to your preferred language by specifying the 2-letter (e.g. en) or the 3-letter code (e.g. eng) of the language.
Embeddable map URLs: Provides an embeddable map associated with the location result.
Result formats: API responses can be in JSON, XML, JSONP or GeoJSON formats.
Fast: Fast API response. Average API response times range between 10ms and 100ms depending on the size of your request.
Scalable: Powered by scalable apilayer cloud infrastructure, handling billions of geocode requests with 99.9% uptime.
Secure: Secured API with 256-bit HTTPS Encryption. Each registered positionstack account is associated with a unique API access key, which is used to authenticate with the API when geocoding.
Customizable Fields: you can specify preferred response fields to limit the API result and bandwidth.
Supports Multiple Languages: API can be used in a client-side scripting language such as JavaScript, jQuery as well as server-side languages such as PHP, Python, Nodejs, Ruby, etc.
Fair pricing: Offers free service for primary usage(10,000 API requests per month). If you're looking for even more requests and features, monthly plans start at just $9.99.
Getting Started with PositionStack API?
The positionstack API is easy to use. Just sign-up free and get your authentication key immediately.
Once you get your authentication key, start sending API request from your preferred language and get the response, as shown below.
https://api.positionstack.com/v1/forward?access_key=YOUR_ACCESS_KEY&query=1600 Pennsylvania Ave NW, Washington DC
{
"data": {
"results": [
{
"latitude": 38.897675,
"longitude": -77.036547,
"label": "1600 Pennsylvania Avenue NW, Washington, DC, USA",
"name": "1600 Pennsylvania Avenue NW",
"type": "address",
"number": "1600",
"street": "Pennsylvania Avenue NW",
"postal_code": "20500",
"confidence": 1,
"region": "District of Columbia",
"region_code": "DC",
"administrative_area": null,
"neighbourhood": "White House Grounds",
"country": "United States",
"country_code": "US",
"map_url": "http://map.positionstack.com/38.897675,-77.036547"
}
]
}
}
Visit PositionStack documentation to know more about it.