PositionStack drop-in replacement
PositionStack's forward and reverse endpoints answer at positionstack.mygeocode.com with the same data array and flat field names. HTTPS is available on every plan here, including free.
Change one hostname
| Original host |
|
|---|---|
| Use instead | positionstack.mygeocode.com |
| Key parameter | access_key (optional: any address gets 2,500 requests a day with no key; put your My Geocode key here for credit, packages and a usage history) |
curl "http://api.positionstack.com/v1/forward?access_key=YOUR_POSITIONSTACK_KEY&query=350+5th+Avenue+New+York"curl "https://positionstack.mygeocode.com/v1/forward?access_key=YOUR_MYGEOCODE_KEY&query=350+5th+Avenue+New+York"Why people move
PositionStack's free plan is HTTP only and capped monthly. Here everything is HTTPS and every account's free allowance resets daily.
Same free allowance, key or not. Requests to positionstack.mygeocode.com count toward the same 2,500 free requests a day your address, or your key, gets on our own endpoints. Above that, prepaid credit at €0.0001 per request, or €50 a month for an Unlimited key. Signing up takes a name and an email address, and no card.
Endpoints
| Path on positionstack.mygeocode.com | What it does | Backed by |
|---|---|---|
/v1/forward?query=... | Forward geocoding | Forward geocoding |
/v1/reverse?query=lat,lng | Reverse geocoding | Reverse geocoding |
Example response
This is what the request above returns. Field names, nesting and types follow PositionStack. Only the data behind them is ours.
{
"data": [
{
"latitude": 40.747771,
"longitude": -73.985048,
"type": "address",
"name": "350 5th Ave",
"number": "350",
"postal_code": "10118",
"street": "5th Ave",
"confidence": 0.98,
"region": "New York",
"region_code": "NY",
"county": null,
"locality": "New York",
"administrative_area": null,
"neighbourhood": null,
"country": "United States",
"country_code": "USA",
"continent": "North America",
"label": "350 5th Ave, New York, NY 10118, United States"
},
{
"latitude": 40.748295,
"longitude": -73.984663,
"type": "address",
"name": "350 5th Ave",
"number": "350",
"postal_code": "10016",
"street": "5th Ave",
"confidence": 0.66,
"region": "New York",
"region_code": "NY",
"county": null,
"locality": "New York",
"administrative_area": null,
"neighbourhood": null,
"country": "United States",
"country_code": "USA",
"continent": "North America",
"label": "350 5th Ave, New York, NY 10016, United States"
}
]
}Details and differences
No key is needed for the first 2,500 requests a day. To use a My Geocode key, put it where your positionstack key went: the access_key query parameter. The X-API-Key header, Authorization: Bearer and HTTP Basic authentication (the key as the user name) work on every host too, so client libraries that authenticate their own way keep working unchanged.
- Forward and reverse both answer the
dataarray shape. - No batch endpoint, because the original has none. For bulk work use
POST /v1/forwardor/v1/reverseonapi.mygeocode.com(up to 100 per call, one request each). timezone_module=1,sun_module=1,country_module=1andbbox_module=1add their blocks.output=xmlanswers in XML.country_modulecarries the official name, the landlocked and independent flags, the UN regions, the dialling prefixes and the currency numbers, where known.
If your client depends on a field or behaviour that is not listed here, tell us. Compatibility gaps get fixed quickly because they are usually small.
Other drop-in hosts
- Google Maps
- Bing Maps
- HERE
- Mapbox
- Geocode.Farm
- Nominatim (OSM)
- OpenCage
- LocationIQ
- Geoapify
- TomTom
- MapQuest
- Geocodio
- ip-api
- ipinfo
- ipstack
- Open-Elevation
How the drop-ins work, the overview, and the JavaScript library drop-ins.