Google Maps Platform drop-in replacement

The Geocoding, Places Autocomplete, Time Zone and Elevation web services all answer at the same paths on gapi.mygeocode.com, with the same JSON shape Google returns. Change the host, put your My Geocode key in the key parameter, and the rest of your code stays as it is.

Change one hostname

Original host
  • maps.googleapis.com
Use insteadgapi.mygeocode.com
Key parameterkey (put your My Geocode key here, or leave it out for the free 2,500 a day)
Before
curl "https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_GOOGLE_KEY"
After
curl "https://gapi.mygeocode.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_MYGEOCODE_KEY"

Why people move

Google requires a billing account and a key on every call, and bills per request across each SKU. Here the first 2,500 calls a day need neither, and the price after that is $0.001 per request or a flat €50 a month.

Try it before you sign up for anything. Requests to gapi.mygeocode.com count toward the same 2,500 a day you get on our own endpoints, with no key and no account. Above that, credits at $0.001 per request or €50 a month unlimited. Signing up takes an email address and nothing else.

See pricing Sign up with an email

Endpoints

Path on gapi.mygeocode.comWhat it doesBacked by
/maps/api/geocode/json?address=...Forward geocodingForward geocoding
/maps/api/geocode/json?latlng=lat,lngReverse geocodingReverse geocoding
/maps/api/place/autocomplete/json?input=...Places Autocomplete (predictions with coordinates)Address autocomplete
/maps/api/timezone/json?location=lat,lng&timestamp=...Time Zone APITimezone lookup
/maps/api/elevation/json?locations=lat,lng|lat,lngElevation APIElevation lookup

Example response

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

Response from gapi.mygeocode.com
{
  "results": [
    {
      "address_components": [
        { "long_name": "1600", "short_name": "1600", "types": ["street_number"] },
        { "long_name": "Amphitheatre Parkway", "short_name": "Amphitheatre Pkwy", "types": ["route"] },
        { "long_name": "Mountain View", "short_name": "Mountain View", "types": ["locality", "political"] },
        { "long_name": "Santa Clara County", "short_name": "Santa Clara County", "types": ["administrative_area_level_2", "political"] },
        { "long_name": "California", "short_name": "CA", "types": ["administrative_area_level_1", "political"] },
        { "long_name": "United States", "short_name": "US", "types": ["country", "political"] },
        { "long_name": "94043", "short_name": "94043", "types": ["postal_code"] }
      ],
      "formatted_address": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
      "geometry": {
        "location": { "lat": 37.4224428, "lng": -122.0842467 },
        "location_type": "ROOFTOP",
        "viewport": {
          "northeast": { "lat": 37.4237918, "lng": -122.0828977 },
          "southwest": { "lat": 37.4210938, "lng": -122.0855957 }
        }
      },
      "place_id": "mg.us.addr.5e1b2c7a9f",
      "plus_code": { "compound_code": "CWC8+W5 Mountain View, CA, USA", "global_code": "849VCWC8+W5" },
      "types": ["street_address"]
    }
  ],
  "status": "OK"
}

Details and differences

  • status values follow Google's list: OK, ZERO_RESULTS, OVER_QUERY_LIMIT, REQUEST_DENIED, INVALID_REQUEST. When your free quota is used up and no account is attached you get OVER_QUERY_LIMIT with HTTP 200, exactly as Google's clients expect.
  • place_id values are ours and are stable, but they are not Google place IDs. Do not mix them with a Google Places Details call.
  • components, region, bounds and language parameters are honoured. The result_type and location_type filters on reverse requests are honoured too.
  • plus_code is computed from the coordinates, so it is always present.
  • The Google Maps JavaScript API has its own drop-in loader. See the JavaScript drop-ins page.

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

All REST drop-ins and JavaScript library drop-ins.