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
  • api.positionstack.com
Use insteadpositionstack.mygeocode.com
Key parameteraccess_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)
Before
curl "http://api.positionstack.com/v1/forward?access_key=YOUR_POSITIONSTACK_KEY&query=350+5th+Avenue+New+York"
After
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.

See pricing Get a free key

Endpoints

Path on positionstack.mygeocode.comWhat it doesBacked by
/v1/forward?query=...Forward geocodingForward geocoding
/v1/reverse?query=lat,lngReverse geocodingReverse geocoding

Example response

This is what the request above returns. Field names, nesting and types follow PositionStack. Only the data behind them is ours.

Response from positionstack.mygeocode.com
{
  "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 data array shape.
  • No batch endpoint, because the original has none. For bulk work use POST /v1/forward or /v1/reverse on api.mygeocode.com (up to 100 per call, one request each).
  • timezone_module=1, sun_module=1, country_module=1 and bbox_module=1 add their blocks.
  • output=xml answers in XML.
  • country_module carries 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

How the drop-ins work, the overview, and the JavaScript library drop-ins.