HTTP API
Everything the map does, it does over this API. There is no privileged internal channel — the JavaScript client is an ordinary consumer of the same endpoints, so anything the map can do, your server can do too.
Base URL#
https://uzmaps.ndc.uzOne origin serves the API, the tiles and the browser SDK. There is no separate API host, and therefore no CORS origin to configure for the map itself.
Authentication#
Every request needs an API key, presented one of two ways.
X-API-Key: <key> | Preferred. Keeps the key out of URLs, and therefore out of cache keys, browser history and access logs. |
?key=<key> | Necessary where headers cannot be set — map tiles, glyphs, sprites, and <img> sources. |
curl -H "X-API-Key: $KEY" "https://uzmaps.ndc.uz/api/search?q=Chilonzor"Two endpoints are deliberately open and need no key: /health and /api/status. Uptime checks and the
client's own capability probe work without credentials, and the browser SDK at /v1/ is served unauthenticated
because a script has to load before it can present anything.
See API keys and quotas for origin restrictions, rate limits and monthly allowances.
Conventions#
Coordinates are [longitude, latitude] — GeoJSON order. Where an endpoint takes a query string, the form is
lon,lat.
Distances are metres, durations are seconds. Everywhere, without exception.
Times are ISO 8601 in UTC. Quota periods and usage buckets are aligned to the UTC calendar month, so an allowance and an invoice can never disagree about which month a request fell in.
null means "no answer exists", not "something went wrong". A matrix cell with a null distance means no
route connects that pair; the surrounding cells are still valid.
Errors#
Failures return JSON with a machine-readable code and a sentence describing what to change.
{
"code": 403,
"error": "Forbidden",
"message": "origin https://evil.example is not allowed for this API key",
"docs": "https://uzmaps.ndc.uz/docs/api-keys"
}| Status | Meaning |
|---|---|
400 | The request is malformed — a missing parameter, or a value outside its permitted range. |
401 | No key was sent, or the key is unknown. |
403 | The key is disabled, or the request's origin is not on its allowlist. |
429 | A rate limit or a monthly quota was exceeded. Check Retry-After. |
502 | A downstream engine failed — most often the routing engine. |
503 | A capability is not configured on this deployment. |
Reference#
| Search and geocoding | /api/search, /api/autocomplete, /api/reverse, /api/lookup |
| Places | /api/nearby, /api/place/{id}, /api/categories, /api/districts, photos |
| Routing | /api/route, /api/matrix, /api/isochrone |
| Tiles and styles | /tiles/*, /terrain/*, /fonts/*, /sprites/*, /styles/* |
@uzmaps/api | The typed JavaScript client for all of the above |