---
title: "Combined forward + reverse geocoding"
method: GET
path: "/api/v1/geocode"
tags: ["Geocoding"]
---

# Combined forward + reverse geocoding

`GET /api/v1/geocode`

Unified entrypoint that auto-routes to forward or reverse:

* `?q=…` (with optional `lat,lon` for proximity bias) → forward search.
* `?lat=&lon=` only → reverse geocode.

Internally calls the same orchestrators as `/api/v1/search` and `/api/v1/reverse`.

## Query parameters

- `q` string
- `lat` number, double
- `lon` number, double
- `limit` integer
- `lang` string

## Response `200`

reverse result

- GeocodeResponse — Union of forward and reverse responses depending on which params are supplied.
  - `data` union
    - GeocodeFeature
      - `id` string, required
      - `name` string, nullable
      - `label` string, required
      - `type` string, nullable
      - `coords` Coords, required
        - `lat` number, double, required
        - `lon` number, double, required
      - `admin` AdminHierarchy
        - `country` string, nullable
        - `state` string, nullable
        - `county` string, nullable
        - `city` string, nullable
        - `postcode` string, nullable
    - GeocodeFeature[]
      - `id` string, required
      - `name` string, nullable
      - `label` string, required
      - `type` string, nullable
      - `coords` Coords, required
        - `lat` number, double, required
        - `lon` number, double, required
      - `admin` AdminHierarchy
        - `country` string, nullable
        - `state` string, nullable
        - `county` string, nullable
        - `city` string, nullable
        - `postcode` string, nullable
  - `meta` ResponseMeta
    - `timestamp` string, date-time
    - `upstream` string
    - `count` integer

## Other responses

- `400` — neither q nor lat/lon supplied

---

[API](https://skmtc.net/dawarich-app/apis/dawarich-atlas-api.md) · [All operations](https://skmtc.net/dawarich-app/apis/dawarich-atlas-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dawarich-app/dawarich-atlas-api/versions/9e2938c3b0a6/schema)
