<!-- Markdown copy of https://gridpin.dev/free-geocoding-api for agents. The page there is the canonical one. -->
Title: Free geocoding API with no key and no rate limit: run your own
Source: https://gridpin.dev/free-geocoding-api

# A free geocoding API you run yourself

The free tier of a hosted geocoding API ends at a daily or monthly cap, and most need a key. This one has neither, because it runs on your machine: one program, one file per country (places come in a separate, optional file), and an HTTP API on localhost.

[Leave a paid API](https://gridpin.dev/guides-task-migrate-off-api) [Server, Docker](https://gridpin.dev/guides-where-server) [Command line](https://gridpin.dev/guides-where-command-line)

## Two commands

```
$ gridpin-fetch us                          # United States, 1.45 GB, checked; prints the path
$ gridpin serve "$(gridpin-fetch us)" --port 8080
listening on http://127.0.0.1:8080
ready: sheet read and fallback tables built in 3.6 s
```

No account and no key. `gridpin-fetch` downloads the country file once and checks it against the signed release; after that the server makes no network requests. How to install both programs: [install](https://gridpin.dev/docs#install).

## Forward, reverse and batch

```
$ curl "http://127.0.0.1:8080/v1/geocode?q=1600+Pennsylvania+Ave+NW,+Washington,+DC+20500"
{"results":[{"commune":"Washington","confidence":0.949999988079071,"flags":["street_exact","commune_exact","house_rep","pc_exact"],"housenumber":"1600","lat":38.8976751,"lon":-77.036547,"match_level":"PointAddress","match_status":"M","postcode":"20500","precision":"house","score":7.2687788009643555,"street":"PENNSYLVANIA Avenue Northwest","weak":false}]}
```

```
$ curl -X POST http://127.0.0.1:8080/v1/geocode -H "Content-Type: application/json" \
    -d '{"queries": ["233 S Wacker Dr, Chicago, IL 60606", "Nowhere Street 99999, Atlantis"]}'
{"results":[[{"commune":"Chicago","confidence":0.949999988079071,"flags":["street_exact","commune_exact","house_rep","pc_exact"],"housenumber":"233","lat":41.878658,"lon":-87.6358684,"match_level":"PointAddress","match_status":"M","postcode":"60606","precision":"house","score":7.2687788009643555,"street":"South WACKER Drive","weak":false}],[]]}
```

One address is a `GET`; a list of up to 10,000 goes in one `POST`. When nothing fits, the answer is an empty list, not a guess, and every answer says how exact it is in `precision`. Coordinates to an address: [reverse geocoding](https://gridpin.dev/reverse-geocoding).

## Clients you already have

| Your client speaks | Path on the local server | Guide |
|---|---|---|
| Nominatim (geopy, Leaflet and MapLibre search boxes, Traccar) | `/search`, `/reverse` | [local server](https://gridpin.dev/geocoding-server) |
| Google Geocoding API | `/maps/api/geocode/json` | [moving off Google](https://gridpin.dev/migrate-from-google-geocoding) |
| Mapbox Geocoding v5 | `/geocoding/v5/…` | [Mapbox on your server](https://gridpin.dev/mapbox-geocoding-self-hosted) |
| Photon | `/photon/api` | [Photon paths](https://gridpin.dev/docs#photon) |
| Pelias | `/pelias/v1/search` | [server paths](https://gridpin.dev/docs#server) |

Point an existing client at the local address and keep its code. GridPin is not affiliated with these projects and services; their formats are followed so that existing code keeps working.

## What free means here

- The engine is open source under Apache-2.0.
- The country files of each release are free to download, with no account. They are static builds: complete, with no time limit and no update schedule.
- There is no per-request fee on any plan and no cap. The limit is your hardware.
- Paid plans add files rebuilt every month and a commercial licence for products and services you sell: [pricing](https://gridpin.dev/#pricing), [Free, Starter and Pro](https://gridpin.dev/free-vs-pro).

## When a hosted free tier fits better

- You need the whole world. GridPin covers [these countries](https://gridpin.dev/countries) and answers nothing outside them.
- You cannot run a process. There is no hosted GridPin endpoint.
- You search for shops and landmarks by name. GridPin answers addresses first; the places layer is optional and best-effort.

What the hosted services charge once their free tier ends: [geocoding API pricing](https://gridpin.dev/geocoding-prices).

## More

- [Google Geocoding API pricing](https://gridpin.dev/cut-geocoding-bill)
- [Move off the Google Geocoding API](https://gridpin.dev/migrate-from-google-geocoding)
- [Keep your geocoding results](https://gridpin.dev/store-geocoding-results)
- [Google Places API changed: what a store owner does](https://gridpin.dev/google-places-api-change)
- [Mapbox Geocoding API on your own server](https://gridpin.dev/mapbox-geocoding-self-hosted)
- [Geocoding API pricing compared](https://gridpin.dev/geocoding-prices)
- [All guides and countries](https://gridpin.dev/guides)
- [Documentation](https://gridpin.dev/docs)
