API Directory › 🌍 Geo & Location › Positionstack
API KeyHTTPSCORS

Positionstack API

Forward and reverse geocoding via a straightforward REST API.

Auth
API Key
HTTPS
Yes
CORS
Yes
Open Positionstack docs ↗

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

http://api.positionstack.com/v1

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 (forward)
curl -s "http://api.positionstack.com/v1/forward?access_key=$PS_KEY&query=1600+Pennsylvania+Ave,Washington"
Python (reverse)
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 / longitudeCoordinates of the candidate
data[].labelFull formatted address string
data[].locality / region / countryPlace hierarchy
data[].confidence0–1 match confidence
data[].typeaddress, venue, locality…

Common errors

401 invalid_access_keyKey missing or wrong.
403 https_access_restrictedYou called HTTPS on the free plan — use HTTP or upgrade.
429 rate_limit_reachedToo many requests too fast.
104 usage_limit_reachedMonthly 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.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

IP LookupDNS Lookup

Related Geo & Location APIs

← Back

More Geo & Location APIs · All 196 APIs