Airmail is an extremely lightweight geocoder[^1] written in pure Rust. Built on top of tantivy, it offers a low memory footprint and fast performance. Airmail aims to support international queries in several languages, but in practice it's still very early days and there are definitely bugs preventing correct behavior.
[^1]: A geocoder is a search engine for places. When you type in "vegan donut shop" into your maps app of choice, a geocoder is what shows you nearby places that fit your query.
Airmail's killer feature is the ability to query remote indices, e.g. on S3. This lets you keep your index hosting costs fixed while you scale horizontally. The baseline cost of a global Airmail deployment is about $5 per month.
This guide will create an index with a chosen geographical region (or the planet!) and run Airmail.
git clone git@github.com:ellenhp/airmail.git
cd airmail
mkdir ./data
It's a good idea to build a smaller region first, and then planet if you have the need and space. This guide references Australia, but you can use any region.
./data folder../data/ directory.# Build the images
docker compose build
# Build the index (from a pbf)
docker compose run indexer \
indexer --wof-db /data/whosonfirst-data-admin-latest.spatial.db \
--index /data/index/ \
load-osm-pbf /data/australia-oceania-latest.osm.pbf
# Launch the service
docker compose up airmail
# Install deps
apt-get install -y libssl-dev capnproto clang pkg-config libzstd-dev libsqlite3-mod-spatialite
# Run indexer
cargo run --bin indexer -- \
--wof-db /data/whosonfirst-data-admin-latest.spatial.db \
--index /data/index/ \
load-osm-pbf /data/australia-oceania-latest.osm.pbf
# Run service
cargo run --bin airmail_service -- \
--index /data/index/
Dual MIT/Apache 2 license, at your option.
$ claude mcp add airmail \
-- python -m otcore.mcp_server <graph>