Guide · Migration

Migrate from the Google Maps Geocoding API

Field mapping from Google's Geocoding API to geocode.net, what changes in your code, and the storage rule you no longer have to track.

Why people move

Two reasons. Price: Google is $5 per 1,000 geocodes after the free monthly allowance; geocode.net is $0.50 after 10,000 a month. Terms: Google's platform terms limit how long you may cache geocoding results; our index is public-domain data and results are yours to keep indefinitely.

Request

Google geocode.net
GET /maps/api/geocode/json?address=…&key=… GET /v1/geocode?q=… with header X-API-Key: …
components=postal_code:20500 postal_code=20500 (also street, city, state)
latlng=38.89,-77.03 GET /v1/reverse?lat=38.89&lng=-77.03
one address per request POST /v1/geocode/batch, up to 10,000

Response

Google geocode.net
results[0].formatted_address results[0].formatted
results[0].geometry.location.lat / lng results[0].location.lat / lng
results[0].geometry.location_type (ROOFTOP, RANGE_INTERPOLATED, GEOMETRIC_CENTER, APPROXIMATE) results[0].accuracy_type (rooftop, range_interpolation, nearest_rooftop_match, street_center, place, zip, county, state) plus a numeric accuracy
address_components[] with types components object: number, street, suffix, city, county, state, zip
status: "ZERO_RESULTS" HTTP 200 with an empty results array
status: "OVER_QUERY_LIMIT" HTTP 429 with {"error": "rate_limited"}

Things Google does not return and we do in the same call: Census geographies, congressional and state legislative districts, school districts and the IANA time zone, via fields=.

Before and after

# Google
r = requests.get("https://maps.googleapis.com/maps/api/geocode/json",
                 params={"address": addr, "key": GOOGLE_KEY}).json()
loc = r["results"][0]["geometry"]["location"]

# geocode.net
r = requests.get("https://api.geocode.net/v1/geocode", params={"q": addr},
                 headers={"X-API-Key": KEY}).json()
loc = r["results"][0]["location"]

What to watch

  • Coverage is US only today. Keep Google for other countries, or route by country.
  • nearest_rooftop_match and street_center have no Google equivalent; map them to your "approximate" bucket.
  • Delete the cache-expiry job. There is nothing to expire.

Ready to geocode for real?

10,000 free lookups a month, every append included, no card.