---
title: "Geocode Endpoint"
method: POST
path: "/api/geocode"
---

# Geocode Endpoint

`POST /api/geocode`

Intelligently geocode a location query and return appropriate GeoJSON:
- Administrative boundaries (Polygons) for regions, cities, countries
- Point features for specific addresses, landmarks, buildings

Examples:
- "San Francisco, CA" -> Boundary polygon of the city
- "560 20th Street San Francisco, CA" -> Point at the address
- "Empire State Building, NYC" -> Point at the building
- "France" -> Boundary polygon of the country

## Request body

- GeocodeRequest
  - `query` string, required — Natural language location query (e.g., 'Empire State Building, NYC')

## Response `200`

Successful Response

- APIResponse
  - `status` string, required
  - `data` object, nullable
  - `error` string, nullable
  - `timestamp` string

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/monarcha/apis/monarcha-gis-api.md) · [All operations](https://skmtc.dev/monarcha/apis/monarcha-gis-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/monarcha/monarcha-gis-api/revisions/a2923fbc4d26/schema)
