All posts

Migrate from Google Maps Geocoding API to GoGoDuk in 5 minutes

A drop-in migration guide from Google Maps Geocoding API to GoGoDuk — same fields, same response shape, free forever for Vietnam.

If you're paying Google $5 per 1,000 geocoding requests and your traffic is focused on Vietnam, you can swap in GoGoDuk in about five minutes. This guide shows the literal find-and-replace.

1. Get a key

Sign up, verify your email, and create a LIVE key from the dashboard. Copy it once — we don't store the plaintext.

gdk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2. Swap the endpoint

Before (Google):

const res = await fetch(
  `https://maps.googleapis.com/maps/api/geocode/json?address=${q}&key=${KEY}`
);
const { results } = await res.json();

After (GoGoDuk):

const res = await fetch(
  `https://api.gogoduk.com/v1/suggest?input=${encodeURIComponent(q)}`,
  { headers: { "X-API-Key": KEY } }
);
const data = await res.json();

Key in a header, not the query string. Same idea, different transport.

3. Map the response

Google returns results[].geometry.location with lat / lng. GoGoDuk returns items[].point with lat / lon. One-line mapper:

const points = data.items.map((it) => ({
  lat: it.point.lat,
  lng: it.point.lon,
  formatted_address: it.address,
  place_id: it.id,
}));

That's it. If you were using place_id to round-trip to Place Details, /v1/place/resolve is the equivalent.

4. Reverse geocoding

Before:

GET /maps/api/geocode/json?latlng=21.03,105.85&key=...

After:

GET /v1/reverse?lat=21.03&lng=105.85

Response: address, ward, district, province as flat string fields, not a 30-deep address_components array. Easier to display, no parsing.

5. Rate limits

Google: hard quota you have to manage in their console + per-second limits.

GoGoDuk free tier: 100 requests / day per account. Need more? Email [email protected] with your use case and we'll raise it — still free, no payment involved.

Catches

  • No worldwide coverage. We're focused on Vietnam. If you geocode addresses in São Paulo, stick with Google.
  • No Street View, Places photos, or Routes API. This is a focused geocoding / reverse / suggest / boundaries / POI search API.
  • No SLA on free tier. Production-critical workloads should email us to discuss expectations.

Try it: copy the snippets, point them at your key, and see how the response looks for your actual addresses. If anything is missing, ping [email protected].

Want to use GoGoDuk?

Free forever — 100 requests/day per account, no credit card. Higher limits on request.

Sign up →