© OpenFreeMap © OpenMapTiles © OpenStreetMap contributors
OpenGeocode: free, open-source, self-hosted geocoding
Fast, lightweight, self-hosted geocoding engine in pure Rust.
Get started630 million addresses in a single file.
Forward, reverse and batch geocoding built from OpenStreetMap and OpenAddresses, served from your own hardware.
Self-hosted
og runs on your own hardware. No address leaves your network, and there is no per‑lookup fee.
Fast
0.72 ms a query and 14,087 queries a second on the Netherlands: 6× Photon and Pelias.
Lightweight
One binary, one file, no database. The whole Netherlands fits in 337 MB.
Benchmarks
Paid-API accuracy. None of the weight.
On real web addresses, og puts more answers in the right city than TomTom or OpenCage, and trails TomTom by 1.4 points at street level. Against open-source engines it isn't close: the whole Netherlands on 1 vCPU and 1 GiB, at 0.72 ms a query and 6× the throughput of Photon and Pelias.
Read the full benchmarks →Geocoding real web addresses
First answer within 20 km, % of queries (higher is better)
| Geocoder | Bar | GH4 | GH6 |
|---|---|---|---|
| Google Maps | 98.6% | 88.3% | |
| open-geocode | 93.9% | 78.0% | |
| TomTom | 91.8% | 79.4% | |
| OpenCage | 90.2% | 68.2% | |
| Pelias | 85.9% | 67.8% | |
| Photon | 84.9% | 62.8% | |
| Nominatim | 66.6% | 55.6% |
MESSY STREETS · 959 web addresses · other rows from the paper · og on its Planet Packmethod
Serving a country
Requests per second with p99 under 100 ms (higher is better)
| Geocoder | Bar | Forward | Reverse |
|---|---|---|---|
| open-geocode | 14,087 | 65,606+ | |
| Pelias | 2,323 | 2,406 | |
| Photon | 2,194 | 3,098 |
Every OpenStreetMap address in the Netherlands · each engine alone, memory capped · 16 vCPU / 64 GiB · reverse capped by the load generatormethod
Answering one query
One request at a time · milliseconds (lower is better)
| Geocoder | Bar | p50 | p99 |
|---|---|---|---|
| open-geocode | 0.72 | 4.2 | |
| Photon | 2.0 | 19.4 | |
| Pelias | 4.7 | 9.6 |
Every OpenStreetMap address in the Netherlands · each engine alone, memory capped · 16 vCPU / 64 GiBmethod
Serving 100 requests a second
Least memory to serve 100 req/s, in GiB (lower is better)
| Geocoder | Bar | GiB | vCPU |
|---|---|---|---|
| open-geocode | 1 | 1 | |
| Photon | 4 | 2 | |
| Pelias | 8 | 1 |
Every OpenStreetMap address in the Netherlands · each engine alone, memory capped · page cache includedmethod
Quickstart
v0.1.0 on crates.io ↗From an extract to answers in one binary.
$ cargo install open-geocode --features tuiCompare
No API bills, no database, no cluster to run.
Commercial APIs are quick to start with, but bill every lookup and see every address.
Open-source geocoders keep the data in-house, but need a database or search cluster. og keeps it in-house and runs from one file.
| Feature | og | Commercial | Open source |
|---|---|---|---|
| Self-hostedAddresses stay on your network | Yes | No | Yes |
| No usage feesNo quotas or rate limits | Yes | No | Yes |
| InfrastructureWhat you run and maintain | YesOne binary, one file | YesNone, it's hosted | NoDatabase + search cluster |
| Batch geocodingCSV in, coordinates out | YesFree, unlimited | YesFree tier, then per address | NoNo batch endpoint |
| Open sourceMIT licensed, open data | Yes | No | Yes |
Open source: Nominatim, Pelias and Photon. Commercial: Google, HERE, Mapbox and others.
FAQ
Questions, answered.
Common questions about hosting OpenGeocode, what it costs, and how accurate it is.
Read the documentationHow do I use OpenGeocode?
Build a Pack with og build, then og serve it. See the quickstart.
What hardware do I need to host it?
Very little. This page's search serves the whole planet, a 26.3 GB Pack, from a 4 vCPU VM with 7.6 GB of RAM, using about 0.5 GB of memory.
How much does OpenGeocode cost?
Nothing. No API key, quota or per-lookup fee; you only pay for your machine.
Does it work offline?
Yes. It only needs a connection to download data when building a Pack.
Can I geocode a whole CSV?
Yes, with open-geocode geocode batch. See batch geocoding.
How accurate is it?
It leads the open-source geocoders on the MESSY STREETS benchmark. See the benchmarks.
What about data and privacy?
It runs on your hardware, so no address leaves your network.
Is OpenGeocode open source?
Yes, MIT-licensed, on GitHub.
