# 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](https://geolith.app) 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](/search/hosted/overview)), 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

| Project | Role | Status |
| --- | --- | --- |
| [geolith](https://geolith.app) | Builds planet basemaps and the `.glx` geocoding file | Live |
| [tileserver-rs](https://tileserver.app) | Serves vector and raster tiles, styles and fonts | Live |
| geolith search | Geocoding, autocomplete and reverse geocoding | Live: hosted at api.geolith.app and self-hosted |
| Routing on Valhalla | Turn-by-turn routing | Roadmap |

## Endpoints

| Endpoint | Purpose |
| --- | --- |
| `GET /v1/search` | Forward geocoding from free text |
| `GET /v1/autocomplete` | Search as you type |
| `GET /v1/search/structured` | Geocoding from separate address fields |
| `GET /v1/reverse` | Places nearest to a point |
| `GET /health` | Reports that the server runs and how many places it serves |
| `GET /openapi.json` | OpenAPI 3.1 document |
| `GET /docs` | Interactive API reference (Scalar) |
