Reverse API
Identify location from coordinates with Vietmap Reverse API
Reverse Geocoding Results
Click "Reverse Geocode" to see results for selected coordinates
Code samples
curl 'https://maps.vietmap.vn/api/reverse/v4?apikey=YOUR_API_KEY&lat=10.7778046&lng=106.7019192&display_type=6'Replace YOUR_API_KEY with your API key before running.
// In production, read the key from an environment variable instead.
const API_KEY = "YOUR_API_KEY";
const params = new URLSearchParams([
["apikey", API_KEY],
["lat", "10.7778046"],
["lng", "106.7019192"],
["display_type", "6"],
]);
const response = await fetch(`https://maps.vietmap.vn/api/reverse/v4?${params}`);
if (!response.ok) {
throw new Error(`Vietmap ${response.status}: ${await response.text()}`);
}
const data = await response.json();
console.log(data);Replace YOUR_API_KEY with your API key before running.
import requests
# In production, read the key from an environment variable instead.
API_KEY = "YOUR_API_KEY"
params = [
("apikey", API_KEY),
("lat", "10.7778046"),
("lng", "106.7019192"),
("display_type", "6"),
]
response = requests.get("https://maps.vietmap.vn/api/reverse/v4", params=params, timeout=30)
response.raise_for_status()
print(response.json())Replace YOUR_API_KEY with your API key before running.
https://maps.vietmap.vn/api/reverse/v4?apikey=YOUR_API_KEY&lat=10.7778046&lng=106.7019192&display_type=6Replace YOUR_API_KEY with your API key before running.
I need to integrate Vietmap's Reverse API v4 into my application.
Official documentation: https://maps.vietmap.vn/docs/map-api/reverse-version/reverse-v4/
Here is a sample request that works in the Vietmap API Playground:
GET https://maps.vietmap.vn/api/reverse/v4?apikey=YOUR_API_KEY&lat=10.7778046&lng=106.7019192&display_type=6
Parameters in use:
- lat = 10.7778046
- lng = 106.7019192
- display_type = 6
Write code in [my language / framework] that calls this API, with these requirements:
1. Read the API key from the VIETMAP_API_KEY environment variable; never hard-code it.
2. Send the parameters in the query string exactly as in the sample; repeated parameters (such as `point`) must keep their order.
3. Handle Vietmap's HTTP errors:
- 401: the API key is wrong or revoked.
- 403: the key is restricted to a domain / IP that does not match.
- 423: the API is not enabled for the key's consumer, OR the account is out of credit — tell them apart by the response body ("exceeded credit" means out of credit).
- 429: rate limit exceeded — retry with increasing backoff.
4. Set a request timeout, and define types (type / interface / dataclass) for the response.
If unsure about a field name, look it up in the documentation linked above instead of guessing.Paste into ChatGPT, Claude… to generate integration code. The prompt never contains your API key.
https://tools.vietmap.vn/playground/en/reverse?lat=10.7778046&lng=106.7019192&version=v4&display_type=6Opens the playground with exactly these parameters — for the docs or a colleague. The link never contains an API key.
What is the Reverse Geocoding API?
What is the Reverse Geocoding API?
The Reverse Geocoding API works the other way round: from a coordinate it returns the nearest address and place name. Version 4 has display_type to return the address under the new administrative units, the old ones, or both — useful when the data has to match a system still on the former boundaries. It usually follows a device GPS fix or a tap on the map.
What it is for
- Showing the current address of a driver or courier.
- Pre-filling an address when the user picks a point on the map.
- Labelling GPS logs or field photos with an address.
- Finding the province or ward of a location for pricing.
Sample request
GET https://maps.vietmap.vn/api/reverse/v4?apikey=YOUR_API_KEY&lat=21.028511&lng=105.854165&display_type=1v3 remains available for comparison; this page switches between them.
Reverse Geocoding API FAQ
- What is reverse geocoding?
- Reverse geocoding turns a latitude and longitude into a readable address. It usually follows a GPS fix from a phone or tracker, or a tap on the map.
- Can I get the address under the former administrative units?
- Yes. display_type in v4 returns the address under the new units, the former ones, or both, which helps when your system still stores the old boundaries.
- How do Reverse v3 and v4 differ?
- v4 is the current version, with display_type for new and former addresses. v3 still works; this page switches between them so you can compare results for the same point.
- Does it cost anything to try the Reverse Geocoding API?
- The playground comes with a demo API key, so you can call the Reverse Geocoding API straight from the browser without signing up. To build it into a product, register a VIETMAP account for your own key. Usage is billed per transaction, each API converting requests to transactions at its own rate; the pricing page has the details and the free trial.