MapQuest Geocoding drop-in replacement
Both the licensed and the Open Data MapQuest geocoding endpoints answer at mapquest.mygeocode.com, with the info, options and results envelope and the adminArea1 to adminArea6 naming that MapQuest clients parse.
Change one hostname
| Original host |
|
|---|---|
| Use instead | mapquest.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://www.mapquestapi.com/geocoding/v1/address?key=YOUR_MAPQUEST_KEY&location=1600+Amphitheatre+Parkway,+Mountain+View,+CA"curl "https://mapquest.mygeocode.com/geocoding/v1/address?key=YOUR_MYGEOCODE_KEY&location=1600+Amphitheatre+Parkway,+Mountain+View,+CA"Why people move
MapQuest's free tier has shrunk over the years and its developer plans are monthly tiers. Here you get 2,500 a day free and per-request or flat pricing after that.
Same free allowance, key or not. Requests to mapquest.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 mapquest.mygeocode.com | What it does | Backed by |
|---|---|---|
/geocoding/v1/address?location=... | Forward geocoding | Forward geocoding |
/elevation/v1/profile?latLngCollection=lat,lng,lat,lng (also shapeFormat=cmp/cmp6, unit=m|f, POST JSON) | Elevation profile | Elevation lookup |
/geocoding/v1/reverse?location=lat,lng | Reverse geocoding | Reverse geocoding |
/geocoding/v1/batch?location=...&location=... | Batch geocoding | Forward geocoding |
Example response
This is what the request above returns. Field names, nesting and types follow MapQuest. Only the data behind them is ours.
{
"info": {
"statuscode": 0,
"copyright": {
"text": "My Geocode",
"imageUrl": "https://www.mygeocode.com/assets/img/logo.svg",
"imageAltText": "My Geocode"
},
"messages": []
},
"options": {
"maxResults": -1,
"thumbMaps": false,
"ignoreLatLngInput": false
},
"results": [
{
"providedLocation": {
"location": "1600 Amphitheatre Parkway, Mountain View, CA"
},
"locations": [
{
"street": "1600 Amphitheatre Pkwy",
"adminArea6": "",
"adminArea6Type": "Neighborhood",
"adminArea5": "Mountain View",
"adminArea5Type": "City",
"adminArea4": "",
"adminArea4Type": "County",
"adminArea3": "CA",
"adminArea3Type": "State",
"adminArea1": "US",
"adminArea1Type": "Country",
"postalCode": "94043",
"geocodeQualityCode": "L1AAA",
"geocodeQuality": "ADDRESS",
"dragPoint": false,
"sideOfStreet": "N",
"linkId": "",
"unknownInput": "",
"type": "s",
"latLng": {
"lat": 37.423065,
"lng": -122.083525
},
"displayLatLng": {
"lat": 37.423065,
"lng": -122.083525
}
}
]
}
]
}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 MapQuest 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.
Copyright lines, licence names, terms and privacy links in the response are ours rather than the original provider’s. Everything else keeps the original shape.
- The elevation profile takes
latLngCollectionas raw pairs or acmporcmp6compressed path, in metres or feet, by GET or POST. - Batch geocoding works with repeated
location=parameters or a postedlocationslist, and answers one entry per input. - A batch takes up to 100 locations and counts one request per location, as MapQuest does.
- Points with no data report a height of -32768, as MapQuest does.
outFormat=xmlanswers in MapQuest’s XML, with the admin area types as attributes.includeNearestIntersection=trueandincludeRoadMetadata=trueadd the nearest cross streets and the road’s speed limit, where OpenStreetMap has 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
- LocationIQ
- Geoapify
- TomTom
- Geocodio
- PositionStack
- ip-api
- ipinfo
- ipstack
- Open-Elevation
How the drop-ins work, the overview, and the JavaScript library drop-ins.