Search docs

Introduction

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

By ยท Updated

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 and OpenStreetMap. Every endpoint answers from one .glx file.

What makes it different

  • Hosted or self-hosted. Call the same API at https://api.geolith.app with a key (Hosted API), or run it yourself.
  • One file. All data is in one .glx file. A .glx file is to geocoding what a .pmtiles archive is to tiles: geolith search serves it as tileserver-rs serves .pmtiles. There is no database and no Elasticsearch cluster.
  • Ranked in the index. Results are ordered by BM25 text relevance plus the importance of each place. Filters apply before place records are read.
  • Safe input. User text is split into words before it reaches the index, so it has no query syntax. Search text is never written to the logs.

The geolith stack

ProjectRoleStatus
geolithBuilds planet basemaps and the .glx geocoding fileLive
tileserver-rsServes vector and raster tiles, styles and fontsLive
geolith searchGeocoding, autocomplete and reverse geocodingLive: hosted at api.geolith.app and self-hosted
Routing on ValhallaTurn-by-turn routingRoadmap

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 /healthReports that the server runs and how many places it serves
GET /openapi.jsonOpenAPI 3.1 document
GET /docsInteractive API reference (Scalar)