The texspace Rust geocoder is a self-hosted tool that its developers say can resolve addresses across the whole planet from a single binary. Texspace claims it answers queries 7 to 16 times faster than commercial geocoding APIs and needs 4 to 16 GB of RAM for the entire Earth, against 64 to 128 GB for open-source engines such as Nominatim or Pelias.
These figures come from the project’s own benchmarks, so treat them as the developers’ claims until others reproduce them.
How the engine is built
Texspace compiles 1.21 billion open spatial records into memory-mapped SQLite shards. Addresses are indexed by 64-bit S2 Hilbert cell IDs and Roaring bitmaps. Each token in a query maps to a compressed bitmap of cell IDs, and intersecting street, postal code and locality narrows the planet down to one block.
A 1.81 GB global router covers 33.5 million attributes, 4.27 million places and 17,957 airport codes. It picks one or two of 127 shards in under 0.4 ms.
The data comes from OpenStreetMap, Overture Maps, OpenAddresses and GeoNames. Microsoft building footprints and Who’s On First boundaries are included too. The project lists each licence and credits the contributors.
The project also skips the long database import that classic setups need. Pre-built, checksummed and compressed shards stream from Cloudflare R2, so a team can pull one city, one country, one continent or the whole planet and start querying.
Rooftop accuracy claims
Many geocoders place a pin on the road centreline when an exact address point is missing. Texspace instead looks for 390.9 million exact rooftop points first, then falls back to 750.7 million building footprints and snaps to the roof.
The developers report 96.4% top-1 accuracy, with 85.0% of results within 10 metres. They also say the engine rejects fake streets instead of returning a plausible wrong location, with a 0.0% false-positive rate on unmatchable probes. Its calibration error is 0.034, which they put at 5.7 times better than Google and 8.4 times better than Mapbox.
The head-to-head test used 440 standard queries and 30 negative probes in more than 30 countries. Texspace reports 100% on US and Americas rooftop queries, 97.6% in the EU and 100% on UK postcodes.
Where commercial services still win
The project admits a gap. Because it uses only open data, it trails on business and landmark lookups. On the global landmark slice it scores 88.1%, while Google scores 100%. If your users search for shops and restaurants by name, a commercial service still has the edge.
Running it yourself
The full planet download is 34.3 GB, while Hawaii is about 40 MB. A single US state runs in 8 MB of RAM. On a Hetzner CPX42 with 8 vCPUs and 16 GB of RAM, the developers measured 111 queries per second, roughly 9.6 million geocodes a day. Process memory sat at 65 MB idle and peaked near 2.0 GB under heavy batch load.
Install is one command, cargo install texspace, followed by pulling the shards you want. The tool offers:
- Pelias-compatible GeoJSON endpoints for search, reverse, autocomplete, nearby and batch queries.
- An embedded Rust library and a C interface.
- An MCP server with no API key, so AI agents can run geocoding offline.
Built for AI agents too
The MCP server exposes tools for search, structured search, reverse lookup, nearby search and batch geocoding. Coding assistants such as Claude or Cursor can call them without network access, which suits teams that can’t send addresses to a third party.
Why self-hosting matters here
Terms of service for many proprietary geocoders forbid caching or storing returned coordinates, or charge $5 per 1,000 for permanent storage. Hosting your own copy lets a team keep geocoded data outright and pay no per-request fees. The cost is operating the shards and updating the data.
What’s next for texspace
Mobile offline packs are already live, with 17 city and metro packs from 5.1 to 43.6 MB, plus a 31.7 MB world gazetteer. Native Swift and Kotlin SDKs are marked as shipped. Independent benchmarks would be the next useful test, especially on messy real-world address lists.
Source: texspace