Tài liệu API
Reverse Geocode API
Reverse geocode a GPS coordinate into a structured address. Returns place name, address components, place ID, and plus code.
I. Endpoint
GET https://api.pisomap.tech/api/maps/reverse-geocodeII. Headers
| Name | Value | Required |
|---|---|---|
x-api-key | Your API key | Yes |
III. Query Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
lat | number | Yes | — | Latitude of the coordinate to reverse geocode |
lng | number | Yes | — | Longitude of the coordinate to reverse geocode |
IV. Example
Your current location: Saigon Opera House (10.77665494785082, 106.70311785181373)
curl "https://api.pisomap.tech/api/maps/reverse-geocode?lat=10.77665494785082&lng=106.70311785181373" \
-H "x-api-key: YOUR_API_KEY"Response:
{
"reveal_result": {
"place_name": "07 Công trường Lam Sơn",
"address": {
"full": "07 Công trường Lam Sơn, Sài Gòn, Hồ Chí Minh 700000, Việt Nam",
"street": "Sài Gòn",
"ward": "Hồ Chí Minh 700000",
"city": "Việt Nam"
},
"lat": 10.776612799999999,
"lng": 106.7031715,
"place_id": "0x31752f464a267e5f:0x62a0deaefa02edd7",
"plus_code": "7P28QPG3+M69"
}
}V. Response Fields
| Field | Type | Description |
|---|---|---|
reveal_result | object | Top-level reverse geocode response |
place_name | string | Place or building name at the coordinate |
address | object | Structured address of the place |
address.full | string | Full address of the place |
address.street | string | Street of the place (from Google Maps) |
address.ward | string | Ward / commune of the place (from Google Maps) |
address.city | string | City / district of the place (from Google Maps) |
lat | number | Latitude of the place |
lng | number | Longitude of the place |
place_id | string | Maps place ID |
plus_code | string | Plus code of the place |
VI. Errors
| Status | Meaning |
|---|---|
| 401 | Missing or invalid API key |
| 422 | Invalid or missing query parameter |
| 429 | Rate limit exceeded |
| 500 | Internal server error |