GoGoDuk

GET /v1/reverse-geocode

Resolve coordinates to province / district via PostGIS admin boundaries.

Looks up the administrative boundary that contains a coordinate. This is a boundary-based lookup, not a proximity match.

Required scope: geocoding:read

Request

GET /v1/reverse-geocode?lat=10.7769&lng=106.7009
X-API-Key: gdk_live_xxxxxxxxxxxxxxxxxxxxxxxx

Query parameters

NameRequiredDescription
latyesLatitude (-90..90).
lngyesLongitude (-180..180).
levelsnoComma-separated admin levels (default 4,8). Level 4 ≈ province, level 8 ≈ district.

Response

{
  "lat": 10.7769,
  "lng": 106.7009,
  "city": "Thành phố Hồ Chí Minh",
  "district": "Phường Sài Gòn"
}

Response fields

FieldTypeDescription
latnumberEcho of input latitude.
lngnumberEcho of input longitude.
citystring | nullProvince at level 4. May be null if no boundary contains the point.
districtstring | nullDistrict / ward at level 8. May be null.

Common errors

  • 400 BAD_REQUEST — coordinate out of range or non-numeric.
  • 401 INVALID_API_KEY / 403 INSUFFICIENT_SCOPE — auth/scope failure.
  • 500 INTERNAL_ERROR — PostGIS unavailable.

On this page