API Reference
All GoGoDuk endpoints at a glance — methods, scopes, request shape, response shape.
The GoGoDuk API is REST + JSON. Authenticate with the X-API-Key header on
every protected request. Each endpoint requires one specific scope; mint keys
that grant only what your client actually needs.
Base URL
For local development the same paths are served at http://localhost:8081.
Endpoints
Geocoding
These endpoints all require the geocoding:read scope.
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/suggest | Autocomplete predictions for a partial query. |
| GET | /v1/place/resolve | Full record (lat / lon / address) for a placeId. |
| GET | /v1/reverse | Proximity reverse geocode for a coordinate. |
| GET | /v1/reverse-geocode | Admin-boundary lookup (province + district). |
Admin Boundaries
Requires the admin_boundaries:read scope.
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/admin-boundaries | Provincial / district polygons (GeoJSON or WKT). |
Routing
Requires the routing:read scope.
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/directions | Route directions between two points (motobike or car). Google-compatible response. |
Health
| Method | Path | Purpose |
|---|---|---|
| GET | /health | Returns {status: "ok"} and Postgres-only health. No API key. |
Request envelope
Every protected call:
Response headers (every protected response)
See Rate limits for the full quota table.
Error envelope
All errors follow the same shape:
retry_after is only present on 429 responses. See Errors for
every code.
Quickstart
If you've never called the API, jump to the Quickstart — a
working curl + JS + Python triple that finishes in under a minute.