Positionstack API
Forward and reverse geocoding via a straightforward REST API.
What it does
positionstack is a forward and reverse geocoding API built on open data. Convert an address or place name to coordinates, or coordinates to a formatted address, with locality, region, country and administrative details, and optional bounding boxes and timezones.
Base URL
Authentication
Sign up for a free API key and pass it as ?access_key=YOUR_KEY. The free plan is HTTP only; HTTPS requires a paid plan.
Code examples
curl -s "http://api.positionstack.com/v1/forward?access_key=$PS_KEY&query=1600+Pennsylvania+Ave,Washington"
import requests
r = requests.get("http://api.positionstack.com/v1/reverse",
params={"access_key": KEY, "query": "38.897,-77.036"}, timeout=10)
top = r.json()["data"][0]
print(top["label"], top["region"], top["country"])Rate limits & quotas
Free plan: about 25,000 requests/month, HTTP only, no batch. Each request can return several ranked candidates. Over quota the JSON error object has code usage_limit_reached.
Key response fields
| data[].latitude / longitude | Coordinates of the candidate |
| data[].label | Full formatted address string |
| data[].locality / region / country | Place hierarchy |
| data[].confidence | 0–1 match confidence |
| data[].type | address, venue, locality… |
Common errors
| 401 invalid_access_key | Key missing or wrong. |
| 403 https_access_restricted | You called HTTPS on the free plan — use HTTP or upgrade. |
| 429 rate_limit_reached | Too many requests too fast. |
| 104 usage_limit_reached | Monthly quota exhausted. |
When to use it (and alternatives)
A reasonable free geocoder if HTTP-only is acceptable (e.g. server-to-server on a trusted network). For HTTPS on a free tier and the right to store results, OpenCage is usually the better choice; Nominatim is free for very light use.
FAQ
Why can't I use HTTPS?
The positionstack free plan restricts requests to plain HTTP. If you need TLS (anything client-side, or crossing untrusted networks), you must upgrade to a paid plan.
Does it geocode in bulk?
Batch geocoding (multiple queries separated by ;) is a paid feature. On the free plan, loop one query at a time within the rate limit.
How many results come back?
Up to 10 ranked candidates per query by default. Use limit=1 if you only want the best match, and check confidence.
New to APIs?
Short guides for working with this API — and any other.