Country

Geocode Spanish addresses offline

One file for all of Spain, read locally. No server, no API key, and the addresses you geocode never leave your machine.

Get started

The file for Spain is 185 MB and holds 15.27 million addresses from CartoCiudad (via Overture Maps), all 52 postal provinces. Download it once, checked against the signed release; every query after that runs on your machine, with no API key and no rate limit.

terminalpip
$ pip install gridpin-mcp   # includes the engine
$ gridpin-fetch es         # Spain, 185 MB, verified download
geocode.pyPython
import gridpin
from gridpin_mcp import sheets

g = gridpin.Geocoder(str(sheets.download("es")))  # no-op once downloaded

g.geocode("Calle de Alcalá 50, 28014 Madrid", 1)
# -> house, Calle Alcala 50, Madrid
g.geocode("Carrer de Reding 9, Tarragona", 1)
# -> house, Calle Reding 9, Tarragona

Castilian and Catalan street types and articles both work (Carrer de, Plaça de, Calle del).

How often it finds the right house, compared with Nominatim and Photon on independent truth: benchmark. Try it without installing: the live demo (pick Spain in the list), or the Colab notebook (set COUNTRY = "es").