GoGoDuk

GET /v1/reverse

Reverse geocoding dựa trên độ gần.

Trả về các địa điểm gần nhất với một tọa độ.

Scope yêu cầu: geocoding:read

Request

GET /v1/reverse?point.lat=10.7769&point.lon=106.7009
X-API-Key: gdk_live_xxxxxxxxxxxxxxxxxxxxxxxx
curl -G "https://api.gogoduk.com/v1/reverse" \
-H "X-API-Key: $GOGODUK_API_KEY" \
--data-urlencode "point.lat=10.7769" \
--data-urlencode "point.lon=106.7009"

Query parameters

NameBắt buộcMô tả
point.latLatitude theo độ thập phân.
point.lonLongitude theo độ thập phân.
sizekhôngSố kết quả tối đa, 1–5. Mặc định 1.
boundary.circle.radiuskhôngBán kính tìm kiếm tính bằng km. Mặc định 0.05, giới hạn tối đa 0.1.
langkhôngMã ngôn ngữ, mặc định vi.
boundary.countrykhôngCác mã ISO ngăn cách bằng dấu phẩy (VN,TH).

Response

{
  "results": [
    {
      "place_id": "ChIJO3p-WAAvdTER8L3Uli6PgXM",
      "address": "114 Nguyễn Huệ, Bến Nghé, Quận 1, Thành phố Hồ Chí Minh, Vietnam",
      "lat": 10.7768196,
      "lon": 106.7009035,
      "district": "Phường Sài Gòn",
      "city": "Thành phố Hồ Chí Minh",
      "country": "VN",
      "confidence": 1,
      "distance_km": 0.0089
    }
  ]
}

Response fields

FieldTypeMô tả
results[].place_idstringĐịnh danh địa điểm. Lưu ý: dùng snake_case ở đây vì lý do lịch sử.
results[].addressstringĐịa chỉ đầy đủ đã được định dạng.
results[].latnumberLatitude.
results[].lonnumberLongitude.
results[].districtstringPhường / quận. Có thể là null.
results[].citystringThành phố / tỉnh. Có thể là null.
results[].countrystringMã quốc gia ISO alpha-2.
results[].confidencenumberĐộ tin cậy của kết quả khớp, từ 0..1.
results[].distance_kmnumberKhoảng cách từ điểm truy vấn.

Common errors

  • 400 BAD_REQUEST — thiếu point.lat / point.lon.
  • 401 INVALID_API_KEY / 403 INSUFFICIENT_SCOPE — lỗi xác thực/scope.
  • 503 — dịch vụ không khả dụng.

On this page