---
title: "Forward geocoding (autocomplete + admin enrichment)"
method: GET
path: "/api/v1/search"
tags: ["Geocoding"]
---

# Forward geocoding (autocomplete + admin enrichment)

`GET /api/v1/search`

Sequential pipeline:
1. **libpostal** normalizes the query.
2. **Photon** returns ranked candidates.
3. **Placeholder** fills in missing admin chain (country / state / city) per candidate.

Returns gracefully when Photon is down: `data: []`, `meta.upstream: "unavailable"`.

## Query parameters

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

## Response `200`

results returned (possibly empty)

- SearchResponse
  - `data` 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` — missing q parameter

---

[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)
