Documentation

Introduction

What geolith search is and how it fits into the geolith stack.

geolith search is a geocoding API written in Rust. It answers forward geocoding, autocomplete, structured address search and reverse geocoding over the places and addresses that geolith builds from Overture Maps.

What makes it different

  • Pelias-compatible. The endpoints, parameters and GeoJSON response shape follow Pelias, so Pelias clients work unchanged.
  • Just Postgres. Data lives in one Postgres table. PostGIS answers geometry, and the TIN extension from PlanetScale answers BM25 full-text search. There is no Elasticsearch cluster.
  • Ranked in the index. Results are ordered by text relevance plus the importance of each place, and every query runs under a time budget.
  • Safe input. User text is split into words before it reaches the query, so it can never inject query operators. Search text is never written to the logs.

The geolith stack

ProjectRoleStatus
geolithBuilds planet basemaps and the geocoding table from Overture MapsLive
tileserver-rsServes vector and raster tiles, styles and fontsLive
geolith searchGeocoding, autocomplete and reverse geocodingLive (self-hosted)
Routing on ValhallaTurn-by-turn routingRoadmap
Hosted APIManaged search and tiles endpointsRoadmap

Endpoints

EndpointPurpose
GET /v1/searchForward geocoding from free text
GET /v1/autocompleteSearch as you type
GET /v1/search/structuredGeocoding from separate address fields
GET /v1/reversePlaces nearest to a point
GET /healthChecks that the database answers
GET /openapi.jsonOpenAPI 3.1 document
GET /docsInteractive API reference (Scalar)