Location APIs for Mongolia
Search places, turn coordinates into addresses and calculate routes with one API key. Built on local data, in Latin and Cyrillic.
Install the SDK
zsh — my-app
- React & Next.js:
npm install @ubhub/maps maplibre-gl - Flutter:
flutter pub add ubhub_maps:^0.8.1
Live demo
Search, geocode and route on a live map
Services
Detailed building models and street trees stream with the vector basemap. Drag to look around; the map turns slowly while you leave it.
Request
GET /demo/basemap/style.json?buildings=3d&trees=3dGET /v1/geocode
Geocoding
Place names and addresses to coordinates, and coordinates back to the nearest place.
GET /v1/route
Routing
Routes, distances and travel times.
GET /v1/basemap/style.json
Basemap
Vector basemap tiles, styles, sprites and fonts (Default and Nova).
Everything location, behind one API
The public map uses the same response shapes through a separately limited demo gateway. Customer keys use the authenticated, quota-backed API.
Geocoding
Find any place, in Latin or Cyrillic
Type as little as two letters. Results are ranked as you type and come back with coordinates, an address and a category.
Reverse geocoding
Turn a tap on the map into an address
Send a latitude and longitude, get the nearest address, place or street with its khoroo and district, and how far away it is.
Сүхбаатар дүүргийн нийгмийн даатгал
6-р хороо, Чингэлтэй
Routing
Routes, distances and travel times
Routes as GeoJSON, with the distance and estimated travel time you need for ETAs and delivery planning.
Fastest route for the selected travel mode
For developers
From API key to first request in minutes
- API keys
- Create, rename, rotate and revoke keys. Secrets are hashed and shown once.
- Live usage
- Requests, errors and latency per key, updated as they happen.
- OpenAPI schema
- A versioned /v1 contract, described by an OpenAPI schema. Plain HTTPS and JSON.
- Predictable errors
- One error envelope with stable codes and rate-limit headers.
// Server-side only: never ship GEO_API_KEY to the browser.
type RouteResponse = {
route: { distance_meters: number; duration_seconds: number };
};
const params = new URLSearchParams({
origin: "106.9177,47.9184",
destination: "106.9057,47.9220",
mode: "driving",
});
const response = await fetch(`https://developers.ubhub.mn/v1/route?${params}`, {
headers: { Authorization: `Bearer ${process.env.GEO_API_KEY}` },
});
const body = await response.json();
if (!response.ok) {
// Every error uses the same envelope: { error: { code, message, details } }
throw new Error(`${body.error.code}: ${body.error.message}`);
}
const { route } = body as RouteResponse;
console.log(route.distance_meters, route.duration_seconds);