LocationIQ drop-in replacement

LocationIQ's search, reverse, autocomplete and timezone endpoints answer at locationiq.mygeocode.com. The Nominatim-style JSON array with display_name, address and boundingbox is returned unchanged in shape.

Change one hostname

Original host
  • us1.locationiq.com
  • eu1.locationiq.com
Use insteadlocationiq.mygeocode.com
Key parameterkey (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 "https://us1.locationiq.com/v1/search?key=YOUR_LOCATIONIQ_KEY&q=Sydney+Opera+House&format=json"
After
curl "https://locationiq.mygeocode.com/v1/search?key=YOUR_MYGEOCODE_KEY&q=Sydney+Opera+House&format=json"

Why people move

Same interface, 2,500 free requests a day per account, and a flat Unlimited key for busy applications.

Same free allowance, key or not. Requests to locationiq.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 locationiq.mygeocode.comWhat it doesBacked by
/v1/search?q=...&format=jsonForward geocodingForward geocoding
/v1/reverse?lat=...&lon=...&format=jsonReverse geocodingReverse geocoding
/v1/autocomplete?q=...AutocompleteAddress autocomplete
/v1/timezone?lat=...&lon=...TimezoneTimezone lookup

Example response

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

Response from locationiq.mygeocode.com
[
  {
    "place_id": 1014623290,
    "licence": "Data by My Geocode, https://www.mygeocode.com/terms/",
    "osm_type": "node",
    "osm_id": 2964999733,
    "lat": "-33.8567007",
    "lon": "151.2150184",
    "class": "tourism",
    "type": "attraction",
    "place_rank": 30,
    "importance": 0.72,
    "addresstype": "tourism",
    "name": "Sydney Opera House",
    "display_name": "Sydney Opera House, Sydney, New South Wales, Australia",
    "address": {
      "tourism": "Sydney Opera House",
      "county": "Sydney",
      "state": "New South Wales",
      "country": "Australia",
      "country_code": "au"
    },
    "boundingbox": ["-33.8586981", "-33.8546987", "151.2130196", "151.2170187"]
  }
]

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 LocationIQ key went: the 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.

  • The time zone endpoint returns name, offset, summer time flag and both names.
  • 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).
  • Search and reverse answer XML unless you ask for format=json, as LocationIQ does; format=xml and xmlv1.1 give Nominatim’s XML.
  • statecode=1, matchquality=1, normalizecity=1, extratags=1 and namedetails=1 work as LocationIQ documents them.
  • postaladdress=1, normalizeaddress=1 and the polygon_* outlines work as LocationIQ documents them.

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.