duara-geo

Getting started

Every endpoint is JSON over HTTP. Requests that carry coordinates are POSTs with a body — deliberately, because a query string is logged by every proxy in the path and kept for weeks. The three endpoints that have to work inside an HTML attribute (a tile, a static image, an embedded map) are GETs and say so.

The key you type is kept in this browser's local storage and sent only to this service. Every “Send request” button on this page issues a real call with it.

Authentication

Three places, all equivalent. Use whichever your client makes easy.

Authorization: Bearer dgk_live_…      # servers
X-API-Key: dgk_live_…                 # most SDKs
?key=dgk_live_…                       # tiles, static images, iframes — a browser
                                      # will not attach a header to those

Errors

Branch on error, not on the status code: unroutable and invalid_coordinate are both 422 and need opposite handling.

StatuserrorWhat it meansRetry?
400invalid_requestThe body did not parse, or a field has the wrong typeNo
401unauthorizedMissing, unknown, expired or disabled keyNo
403key_scopeThis key may not call this family of servicesNo
403referrer_not_allowedThis key is bound to specific web originsNo
422invalid_coordinateOut of range, or outside this deployment's map dataNo
422unroutableThese coordinates have no road answer. Tell the user.No
429rate_limited / quota_exceededHonour Retry-AfterYes, later
501service_unavailableThis deployment does not run that backend. Check /v1/capabilities.No
503engine_unavailableThe routing engine could not be reachedYes, shortly
Ask what this deployment can do before you build against it. GET /v1/capabilities is unauthenticated and lists every service, whether it is available, and what configuration would turn it on. Call it at startup and render the product this instance supports rather than discovering a 501 in front of a user.

Compatibility surface

Every service is also served in the request and response shapes of the dominant commercial maps platform, so an existing integration moves by changing a base URL. The parameter names, the JSON keys and the status strings match; polylines are re-encoded to precision 5 because that is what those client libraries decode.

Place ids are not interchangeable. These are OpenStreetMap identifiers. An id stored from another platform will not resolve here, so anything that persisted them has to re-resolve once. There is also no traffic model — durations are free-flow — and ratings, reviews and photos are absent rather than zero, because OpenStreetMap does not have them.