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 |
|
|---|---|
| Use instead | locationiq.mygeocode.com |
| Key parameter | 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 "https://us1.locationiq.com/v1/search?key=YOUR_LOCATIONIQ_KEY&q=Sydney+Opera+House&format=json"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.
Endpoints
| Path on locationiq.mygeocode.com | What it does | Backed by |
|---|---|---|
/v1/search?q=...&format=json | Forward geocoding | Forward geocoding |
/v1/reverse?lat=...&lon=...&format=json | Reverse geocoding | Reverse geocoding |
/v1/autocomplete?q=... | Autocomplete | Address autocomplete |
/v1/timezone?lat=...&lon=... | Timezone | Timezone lookup |
Example response
This is what the request above returns. Field names, nesting and types follow LocationIQ. Only the data behind them is ours.
[
{
"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/forwardor/v1/reverseonapi.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=xmlandxmlv1.1give Nominatim’s XML. statecode=1,matchquality=1,normalizecity=1,extratags=1andnamedetails=1work as LocationIQ documents them.postaladdress=1,normalizeaddress=1and thepolygon_*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
- Google Maps
- Bing Maps
- HERE
- Mapbox
- Geocode.Farm
- Nominatim (OSM)
- OpenCage
- Geoapify
- TomTom
- MapQuest
- Geocodio
- PositionStack
- ip-api
- ipinfo
- ipstack
- Open-Elevation
How the drop-ins work, the overview, and the JavaScript library drop-ins.