Documentation
Everything you need to go from an empty directory to millisecond, fully offline geocoding: one engine, a data file per country (each country also has a separate, optional places file), and every way to call it, listed below.
Get started in 5 minutes
GridPin is an offline geocoder: a country in one memory-mapped file (the optional places layer is a separate file), forward and reverse lookups in milliseconds. Throughput is entirely query-shape dependent — exact lookups run at ~3,000/s per core and reverse at ~1,800/s, while typo-tolerant fuzzy matching is much slower (tens of ms per query); see the benchmarks. No server, no database import; once the files are on disk, no query leaves your machine. To look before installing, open the live demo (it runs on Streamlit's server).
Download a sheet
A sheet is a data file per country — France is a single 365 MB file with 26.1M addresses; every country also has an optional places layer in a separate file. Put it anywhere on disk.
Direct downloads, no account, no key, no sign-up:
- usa.bin
- canada.bin
- germany.bin
- france.bin
- italy.bin
- spain.bin
- australia.bin
- mexico.bin
- netherlands.bin
- brazil.bin
- serbia.bin
- poland.bin
- new-zealand.bin
What each file contains, sizes, checksums and the signed attestation: Getting the files.
Grab the CLI
One self-contained binary from the releases page — download, unpack, put on PATH (see Install below). It memory-maps the sheet on first use and is ready instantly.
Query
Forward, reverse, or batch. Every query runs on your machine; not a byte of what you geocode leaves it.
$ gridpin query france.bin "10 rue de Rivoli, Paris"
Install
CLI. Prebuilt self-contained binaries for Linux x86_64
(x86_64-unknown-linux-gnu), macOS Apple Silicon (aarch64-apple-darwin)
and Windows x86_64 (x86_64-pc-windows-msvc) are attached to every
GitHub release. Since v0.9.0 a release also has
static Linux builds that run on any distribution (x86_64-unknown-linux-musl,
aarch64-unknown-linux-musl) and .deb and .rpm packages (see
Package managers); any other target (Intel macOS, Windows arm) builds from source:
# macOS (Apple silicon) example; pick your platform archive $ base=https://github.com/gridpin/gridpin/releases/download/v0.10.0 $ curl -fsSLO "$base/gridpin-aarch64-apple-darwin.tar.gz" $ curl -fsSLO "$base/gridpin-release-signers" $ curl -fsSLO https://dl.gridpin.dev/v0.10.0/attestation.json $ curl -fsSLO https://dl.gridpin.dev/v0.10.0/attestation.json.sig # unpacking runs its contents sooner or later — authenticate first. The trust root comes # from the OTHER channel: whoever owns one can swap the archive AND its checksum line. $ ssh-keygen -Y verify -f gridpin-release-signers -I gridpin-release \ -n gridpin-g02 -s attestation.json.sig < attestation.json \ || { echo "signature does not verify — STOP"; exit 1; } # extract the EXPECTED hash from the attestation you just authenticated, then COMPARE. # Printing a hash is not a check: something has to fail when it differs. $ want=$(python3 -c 'import json;print([a["sha256"] for a in json.load(open("attestation.json"))["assets"] if a["name"]=="gridpin-aarch64-apple-darwin.tar.gz"][0])') $ test "$want" = "$(shasum -a 256 gridpin-aarch64-apple-darwin.tar.gz | cut -d' ' -f1)" \ || { echo "archive does not match the signed attestation — STOP"; exit 1; } $ tar xzf gridpin-aarch64-apple-darwin.tar.gz && sudo mv gridpin /usr/local/bin/ $ gridpin --help # or build from source (stable Rust) $ cargo build --release --manifest-path gridpin/Cargo.toml
Python. pip install gridpin
DuckDB. Two ways to get gridpin_ext:
-- 1. from DuckDB's own community catalog, which signs and verifies the extension -- there; that trust root is DuckDB's, not ours. The current release needs DuckDB 1.5.6 or newer; -- older DuckDB versions install an older build: INSTALL gridpin_ext FROM community; LOAD gridpin_ext; -- the catalog can lag our releases: Germany needs 0.2.0+, Spain needs 0.3.0+, Brazil needs 0.4.0+, the United States needs 0.5.0+, Canada needs 0.6.0+, Mexico needs 0.7.0+, Australia needs 0.8.0+, New Zealand needs 0.10.0+, Poland needs 0.10.0+ SELECT extension_version FROM duckdb_extensions() WHERE extension_name = 'gridpin_ext';
# 2. when the catalog is unreachable, or for the current release on DuckDB 1.5.5: download # gridpin_ext-<platform>.zip from the releases page. It is built for DuckDB 1.5.5 only. # It is loadable code, so authenticate it BEFORE loading — see "Verifying a release" # in the README; the trust root comes from the other channel, never from the download. $ ssh-keygen -Y verify -f gridpin-release-signers -I gridpin-release \ -n gridpin-g02 -s attestation.json.sig < attestation.json \ || { echo "signature does not verify — STOP"; exit 1; } $ want=$(python3 -c 'import json;print([a["sha256"] for a in json.load(open("attestation.json"))["assets"] if a["name"]=="gridpin_ext-osx_arm64.zip"][0])') $ test "$want" = "$(shasum -a 256 gridpin_ext-osx_arm64.zip | cut -d' ' -f1)" \ || { echo "extension does not match the signed attestation — STOP"; exit 1; } # The file inside is named gridpin_ext.duckdb_extension — keep that name: DuckDB derives # the entry symbol from the file's basename, so it must load as gridpin_ext. $ unzip gridpin_ext-osx_arm64.zip $ duckdb -unsigned
LOAD '/path/to/gridpin_ext.duckdb_extension';
Forward geocoding
Address in, ranked candidates out. -k sets how many candidates you want.
$ gridpin query france.bin "1 rue de la Paix Paris" -k 3
Reverse geocoding
Coordinates in, nearest known address out — with a precision flag and its distance, so an approximate hit is never dressed up as exact.
$ gridpin reverse france.bin 48.8686 2.3305
Sheets
gridpin sheets list, gridpin sheets where [cc], gridpin sheets verify [cc|file],
gridpin sheets fetch cc [--offline]: the cache folder is shared with gridpin-mcp (GRIDPIN_HOME,
$XDG_CACHE_HOME/gridpin, ~/.cache/gridpin), downloads go through the system curl,
and GRIDPIN_OFFLINE=1 keeps everything local.
Each country is one file, and each covers the whole country unless its row says otherwise. Every file, with its addresses, source and size, is in the table under Getting the files; the optional POI layer of each country is a separate file.
postcode. Give the town with a Bavarian address: a street and a postcode alone typically return a
same-named street elsewhere with low confidence.
The free tier ships static builds of all available countries; monthly updates are subscriber-only.
- New Zealand: 0.10.0 — a suburb, a town or both ("100 Cuba Street, Te Aro, Wellington"), "45/99 Guppy Road" units, street names written apart or together ("Camphill" and "Camp Hill"), "Saint" and "St", "Mt" and "Mount", a house number after the street, a town written first, typos in a street name with the house number kept.
- Poland: 0.10.0 — "ul.", "al.", "pl." and "os." street types, "00-950" postcodes, letters written without diacritics ("Lodz"), a flat after a slash ("21a/20"), houses stored as "10/16" found by "10", "Zawoja 1234" in a village without streets, streets named after a date ("3 Maja", "3-go Maja"), a voivodeship after the town, "postcode town" as the town, a PO box ("skrytka pocztowa") not read as a street.
- Australia: 0.8.0 — "3/45 Smith St" units, four-digit postcodes that read like house numbers, "25 Mitchell St, Darwin NT 800" without the leading zero, house ranges, "Sydney NSW 2000" and a postcode alone as a place, a place name before the address.
- Mexico: 0.7.0 — "06700 Cuauhtémoc, CDMX" tails, Mexico City codes written without the leading zero, "#" and "C.P." marks, "s/n" addresses, typeless streets under a bare postal code.
- Canada: 0.6.0 — place written before the address, Edmonton and Calgary quadrants, French street types in front, "A9A 9A9" postal codes.
- United States: 0.5.0 — trailing street types, directions, ZIP+4, state tails.
- Brazil: 0.4.0.
pip install --upgrade gridpin==0.10.0.
Links on this page target the v0.10.0 release and its attestation. Earlier releases stay unchanged at their own addresses.
Getting the files
Everything published today is free and needs no key, no account and no sign-up. Download only the file of the country your addresses are in: each file is one country, ready to query on its own. Click a file name to download it.
| File | What’s inside | Size |
|---|---|---|
australia.bin | Australia. 11.92M addresses in all states and territories, including the external territories. Source: Overture: G-NAF via OpenAddresses. | 130 MB |
au_poi.bin | Australia, places. Optional add-on to australia.bin: places by name. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 131 MB |
brazil.bin | Brazil. 67.19M addresses in 26 states and the Federal District. Source: Overture / IBGE CNEFE 2022. | 677 MB |
br_poi.bin | Brazil, places. Optional add-on to brazil.bin: places by name. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 502 MB |
canada.bin | Canada. 16.94M addresses in all provinces and territories; answers carry the postal code. Source: Overture: Statistics Canada National Address Register, Adresses Québec, Yukon. | 183 MB |
ca_poi.bin | Canada, places. Optional add-on to canada.bin: places by name. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 150 MB |
france.bin | France. 26.1M addresses. Source: BAN, the national registry. | 365 MB |
fr_poi.bin | France, places. Optional add-on to france.bin: places by name, such as “Musée du Louvre, Paris”. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 399 MB |
germany.bin | Germany. 22.84M addresses in 16 of 16 Länder; Bavaria without postcodes. Source: Overture / OpenAddresses; Bavaria: LoD2 building models (LDBV). | 256 MB |
de_poi.bin | Germany, places. Optional add-on to germany.bin: places by name. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 535 MB |
italy.bin | Italy. 25.9M addresses. Source: Overture / ANNCSU. | 247 MB |
it_poi.bin | Italy, places. Optional add-on to italy.bin: places by name. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 381 MB |
mexico.bin | Mexico. 14.14M addresses in all 32 states, from an address layer surveyed in 2009–2010; answers carry the postal code where the source has one. Source: Overture: INEGI address layer via AddressForAll. | 156 MB |
mx_poi.bin | Mexico, places. Optional add-on to mexico.bin: places by name. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 260 MB |
netherlands.bin | Netherlands. 9.9M addresses. Source: Overture / BAG. | 103 MB |
nl_poi.bin | Netherlands, places. Optional add-on to netherlands.bin: places by name. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 138 MB |
new-zealand.bin | New Zealand. 2.43M addresses in all 16 regions and the Chatham Islands. Source: Overture: LINZ NZ Addresses via OpenAddresses. No postcodes: the register has none. | 29 MB |
nz_poi.bin | New Zealand, places. Optional add-on to new-zealand.bin: places by name. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 24 MB |
poland.bin | Poland. 8.63M addresses in all 16 voivodeships, including village addresses without a street. Source: Overture: PRG address points via OpenAddresses. | 106 MB |
pl_poi.bin | Poland, places. Optional add-on to poland.bin: places by name. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 109 MB |
serbia.bin | Serbia. 2.6M addresses. Source: Overture / RGZ. | 32 MB |
rs_poi.bin | Serbia, places. Optional add-on to serbia.bin: places by name. Serbia has fewer places than other countries, as in Overture. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 15 MB |
spain.bin | Spain. 15.27M addresses in all 52 postal provinces, including Ceuta and Melilla. Source: Overture / CartoCiudad. | 185 MB |
es_poi.bin | Spain, places. Optional add-on to spain.bin: places by name. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 255 MB |
usa.bin | United States. 95.33M point addresses plus 34.52M points from address ranges, in 50 states and the District of Columbia: point addresses in 35 states, address ranges only in CO, FL, HI, MS, NH, NV and SC (the state table is in the sheet passport). Source: Overture: NAD and state and county open data; Census TIGER/Line 2025 address ranges. | 1.45 GB |
us_poi.bin | United States, places. Optional add-on to usa.bin: places by name. Not needed to geocode addresses; how it combines with the sheet: sheets and layers. | 1.7 GB |
world_places.bin | Towns of every country. Optional add-on to any country sheet: 2.88M towns and cities of every country by name, asked with --also-after when a row lies abroad. Not needed to geocode addresses; outside the signed release set until 0.11.0, its SHA-256 is in world_places.bin.sha256 next to it; how it combines with the sheet: towns of any country. | 390 MB |
How old each sheet's data is, and what an outdated sheet costs: freshness. The engine binaries, the checksums and the signed provenance attestation are on the GitHub releases page.
Every sheet carries its provenance inside the file: gridpin meta france.bin
prints the source, its license, the source release and the attribution you need when you
redistribute. The release additionally ships verify_release.py, which checks the
owner’s signature over the whole set — see
Verifying a release.
A published sheet is a static build: it does not change under you, and no refresh schedule is promised. Regularly rebuilt sheets come with the paid plans: Paid plans.
Forward, reverse and batch
Batch mode and spreadsheets
JSON Lines in ({"q": "1 rue de la Paix Paris"} per line), JSON Lines out ({"results": […candidates…]} per line, order preserved).
This is the fastest path for large jobs.
$ gridpin batch france.bin in.jsonl out.jsonl -k 1
A .csv, .tsv or .tab file comes back with all its columns plus gp_lat, gp_lon, gp_precision,
gp_confidence, gp_weak, gp_street, gp_housenumber, gp_postcode, gp_commune, gp_region. The address column
is address, query or q, or name it with --column (several columns are joined with a comma). Every row stays,
in order; a row without an answer keeps empty gp_* cells. Input must be UTF-8 (in Excel: Save As → CSV UTF-8).
-k 3 gives up to three rows per address with gp_rank.
$ gridpin batch usa.bin addresses.csv geocoded.csv $ gridpin batch usa.bin orders.csv geocoded.csv --column "street,city,zip" --delimiter ";"
An address already split into columns (new in 0.9.0): --columns street=Street,number=No,city=Town,region=State,postcode=ZIP
names the column of each field; street is required, the rest optional, and a bare name means a column of that name.
- The engine reads the fields as such and the same fields joined into a line, and keeps the field reading only when it lands on an exact house of an exact street in the named region, so it answers at least as well as joining the columns yourself.
- From pandas, pass a dict instead of a column name:
gridpin.geocode_df(df, dict(street="Street", number="No", city="Town"), "us"). POST /v1/geocodetakes the same objects beside plain strings.
Your own names. --aliases places.csv (columns name,address) answers “HQ” or “Depot 3” with
the address you gave it. The name must be the whole query; the answer is the one the address itself gets, plus the flag
alias and the column gp_alias_name. Works for gridpin query, gridpin batch and
gridpin serve; the sheet is not changed.
A file of coordinates. --reverse reads the columns lat/latitude and
lon/lng/longitude (or --lat-column, --lon-column) as points and adds
gp_distance_m beside the usual gp_* columns.
$ gridpin batch usa.bin clients.csv out.csv --columns street=Street,number=No,city=Town,region=State,postcode=ZIP $ gridpin batch usa.bin orders.csv out.csv --aliases places.csv $ gridpin batch usa.bin pings.csv out.csv --reverse
Coordinates, crossings and special addresses in a query new in 0.9.0
For anyone whose address list also holds coordinates, street crossings or PO boxes: the engine recognises these forms by itself, and three flags let you choose how close an answer must be to what was written.
What you need
A query line, or the address column of a CSV
| Field | Required | What it holds | Example |
|---|---|---|---|
| a point | no | decimal degrees (also with N/S/E/W), degrees-minutes-seconds, UTM with its zone, MGRS, a full Plus Code, a geohash with geohash:, a DIGIPIN of India Post (ten symbols, or the older 3-3-4 form with hyphens) | 48.8566, 2.3522, 48°51'24"N 2°21'03"E, 31U 448252 5411955, 31UDQ4825211954, 8FVC9G8F+6X, geohash:u4pruydqqvj, 39J49LL8T4 |
| a crossing | no | two street names joined by one of & / and at corner of y esquina e et angolo en hoek und Ecke i ugao, without a house number | H St NW & 15th St NW, Washington, DC |
| a special address | no | PO Box, Postfach, Apartado de Correos, Caixa Postal, APO, a milepost, a motorway exit, c/o Name, address | PO Box 123, Springfield, IL, APO AE 09012, mile 47 I-80, Exit 12 |
| a block | no | a hundred of a street, as police and court records hide a house | 1200 block of Main St |
id,address 1,"1600 Pennsylvania Ave NW, Washington, DC" 2,"H St NW & 15th St NW, Washington, DC" 3,"18SUJ2339407396" 4,"PO Box 123, Springfield, IL"
Your own abbreviations (only with --abbrev)
| Field | Required | What it holds | Example |
|---|---|---|---|
| first column | yes | the short form your data uses; with or without the dot, any case, whole words only | Conn. |
| second column | yes | the full form, separated from the first by a tab | Connecticut |
Penn Pennsylvania Conn. Connecticut
The country sheet
Run it
1. Ask one line with gridpin query: a crossing, a point in MGRS.
$ gridpin query usa.bin "H St NW & 15th St NW, Washington, DC" -k 1 $ gridpin query usa.bin "18SUJ2339407396" -k 1
2. Answer a whole file with gridpin batch. Add --strict when a wrong point costs more than a missing one, --lenient for typed or OCR'd lists with long street names.
$ gridpin batch usa.bin forms.csv out.csv --strict
3. Write out your own short forms before the query with --abbrev.
$ gridpin query usa.bin "1101 Conn. Ave NW, Washington, DC" -k 1 --abbrev trade_words.tsv
What you get
$ gridpin query usa.bin "18SUJ2339407396" -k 1
{"lat":38.8976751,"lon":-77.036547,"precision":"house",…,"housenumber":"1600",…,"flags":["coords_in","input_mgrs"],"distance_m":5.6,…}
$ gridpin batch usa.bin forms.csv out.csv (columns trimmed)
id,address,gp_lat,gp_lon,gp_precision,gp_confidence,gp_weak,…,gp_match_level,gp_match_status
1,"1600 Pennsylvania Ave NW, Washington, DC",38.8976751,-77.036547,house,0.94,false,…,PointAddress,M
2,"H St NW & 15th St NW, Washington, DC",38.9004403,-77.033353,intersection,0.4,false,…,StreetInt,M
3,18SUJ2339407396,38.8976751,-77.036547,house,0.95,false,…,PointAddress,M
4,"PO Box 123, Springfield, IL",39.7873129,-89.6583826,city,0.05,true,…,Locality,T
$ gridpin batch usa.bin forms.csv out.csv --strict (row 4 only)
4,"PO Box 123, Springfield, IL",,,,,,,,,,,,U
$ gridpin query usa.bin "1101 Conn. Ave NW, Washington, DC" -k 1
{…,"precision":"city",…,"commune":"Washington",…,"weak":true,"match_level":"Locality",…}
$ gridpin query usa.bin "1101 Conn. Ave NW, Washington, DC" -k 1 --abbrev trade_words.tsv
{…,"precision":"house",…,"street":"CONNECTICUT Avenue Northwest","housenumber":"1101",…}
| Column | Values | Meaning |
|---|---|---|
precision | intersection | a crossing; Google types say ["intersection"] |
match_level | StreetInt | a crossing |
flags | coords_in with input_decimal, input_dms, input_utm, input_mgrs, input_plus_code, input_geohash or input_digipin | the query was a point; the answer is the nearest house, as reverse gives it |
flags | po_box, military, milepost, exit | a special address: the answer is the town it names, with weak: true |
flags | care_of | c/o Name, address: the address after the name (or the whole line, when that already reaches a house) |
flags | block | a block: the house nearest the middle of the hundred |
gp_match_status | U | with --strict: the answer did not match as written and the row is left empty |
How it works
Before the address path, the line is tested against each form, and a form is taken only when it is unambiguous; anything else is read as an address, as before. For a crossing both streets are looked up in one place, and the answer is the middle of their two closest houses, if they are within 80 m. A line that is itself one street (“Calle de Ramón y Cajal”) stays a street.
Limits
- A short Plus Code (
9G8F+6X) needs a reference point and is not read; a five-digit number is never a point. - Streets that never come within 80 m of each other keep the old answer.
- A special address has no door to point at: the answer is the town. A street named like the form (Mexico City's Calle Apartado) stays a street.
- A block answers a house near the middle:
1200 block of Pennsylvania Ave NWgave 1275,precisionnear. --strictkeeps only answers that match the query as written: no fuzzy street, no interpolated or neighbour's point, nothingweak.- Its price on the clean Wikidata sets, November 8, 2026: United States 1,486 of 3,662 answers dropped (359 were within 150 m of the truth), Spain 1,136 of 2,000 (581 right), Australia 263 of 2,000 (124 right).
--lenientlets a street name of 9–11 letters be two edits away instead of one. It changed 4 of 3,000 answers on the messy sets of Spain, Mexico and Australia.
All its keys: command reference. Related: the same flags in batch, when there is no single answer.
When there is no single answer new in 0.9.0
For agents and forms that must not guess: when an address fits several far-apart places, or when nothing was found, the answer says so and why, so you can ask the person instead of picking for them.
What you need
A query
| Field | Required | What it holds | Example |
|---|---|---|---|
| the address line | yes | any address; a question back comes only when it fits places far apart | 100 Main St |
The country sheet, and for the JSON form a running gridpin serve
Run it
1. On the command line the question or the reason goes to stderr; stdout stays the answers.
$ gridpin query usa.bin "100 Main St" -k 1
2. On the server, GET /v1/geocode adds clarify or reason next to results.
$ gridpin serve usa.bin $ curl 'http://127.0.0.1:8080/v1/geocode?q=100+Main+St&limit=1' $ curl 'http://127.0.0.1:8080/v1/geocode?q=Zzzyx+Qwerty+Street+5,+Washington,+DC'
3. In Python call Geocoder.geocode_or_ask(q). The MCP tool geocode adds kind (answer, clarify, none) with the same fields.
What you get
$ gridpin query usa.bin "100 Main St" -k 1
gridpin: 5 places match; add the city to choose: Baton Rouge 70801 | Annapolis 21401 | Auburn 36830 | Alexander City 35010 | Abilene 79606
{"lat":30.4511948,"lon":-91.190243,"precision":"house",…,"street":"MAIN Street","housenumber":"100","commune":"Baton Rouge",…,"flags":["street_exact","house_rep","ambiguous_far"],…}
$ curl 'http://127.0.0.1:8080/v1/geocode?q=100+Main+St&limit=1'
{"clarify":{"missing":"city","options":[{"city":"Baton Rouge","label":"Baton Rouge 70801","lat":30.4511948,"lon":-91.190243},{"city":"Annapolis","label":"Annapolis 21401",…},…]},"results":[{"commune":"Baton Rouge","confidence":0.2000…,…}]}
$ curl 'http://127.0.0.1:8080/v1/geocode?q=Zzzyx+Qwerty+Street+5,+Washington,+DC'
{"reason":"no_house","results":[]}
| Column | Values | Meaning |
|---|---|---|
clarify.missing | city, region, postcode | what to add: the town for different towns; for towns of one name the region (on sheets that know regions) or the postcode |
clarify.options | label, city, region, lat, lon | the places to choose from; put the choice to the user and query again with it |
reason | no_street | the street is not on the file, not even within the fuzzy distance |
reason | no_house | a street of that name was a candidate and no answer on it passed |
reason | city_unknown, outside_sheet, unparsed | the place named is not on the file; a coordinate with nothing near on this country's file; the line was not read |
How it works
A question is asked only where the engine already marks an answer ambiguous_far: the two best candidates score alike and lie more than 50 km apart. The options are the distinct places among the best candidates. The usual answers do not change: the first answer is still the best candidate, and the question or the reason comes beside it.
Limits
- An agent should not pick one of the options itself.
- The options come from the ten best candidates, so a place further down is not offered.
- The reason is the stage where the search stopped, not proof that the address does not exist: use
gridpin existsfor that.
All its keys: command reference. Related: the server, MCP server.
Check the answers against points you know new in 0.9.0
Before you trust GridPin with your data, measure it on rows whose true point you already know: delivered parcels, surveyed sites, a register of buildings.
What you need
A CSV of addresses with their true points
| Field | Required | What it holds | Example |
|---|---|---|---|
| an address column | yes | the address; named address, query or q, or name it with --column (several joined with “, ”) | 1600 Pennsylvania Ave NW, Washington, DC 20500 |
lat | yes | latitude of the truth; also latitude, or --lat-column | 38.89768 |
lon | yes | longitude of the truth; also lng, longitude, or --lon-column | -77.03655 |
| other columns | no | kept in the -o file | id |
id,address,lat,lon 1,"1600 Pennsylvania Ave NW, Washington, DC 20500",38.89768,-77.03655 2,"233 S Wacker Dr, Chicago, IL 60606",41.87887,-87.63591 3,"350 5th Ave, New York, NY 10118",40.74844,-73.98566 4,"400 Broad St, Seattle, WA 98109",47.62051,-122.34931
The country sheet
Run it
1. Run gridpin bench. --min-match-rate 0.85 makes it fail (exit 1) below that bar, for a check in a pipeline. -o writes every row with its answer and its distance.
$ gridpin bench usa.bin known_points.csv --min-match-rate 0.85 -o checked.csv
What you get
{
"rows": 4,
"answered": 4,
"within_150m": 4,
"share_within_150m": 1.0,
"median_m": 12.92,
"p95_m": 53.1,
"match_rate": 1.0,
"by_match_level": {
"PointAddress": 4
}
}
$ cat checked.csv (columns trimmed)
id,address,lat,lon,gp_lat,gp_lon,gp_precision,…,gp_match_level,gp_match_status,gp_error_m
1,"1600 Pennsylvania Ave NW, Washington, DC 20500",38.89768,-77.03655,38.8976751,-77.036547,house,…,PointAddress,M,0.6
3,"350 5th Ave, New York, NY 10118",40.74844,-73.98566,40.7488827,-73.9860301,house,…,PointAddress,M,58.3
| Column | Values | Meaning |
|---|---|---|
rows, answered | counts | rows read, rows with an answer |
within_150m, share_within_150m | count, share | answers within 150 m of the truth |
median_m, p95_m | metres | distance from the truth over the answered rows |
match_rate | share | rows matched at an address: PointAddress, StreetAddress, StreetInt |
by_match_level | counts | answers by level |
gp_error_m | metres | in the -o file: this row's distance from the truth |
How it works
Each row is geocoded as gridpin batch does it, and the answer is compared with your point. The figures are computed as in our own benchmark (a sphere of 6,371 km, p95 linear over the answered rows), so a run on our sets gives our numbers.
Limits
- The result is only as good as your truth: a point in the middle of a big building can be 50 m from its door (row 3 above).
- The match rate is the usual bar in crime analysis, with Ratcliffe's 85 %; it says nothing about distance.
- Distances are straight lines on the sphere.
--by state(new in 0.10.0) gives the same figures for each value of a column; a slice under 300 rows is marked"probe": trueand says little about a difference.--answers other.csv(new in 0.10.0) judges answers you already collected from another engine (columnsid,lat,lon) on the same truth, without geocoding; it prints the coverage and any ids that are not in your file.
All its keys: command reference. Related: our benchmark, fire and EMS.
Addresses in free text new in 0.9.0
For anyone who gets addresses inside text (a letter, a delivery note, the answer of a language model) and needs them as points, or needs to know which of them are made up.
What you need
A text file
| Field | Required | What it holds | Example |
|---|---|---|---|
| the text | yes | plain text in UTF-8; - reads standard input | a letter |
Hola Ana, el paquete llega a Calle Gran Via 1, Madrid el lunes. Llama al 612 345 678. La factura va a Calle de Alcala 9999, Madrid.
Or a CSV with one text per row (--input)
| Field | Required | What it holds | Example |
|---|---|---|---|
| a text column | yes | the text, named with --column | Recogida en Calle Gran Via 1, Madrid |
| other columns | no | ignored; the answer names the row | id |
id,text 1,"Recogida en Calle Gran Via 1, Madrid" 2,"Sin direccion"
The country sheet
Run it
1. Read the text. --verify also lists addresses with a house number the sheet does not have: a check for invented addresses in generated text.
$ gridpin extract spain.bin --text letter.txt --verify
2. Read one text per row of a CSV.
$ gridpin extract spain.bin --input notes.csv --column text
3. The same on the server (POST /v1/extract, up to 64 KiB) and in Python (Geocoder.extract(text, verify=False)).
$ curl -d '{"text": "Deliver to 1600 Pennsylvania Ave NW, Washington, DC 20500 before noon."}' http://127.0.0.1:8080/v1/extract
What you get
$ gridpin extract spain.bin --text letter.txt --verify
{"end":53,"hit":{"commune":"Madrid",…,"housenumber":"1",…,"precision":"house",…,"street":"Calle Gran Via",…},"level":"house","start":29,"text":"Calle Gran Via 1, Madrid","verdict":"found"}
{"end":130,"hit":{…,"housenumber":"728",…,"street":"Calle Alcala","weak":true},"level":"none","reason":"number_not_on_street","start":86,"text":"La factura va a Calle de Alcala 9999, Madrid","verdict":"not_found"}
$ gridpin extract spain.bin --input notes.csv --column text
{"end":36,"hit":{…},"level":"house","row":0,"start":12,"text":"Calle Gran Via 1, Madrid","verdict":"found"}
$ curl -d '{"text": "Deliver to 1600 Pennsylvania Ave NW, …"}' http://127.0.0.1:8080/v1/extract
{"results":[{"end":47,"hit":{…,"housenumber":"1600","street":"PENNSYLVANIA Avenue Northwest",…},"level":"house","start":0,"text":"Deliver to 1600 Pennsylvania Ave NW, Washington","verdict":"found"}]}
| Column | Values | Meaning |
|---|---|---|
start, end | positions | where the address stands in the text |
text | text | the words read as the address |
level | house, street, none | what the sheet confirmed |
verdict | found, not_found | not_found comes only with --verify |
reason | street_unknown, number_not_on_street, ambiguous | why a not_found address was not confirmed |
hit | an answer | the usual answer object |
row | 0, 1, … | with --input: the data row, counted from 0 |
How it works
There is no model inside. Windows of words around a house number or a street word are asked of the engine, and only a confirmed house or street is kept. Phone numbers are never read as house numbers: the phone in the letter above is not in the output.
Limits
- One country sheet per run: an address of another country is not found.
- The span can take a few words before the address (“Deliver to” above): use the answer, not the span, as the address.
- The
hitof anot_foundaddress is the engine's nearest guess, marked weak: do not use its point. - With two addresses in one line, a span can start inside a street name (“Campos, 73” read out of “Av. Dr. Carlos de Campos, 73”) and the answer lands elsewhere. Seen most in Brazil, less in Spain and Germany: when it matters, compare with
gridpin queryon the same line.
All its keys: command reference. Related: check an address in a document, does the address exist.
Does the address exist, and why this answer new in 0.9.0
For an address form, a data clean-up or a support case: gridpin exists tells whether an address as written is on the sheet, and gridpin explain tells why the engine answered as it did, before you report an answer as wrong.
What you need
An address line
| Field | Required | What it holds | Example |
|---|---|---|---|
| the address | yes | as the person wrote it | Calle Gran Via 9999, Madrid |
Or a CSV for a whole list (--with exists)
| Field | Required | What it holds | Example |
|---|---|---|---|
| an address column | yes | address, query or q, or --column | Calle Gran Via 1, Madrid |
id,address 1,"Calle Gran Via 1, Madrid" 2,"Calle Gran Via 9999, Madrid"
The country sheet
Run it
1. Check one address.
$ gridpin exists spain.bin "Calle Gran Via 9999, Madrid"
2. See how the engine read a line and what it weighed; --format json gives the same as JSON.
$ gridpin explain spain.bin "gran via 1 madrid"
3. Check a whole list as two extra columns.
$ gridpin batch spain.bin form.csv form_out.csv --with exists
4. Both are also on the server: /v1/exists, /v1/explain.
What you get
$ gridpin exists spain.bin "Calle Gran Via 9999, Madrid"
{"exists":"no","reason":"number_not_on_street"}
$ gridpin explain spain.bin "gran via 1 madrid"
The line was read as street "gran via madrid", town not named, house number 1, postcode none (5 readings tried).
Fields: city: confirmed, number: confirmed, postcode: inferred, street: confirmed.
Exists: yes (house_found).
1. Calle Gran Via 1, Madrid (house) — score 5.55
$ gridpin batch spain.bin form.csv form_out.csv --with exists (columns trimmed)
id,address,gp_lat,gp_lon,gp_precision,…,gp_exists,gp_exists_reason
1,"Calle Gran Via 1, Madrid",40.4191474,-3.6980566,house,…,yes,house_found
2,"Calle Gran Via 9999, Madrid",40.423349,-3.7104527,near,…,no,number_not_on_street
| Column | Values | Meaning |
|---|---|---|
exists | yes | house_found: the house with the asked number, in the town the line names, the postcode not replaced, and an answer the engine does not doubt |
exists | maybe | number_interpolated (between known houses), no_number (none asked), postcode_differs, town_not_on_sheet (the line names a town the sheet does not have, and its postcode does not place the house there), weak_answer (the answer is weak or its confidence is below 0.3) |
exists | no | number_not_on_street (the street is there, the number is not), street_unknown, wrong_city, empty (no answer at all) |
explain: Fields | confirmed, corrected, inferred, replaced, unresolved, absent | what happened to each field of the query, as in --with verdict |
explain JSON: candidates | rank, answer, score, lost_on | the candidates weighed and what each lost on |
How it works
exists reads the top answer and the verdict on each field of the query; nothing is looked up beyond the usual search. explain prints the reading of the line that gave the answer, the field verdicts and the candidates with what each lost on.
Limits
- It checks the sheet, not the world: a new house not yet in the data is
no. - A town written by its districts on the sheet (Berlin) counts as the town named.
- The town is read from the segments after the first comma. A line without commas ("3 rue de la paix 75002 paris") is judged without it.
- A town the sheet does not have gives
maybe, even when the house is right. - The letter of a house number is not compared. "5v" answered by house 5 is still
yes. explaindescribes this engine's choice: it does not say what the right answer is.- An answer found as a place by its name, a point of interest or a postcode comes from no street and town reading;
explainthen says so instead of naming one.
All its keys: command reference. Related: explain, addresses in free text.
Print an address the way the post writes it new in 0.9.0
For a label, an envelope or a form that must look as the country's post expects: gridpin format prints the top answer in that country's layout.
What you need
An address line
| Field | Required | What it holds | Example |
|---|---|---|---|
| the address | yes | any address the sheet answers | Unter den Linden 77, Berlin |
The layout (optional)
| Field | Required | What it holds | Example |
|---|---|---|---|
--layout | no | sheet (the sheet's own country, by default), a country code or default | de, fr, us, br |
The country sheet
Run it
1. Print the answer in the sheet's own layout.
$ gridpin format germany.bin "Unter den Linden 77, Berlin"
2. Print it in another country's layout.
$ gridpin format germany.bin "Unter den Linden 77, Berlin" --layout us
3. In a batch the same comes as a column.
$ gridpin batch germany.bin label.csv label_out.csv --with postal
What you get
$ gridpin format germany.bin "Unter den Linden 77, Berlin" Unter den Linden 77 10117 Mitte $ gridpin format germany.bin "Unter den Linden 77, Berlin" --layout us 77 Unter den Linden Mitte 10117 $ gridpin format usa.bin "1600 Pennsylvania Ave NW, Washington, DC" 1600 PENNSYLVANIA Avenue Northwest Washington 20500 $ gridpin batch germany.bin label.csv label_out.csv --with postal (columns trimmed) id,address,gp_lat,gp_lon,…,gp_postal 1,"Unter den Linden 77, Berlin",52.5161329,13.3801488,…,"Unter den Linden 77 10117 Mitte"
| Column | Values | Meaning |
|---|---|---|
gp_postal / postal | text of two or three lines | the answer laid out: number before or after the street, postcode before or after the town |
| layouts | default, de, nl, es, it, fr, rs, mc, us, ca, au, br, mx, pl, nz | a country without its own layout uses default (street, number, postcode, town); a postcode the sheet keeps as digits only is written in its country's shape (00624 → 00-624 in Poland) |
How it works
The answer's fields (number, street, postcode, town, region, neighbourhood) are put into the country's template. An empty field is dropped together with the separator next to it.
Only an answer the sheet stands behind is printed. A line it does not answer, or answers only with a guess (a weak answer, "weak": true in gridpin query), prints nothing and ends with an error that names the guess, so a label never carries an address in another town. In a batch the same row keeps its answer and gp_weak=true, and gp_postal stays empty.
Limits
- The town is the town of the sheet: Berlin is written by districts, so the label says “Mitte”. The ISO 20022 form (
--out iso20022) writes the postal town instead: structured addresses for payments. - A field the answer lacks is left out: answers on the United States sheet carry no state, so the US layout prints “Washington 20500” without “DC”.
- It lays out the answer, not your line: a wrong answer gives a wrong label. A house in another town than the one you wrote still prints. Check it with
gridpin exists: it sayswrong_cityortown_not_on_sheet.
All its keys: command reference. Related: --with postal.
Addresses for health records: FHIR Address new in 0.10.0
For a hospital, a lab or a health app that keeps patients' and sites' addresses in HL7 FHIR: gridpin format --out fhir turns an address line into a FHIR Address with its point, on your machine. The structure is written only when the sheet confirms the house in the town the line names.
What you need
| Field | Required | What it holds | Example |
|---|---|---|---|
| the address | yes | one line, as the record holds it | 1600 Pennsylvania Ave NW, Washington, DC 20500 |
| the country sheet | yes | the sheet of the address's country | usa.bin |
Run it
1. One address.
$ gridpin format usa.bin "1600 Pennsylvania Ave NW, Washington, DC 20500" --out fhir
2. A table: the resource comes as one JSON column.
$ gridpin batch france.bin addresses.csv out.csv --with fhir
What you get
{"address":{"type":"physical",
"text":"1600 PENNSYLVANIA Avenue Northwest, Washington 20500",
"line":["1600 PENNSYLVANIA Avenue Northwest"],
"city":"Washington","postalCode":"20500","country":"US",
"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/geolocation",
"extension":[{"url":"latitude","valueDecimal":38.8976751},
{"url":"longitude","valueDecimal":-77.036547}]}]},
"mode":"structured","reasons":[]}
# a house the sheet does not confirm: the line as written, nothing more
$ gridpin format france.bin "350 Rue de la Paix, Paris" --out fhir
{"address":{"text":"350 Rue de la Paix, Paris"},"mode":"as_written","reasons":["weak_answer","street_unknown"]}
| Field | Values | Meaning |
|---|---|---|
mode / gp_fhir_mode | structured, as_written, none | the same reading as the ISO 20022 address: structured there means structured here |
address / gp_fhir_address | a FHIR Address | structured: type, text, line, city, district, state, postalCode, country, the point; otherwise text alone |
reasons | codes | why the address is not structured, or what was corrected: weak_answer, number_not_on_street, wrong_city, po_box and the others of ISO 20022 |
gridpin format --out parts prints the parts every structured format is built from: number and suffix, the street split into direction, name and type on sheets that write the type last (United States, Canada, Australia), flat, floor, post office box, town, district, region, postcode, country.
How it works
The line is read once, the way the ISO 20022 form reads it: a house the sheet confirms, in the town the line names, gives a structured address; a weak answer counts as no answer. FHIR asks that when both text and the parts are given, the text holds nothing the parts lack. So a structured address writes text from its own parts, in the order of the country's postal layout. Any other reading gives text alone: the line as written, with no parts beside it.
Limits
- The point is only that of a confirmed house: a post office box or a street without a number has none.
- The street is split only where the sheet writes the street type last; elsewhere it stays whole in
line. - Answers on the United States sheet carry no state, so
stateis empty there. - FHIR resources are not read yet: give the address lines, not a
Bundle. - These are the checks of the engine, not a conformance statement; checked against the R5 text of
Address, not with the HL7 validator. - The address does not leave your machine: see geocoding patient addresses.
All its keys: command reference. Related: postal layout, ISO 20022 address.
GeoJSON input and long runs new in 0.9.0
For GIS users who keep their places as GeoJSON, and for anyone with a run of millions of lines: gridpin batch answers GeoJSON features in place, and --resume continues a JSONL run that was cut off.
What you need
A GeoJSON file
| Field | Required | What it holds | Example |
|---|---|---|---|
| file | yes | a FeatureCollection (.geojson) or one Feature per line (.geojsonl) | shops.geojson |
| an address property | yes | named address, query or q, or --column | 10 Rue de la Paix, Paris |
| geometry | no | kept, or replaced with --replace-geometry; may be null | a Point |
{"type":"FeatureCollection","features":[
{"type":"Feature","properties":{"name":"Shop 1","address":"10 Rue de la Paix, Paris"},"geometry":{"type":"Point","coordinates":[2.33,48.87]}},
{"type":"Feature","properties":{"name":"Shop 2","address":"1 Place Bellecour, Lyon"},"geometry":null}
]}
Or a JSONL file for a long run
| Field | Required | What it holds | Example |
|---|---|---|---|
q | yes | one address per line | 1 Rue de Rivoli, Paris |
{"q": "1 Rue de Rivoli, Paris"}
{"q": "2 Rue de Rivoli, Paris"}
The country sheet
Run it
1. Answer each feature and put the answer's point in place of its geometry.
$ gridpin batch france.bin shops.geojson shops_out.geojson --replace-geometry
2. Run a long JSONL file; on a terminal it shows its progress. If the run is cut off (Ctrl-C, a crash, a closed laptop), run the same command with --resume: the rows already written are kept and only the rest is answered.
$ gridpin batch france.bin big.jsonl out.jsonl -k 1 --resume
What you get
$ gridpin batch france.bin shops.geojson shops_out.geojson --replace-geometry
2 features -> shops_out.geojson
{"features":[{"geometry":{"coordinates":[2.33115,48.868989],"type":"Point"},"properties":{"address":"10 Rue de la Paix, Paris","gp_commune":"Paris 2e Arrondissement","gp_confidence":0.8399999737739563,"gp_housenumber":"10","gp_lat":48.868989,"gp_lon":2.33115,"gp_match_level":"PointAddress","gp_postcode":"75002","gp_precision":"house","gp_street":"Rue de la Paix","name":"Shop 1"},"type":"Feature"},{"geometry":{"coordinates":[4.830916,45.758884],"type":"Point"},…}],"type":"FeatureCollection"}
$ gridpin batch spain.bin big.jsonl out.jsonl -k 1 --resume (the first run was killed after 65,536 rows)
--resume: 65536 rows kept from out.jsonl.partial
open 0.04s · 200000 queries in 5.51s · 36281 req/s
| Column | Values | Meaning |
|---|---|---|
gp_lat, gp_lon | degrees | the answer's point |
gp_precision, gp_match_level | as in an answer | how close the answer is to the address |
gp_street, gp_housenumber, gp_commune, gp_postcode | text | the address found |
gp_confidence | 0–1 | the answer's confidence |
geometry | a Point | with --replace-geometry: the answer's point; otherwise the feature's own geometry |
How it works
The properties of each feature stay as they are, and the answer is added to them as gp_* fields; a feature without an answer gets them empty. The output has the same form as the input: a collection for a collection, one feature per line for GeoJSONL.
Limits
- Until a JSONL run finishes, its rows are in
OUTPUT.partial, written to disk every 65,536 rows; a run cut off loses at most the rows after the last of them. A plain run refuses to overwrite a partial file: add--resumeor delete it. --resumecounts rows, it does not compare them: give it the same input in the same order. A partial file with more rows than the input is refused.- A line with no usable
qstops the run: no output, exit code 1. The partial file keeps the rows before that line; fix it and run again with--resume. - With GeoJSON input,
--with,-kand--receiptare not applied, and--replace-geometrydoes nothing on JSONL or CSV. --resumeis for JSONL; a CSV is answered whole.
All its keys: command reference. Related: geocode a CSV, batch mode.
Delivery zones new in 0.9.0
For dispatchers and sales managers: gridpin cluster splits a list of stops into zones of nearby points, each under a size you choose, to cut rounds for couriers or areas for sales visits.
What you need
A CSV of points
| Field | Required | What it holds | Example |
|---|---|---|---|
lat | yes | latitude in degrees; or gp_lat from gridpin batch | 40.4293525 |
lon | yes | longitude in degrees; or gp_lon from gridpin batch | -3.7093389 |
| other columns | no | kept as they are | street |
lat,lon,street,housenumber,postcode,commune,region 40.4293525,-3.7093389,Calle Conde Duque,19,28015,Madrid, 40.4347257,-3.7069897,Calle Escosura,9,28015,Madrid,
Run it
1. No points yet? Geocode your addresses with gridpin batch: its output goes to cluster as it is. Or take test stops from the sheet: 30 real addresses within 3 km of the centre of Madrid.
$ gridpin sample spain.bin --near 40.4168,-3.7038,3000 --n 30 --seed 7 -o stops.csv
2. Split them into --k zones of at most --max-size points; --geojson also writes the outline of each zone.
$ gridpin cluster stops.csv --k 3 --max-size 12 -o zones.csv --geojson zones.geojson
What you get
$ gridpin cluster stops.csv --k 3 --max-size 12 -o zones.csv --geojson zones.geojson
30 points in 3 zones
$ head -4 zones.csv
lat,lon,street,housenumber,postcode,commune,region,gp_cluster,gp_cluster_lat,gp_cluster_lon,gp_cluster_size
40.4293525,-3.7093389,Calle Conde Duque,19,28015,Madrid,,1,40.4287724,-3.6947623,12
40.4347257,-3.7069897,Calle Escosura,9,28015,Madrid,,1,40.4287724,-3.6947623,12
40.4076646,-3.7153071,Travesia Gil Imon,1,28005,Madrid,,3,40.4172110,-3.7272362,6
$ head -c 120 zones.geojson
{"features":[{"geometry":{"coordinates":[[[-3.7101186,40.4260081],[-3.7021098,40.4213395],…]],"type":"Polygon"},"properties":{"cluster":1,"size":12},"type":"Feature"},…
| Column | Values | Meaning |
|---|---|---|
gp_cluster | 1 … k | the zone of the row |
gp_cluster_lat, gp_cluster_lon | degrees | the zone's centre |
gp_cluster_size | count | points in the zone |
GeoJSON properties | cluster, size | one Polygon per zone: the convex outline of its points. A zone of one place is a Point, of two (or of places in a line) a LineString. |
How it works
k-means in metres from a seeded start, 20 rounds. Then, while a zone holds more than --max-size points, its point farthest from the centre moves to the nearest zone that still has room. The same --seed (1 by default) gives the same zones on every machine.
Limits
- Distances are straight lines: a river or a motorway between two stops is not seen.
--ktimes--max-sizemust hold all the points, or the command stops: “2 zones of at most 10 points cannot hold 30 points”.- It makes zones, not the order of stops inside a zone.
- Outlines of neighbouring zones can overlap after the size limit moves points.
- A row without a point (an address
batchdid not answer) stays in the file with empty zone columns, and the count is printed.
All its keys: command reference. Related: test stops from the sheet, your own data beside the sheet.
Response format
Every interface — CLI, Python, DuckDB, MCP — returns the same result shape. One object per candidate, best match first.
{
"lat": 48.8686,
"lon": 2.3305,
"precision": "house",
"score": 412.0, // illustrative values
"confidence": 0.84,
"street": "Rue de la Paix",
"housenumber": "5",
"commune": "Paris 2e Arrondissement",
"postcode": "75002",
"flags": ["street_exact", "commune_prefix", "house_rep"],
"weak": false,
"match_level": "PointAddress",
"match_status": "M"
}
| Field | Type | Meaning |
|---|---|---|
lat, lon |
float | WGS84 coordinates of the pin. |
precision |
enum |
How exact the pin is:
house — forward: exact point for the requested house number; reverse: the nearest house is within 50 m
interp — interpolated along the street between known numbers
near — forward: snapped to the nearest known number on the street; reverse: the nearest house is 50–250 m from your point
street — street-level match, no usable house number
intersection — the crossing of two streets (“Main St & Elm St”): the middle of their closest houses (new in 0.9.0)
city — locality-level match only
approximate — reverse only: the nearest known house is more than 250 m away
|
score |
float | Raw ranking score used to order candidates. Comparable within one query, not across queries. |
confidence |
float 0..1 | Ordering estimate 0..1; on some sheets a higher band is not more accurate (see Confidence bands). For a cut-off, use weak. |
weak |
bool | true when the engine itself says the answer needs a check before use: city level, confidence below 0.30, or a fuzzy street below 0.60. An exact house on an exact street is never weak. |
match_level |
enum |
The same answer on the scale most geocoders use, the names of Esri's Addr_type (new in 0.9.0):
PointAddress — a stored point of this house (precision house; Mapbox rooftop)
StreetAddress — placed between two stored houses of the street (interp; interpolated)
StreetAddressExt — the neighbour's point on the asked street (near; approximate). Mind the name: at Esri it means a number beyond the end of a range
StreetName — the street, no house (street)
StreetInt — the crossing of two streets (intersection)
Postal — the place holding most of the asked postcode
Locality — a place by name (city; reverse approximate)
POI — an answer of the POI layer
Subaddress, StreetMidBlock and PostalExt are never produced: a sheet has no units, block midpoints or ZIP+4.
|
match_status |
enum | M matched; T tied, exactly when weak is true. U, unmatched, stands only in
the CSV column of a row without an answer. In the Nominatim-compatible paths both fields come in extratags with
extratags=1; in CSV and pandas they are gp_match_level and gp_match_status. |
street |
string | Matched street name, as stored in the sheet (forward and reverse alike — the house number is never glued into it). |
housenumber |
string, optional | House number with its suffix ("27", "12bis"). Present when a house is resolved: forward exact/near answers report the stored matched number, interpolation reports the requested number, and reverse reports the nearest house. Omitted for street/city-only answers. |
commune |
string | Matched municipality / locality. |
postcode |
string | Postal code of the matched address, when the source data has one. |
flags |
string[] | Match explanation (street_exact/street_fuzzy,
commune_exact/commune_prefix, house_rep,
pc_exact/pc_dept, ml,
poi_layer). Omitted entirely when empty — treat a
missing key as []. |
distance_m |
float, optional | Reverse queries only: metres from the queried point to the returned address. |
region |
string, optional | Administrative region of the pin, where the sheet carries admin polygons. |
Extra answer fields new in 0.9.0
For analysts and developers who need more than a point per answer: a grid cell to join on, codes for other systems, map links to check by eye, the sheet's provenance for a report.
What you need
The names of the fields you want, joined by commas
h3:8,links,provenance
Where to give them
| Field | Required | What it holds | Example |
|---|---|---|---|
--with | no | CLI query, reverse, batch | --with h3,codes |
with= | no | every path of gridpin serve, and the body of POST /v1/geocode | with=geohash:7 |
extras= | no | Python, pandas, the MCP tools (with in Node) | extras="h3" |
Run it
1. Ask one address for several fields.
$ gridpin query usa.bin "1600 Pennsylvania Ave NW, Washington, DC" -k 1 --with h3,placekey,codes,street_point
2. Add columns to a whole file.
$ gridpin batch usa.bin clients.csv out.csv --with h3:8,links,provenance
3. Ask the server.
$ curl 'http://127.0.0.1:8080/v1/geocode?q=1600+Pennsylvania+Ave+NW,+Washington,+DC&limit=1&with=geohash:7'
What you get
$ gridpin query usa.bin "1600 Pennsylvania Ave NW, Washington, DC" -k 1 --with h3,placekey,codes,street_point
{"lat":38.8976751,"lon":-77.036547,"precision":"house",…,"extras":{"dms":"38°53'51.6\"N 77°02'11.6\"W","h3":"892aa845a1bffff","mgrs":"18SUJ2339007392","placekey_where":"@63r-6cs-j5f","plus_code":"87C4VXX7+39G","street_point":null,"street_point_m":null}}
$ gridpin batch usa.bin clients.csv out.csv --with h3:8,links,provenance (columns trimmed)
id,address,…,gp_h3,gp_osm_url,gp_google_url,gp_apple_url,gp_mapillary_url,gp_bing_url,gp_sheet_release,gp_data_date,gp_license,gp_sources,gp_sheet_sha256
1,"1600 Pennsylvania Ave NW, Washington, DC",…,882aa845a1fffff,https://www.openstreetmap.org/?mlat=38.897675&mlon=-77.036547#map=19/38.897675/-77.036547,…,v0.8.0,2026-09-23.1,…
$ curl '…&with=geohash:7'
{"results":[{"lat":38.8976751,"lon":-77.036547,…,"extras":{"geohash":"dqcjqcp"}}]}
| Column | Values | Meaning |
|---|---|---|
h3[:res] | h3 | the H3 cell of the point, resolution 9 by default (0–15) |
geohash[:len] | geohash | geohash of 9 characters by default (1–12) |
placekey | placekey_where | the “where” part of a Placekey (@5vg-82n-kzz): H3 at resolution 10 in Placekey's alphabet, the part their datasets join on. The “what” part is issued only by Placekey's service and is not made here. |
codes | plus_code, mgrs, dms | Plus Code of 11 digits, MGRS to 1 m, degrees-minutes-seconds. On the Google-compatible path the result also gets Google's own plus_code.global_code. |
street_point | street_point, street_point_m | a point on the street in front of the house: half way between the house and the line of the two nearest houses across the street (other parity of number, within 100 m). null when the sheet has no houses across, as above: nothing is made up. It is not an entrance. |
links | links.osm, .google, .apple, .mapillary, .bing | the point on five public maps, to check an answer by eye (in a CSV: gp_osm_url and so on) |
provenance | provenance | the card of the sheet: release (when the file is a released sheet), country, data date, licence, sources, attribution and the SHA-256 of the file, of the sheet that gave the answer: an answer of --also, --also-after or --poi carries that sheet's card and licence. Per-address provenance is not in the free sheets. |
place[:level] | place.short, place.levels | the answer as a person writes it: levels house, street, locality, region; short the shortest of them at the asked level (house by default, or street, locality, region) that is still one place. The number stands where the post of the sheet's country writes it: 37 Rue Sainte-Croix, Hauptstraße 5. The town is added only when a street of that name lies within about 3 km. Useful for reverse answers shown to a person. |
verdict | verdict.street, .number, .postcode, .city | what happened to each field of the query: confirmed (as asked), corrected (a spelling or the start of a name fixed), inferred (not in the query, filled by the answer), replaced (the query said one thing, the answer another: the neighbour's number, another postcode), unresolved (asked, not found), absent. The town is read from the line after its first comma: a house in another town is city: replaced, a town the sheet does not have is city: unresolved, never inferred. The letter of a house number (“5v”, “7B”) is not compared. Reverse answers have none. |
postal[:cc] | postal | the answer laid out as the post of a country writes an address; without a code, the layout of the sheet's own country. The same as gridpin format. |
crs:EPSG:<code> | crs.x, .y, .code | the point in a national projection, by formula: UTM zones (WGS 84, ETRS89, SIRGAS 2000, MGA2020), Lambert-93 (2154), ETRS89-LAEA (3035), RD New (28992, about 1 m) and Web Mercator (3857). No datum shift is applied. |
exists | exists.exists, .reason | yes, maybe or no for the address as written, with the reason. The same as gridpin exists. |
area | area.level, .bbox, .spread_m, .candidates | where the address may be when the answer is not one point: the candidates of the top answer's level with weights, their box and the largest distance between them. One candidate: an empty area of spread 0. The answer itself is not changed. |
unit | unit.kind, unit.unit | a flat, office, suite or floor written in the query (Apt 3B, Suite 200, piso 2), kept apart from the answer, which stays the house. Read from the words of the line: a word followed by a postcode (“FL 33173”, Florida) is not a unit, and a unit word the list does not know is missed. |
iso20022 | iso20022 (in a CSV: gp_iso_mode, gp_iso_strt_nm and 11 more) | the ISO 20022 postal address of the line: structured, hybrid or none with the checks. The same as gridpin format --out iso20022; a row without an answer still gets it. |
method | point_method (in a CSV: gp_point_method) | how the point was obtained, read from what the answer says: registry_point (the stored point of the house), range_interpolated (a range of numbers, United States), between_neighbours, nearest_house (a neighbouring number), crossing_of_streets, street_centre, place_table, commune_centre, postcode_centre, postcode_layer, place_layer, own_place. Nothing is computed beyond the answer. |
cell:eu1km, cell:de100m, cell:jp1, cell:jp2, cell:jp3 new in 0.10.0 | cell_eu1km (in a CSV: gp_cell_eu1km) and so on | the code of the statistical grid cell that holds the point, written as its publishers write it: the European census grid on ETRS89-LAEA (CRS3035RES1000mN3272000E4550000, 1 km; 100 m as in Germany's Zensus 2022) and the Japanese standard grid square (JIS X 0410, 4, 6 and 8 digits). Empty outside the grid. Statistics by cell join with gridpin attach. |
fhir | fhir.mode, fhir.address (in a CSV: gp_fhir_mode, gp_fhir_address) | the HL7 FHIR Address of the same reading, as JSON. The same as gridpin format --out fhir; a row without an answer still gets it. |
How it works
The fields arrive in one extras object per answer, or as gp_* columns after the others in a CSV. They are computed from the answer and the sheet on this machine. Without --with the answer is byte for byte the answer of before.
Limits
- Time zones are not offered: the zone boundaries every library ships are ODbL data from OpenStreetMap, and they are not inside the engine.
- A national projection is computed by formula, without a datum shift.
street_pointis oftennullwhere houses stand on one side only.postalwrites the postcode the sheet keeps: in Brazil the first five digits of the CEP (79002, not79002-004).
All its keys: command reference. Related: batch, response format.
Confidence bands
Addresses with a known point
The true point is the address itself, so this is the share to expect on real address lists.
| Country | [0.0, 0.3) | [0.3, 0.5) | [0.5, 0.7) | [0.7, 0.9) | [0.9, 1.0] | weak = false | weak = true |
|---|---|---|---|---|---|---|---|
| Australia | 0 % of 2 | 92 % of 40 | — | — | 96 % of 258 | 96 % of 298 | 0 % of 2 |
| Brazil | 43 % of 14 | 50 % of 2 | 96 % of 23 | 92 % of 106 | 74 % of 27 | 90 % of 156 | 44 % of 16 |
| Canada | 75 % of 4 | 80 % of 76 | 100 % of 4 | 86 % of 14 | 97 % of 197 | 92 % of 288 | 86 % of 7 |
| France | 100 % of 3 | 90 % of 20 | 100 % of 1 | 97 % of 35 | 99 % of 236 | 98 % of 291 | 100 % of 4 |
| Germany | 50 % of 2 | 85 % of 20 | 99 % of 96 | 100 % of 36 | 98 % of 134 | 98 % of 286 | 0 % of 2 |
| Italy | 0 % of 6 | 78 % of 27 | 75 % of 8 | 86 % of 35 | 92 % of 206 | 89 % of 277 | 0 % of 5 |
| Mexico | 41 % of 61 | 69 % of 52 | 86 % of 37 | 88 % of 34 | 94 % of 36 | 83 % of 145 | 49 % of 75 |
| Netherlands | 100 % of 1 | 92 % of 25 | 75 % of 4 | 86 % of 7 | 98 % of 262 | 97 % of 297 | 100 % of 2 |
| New Zealand | 25 % of 4 | 98 % of 48 | 98 % of 122 | 100 % of 1 | 99 % of 125 | 99 % of 292 | 50 % of 8 |
| Poland | 0 % of 2 | 96 % of 46 | 100 % of 5 | 97 % of 60 | 98 % of 186 | 97 % of 292 | 71 % of 7 |
| Serbia | 0 % of 2 | 59 % of 17 | — | 100 % of 12 | 93 % of 267 | 91 % of 296 | 50 % of 2 |
| Spain | 33 % of 21 | 78 % of 23 | 79 % of 19 | 91 % of 177 | 100 % of 23 | 90 % of 225 | 55 % of 38 |
| United States | 43 % of 7 | 90 % of 102 | 100 % of 1 | 92 % of 13 | 100 % of 171 | 96 % of 281 | 69 % of 13 |
Wikidata objects with an address
The true point is the object (a museum, a station), which can stand far from its street address; shares are lower because of the truth, not only the engine.
| Country | [0.0, 0.3) | [0.3, 0.5) | [0.5, 0.7) | [0.7, 0.9) | [0.9, 1.0] | weak = false | weak = true |
|---|---|---|---|---|---|---|---|
| Brazil | 10 % of 587 | 28 % of 119 | 54 % of 672 | 47 % of 68 | 66 % of 104 | 55 % of 866 | 12 % of 684 |
| Canada | 29 % of 928 | 48 % of 178 | 77 % of 1135 | 76 % of 38 | 81 % of 424 | 69 % of 2043 | 29 % of 660 |
| France | 21 % of 785 | 38 % of 243 | 53 % of 418 | 89 % of 391 | 75 % of 219 | 66 % of 1241 | 21 % of 815 |
| Italy | 20 % of 1185 | 66 % of 244 | 45 % of 211 | 73 % of 203 | 85 % of 355 | 59 % of 1191 | 24 % of 1007 |
| Mexico | 21 % of 529 | 49 % of 247 | 77 % of 205 | 63 % of 121 | 83 % of 145 | 70 % of 669 | 21 % of 578 |
| Netherlands | 28 % of 932 | 71 % of 279 | 59 % of 2369 | 76 % of 50 | 92 % of 241 | 58 % of 3402 | 29 % of 469 |
| Serbia | 20 % of 261 | 47 % of 112 | 38 % of 316 | 70 % of 275 | 83 % of 890 | 68 % of 1669 | 17 % of 185 |
| Spain | 24 % of 540 | 65 % of 225 | 63 % of 73 | 78 % of 411 | 86 % of 266 | 77 % of 907 | 29 % of 608 |
| United States | 13 % of 1178 | 37 % of 576 | 51 % of 635 | 53 % of 147 | 71 % of 944 | 51 % of 2564 | 13 % of 916 |
Observed on the published benchmark sets, engine 1c1668e25b6c, 2026-11-21: share of answers within 150 m of the true point, by confidence band, top answer only. These are observations, not guarantees.
Empty results: the CLI prints nothing (exit 0), Python returns an
empty list, DuckDB's gridpin_geocode/gridpin_reverse return the
string '{}'.
Your data and the sheet
Your own data beside the sheet
New in 0.9.0. Two commands put your own files beside the sheet:
gridpin nearest clients.csv depots.csv --sheet usa.bin -o out.csvgives every row of the first file its nearest rows of the second (--k,--max-km). A file withlat,loncolumns is read as points, any other is geocoded on the sheet, and the output says how each row was placed (gp_precision,gp_weak) besidenearest_idandnearest_distance_m. Distances are straight lines, not road time.gridpin join rows.csv zones.geojson -o out.csvtells which of your zones holds each point (--property namepicks the properties to copy); a row outside every zone stays, with the zone columns empty.- The distance of each pair, or of every row to every row:
gridpin distance. - Names for places you call “HQ” or “Depot 3”:
--aliasesunder batch mode.
$ gridpin nearest clients.csv depots.csv --sheet usa.bin --k 1 --max-km 50 -o nearest.csv $ gridpin join orders.csv delivery_zones.geojson --property zone -o zoned.csv
Distances between two lists new in 0.10.0
For anyone who has two lists (shops and visits, customers and their branch) and needs the straight-line distance of each pair, or of every row to every row.
What you need
Two CSV files: each holds lat and lon columns, or addresses to geocode on a sheet.
| Field | Required | What it holds | Example |
|---|---|---|---|
lat, lon | or an address | the point in degrees | 48.8686, 2.3305 |
| an address column | or a point | found as in batch mode; name it with --a-column, --b-column | 1 rue de la Paix Paris |
id | no | names the row in the output (else its line number); another column with --id-column | shop-1 |
| a key column | with --key | pairs the rows that share it, in both files | store code |
id,address shop-1,1 rue de la Paix Paris shop-2,20 avenue des Champs-Elysees Paris shop-3,rue de Rivoli Paris id,lat,lon visit-1,48.8686,2.3305 visit-2,48.8566,2.3522 visit-3,48.8606,2.3376
Run it
1. Row i with row i (or the rows sharing --key):
$ gridpin distance shops.csv visits.csv --sheet france.bin
2. Every row with every row, one line per pair (at most 10 million pairs; --max-pairs moves the limit):
$ gridpin distance shops.csv visits.csv --sheet france.bin --matrix -o matrix.csv
What you get
$ gridpin distance shops.csv visits.csv --sheet france.bin id,address,distance_id,distance_m,distance_note shop-1,1 rue de la Paix Paris,visit-1,15.1, shop-2,20 avenue des Champs-Elysees Paris,visit-2,3326.8, shop-3,rue de Rivoli Paris,visit-3,,weak answer in the first file 2 distances, 1 pairs without one (1 placed by a weak answer) $ gridpin distance shops.csv visits.csv --sheet france.bin --matrix a_id,b_id,distance_m shop-1,visit-1,15.1 shop-1,visit-2,2080.5 shop-1,visit-3,1032.0 …
| Column | Values | Meaning |
|---|---|---|
distance_id | an id | the row of the second file in the pair |
distance_m | metres, one decimal | straight line over the Earth's surface |
distance_note | no point, weak answer, no row with this key, no row with this number | why a pair has no distance |
a_id, b_id | ids | with --matrix: the pair |
How it works
Each file is read as points, or geocoded on the sheet one row at a time, as gridpin nearest does. The distance is the same great-circle formula as everywhere in GridPin (radius 6,371 km).
Limits
- Straight lines, not road distance or travel time: give the points to a routing engine for those.
- A row placed by a weak answer gets no distance (shop-3 above names a whole street): a distance to the wrong place would look like any other.
- A
--keyvalue that names two rows of the second file stops the run instead of picking one. - A matrix pair without a point is left out and counted on the last line.
All its keys: command reference. Related: nearest rows and zones.
Statistics of the area an address lies in new in 0.10.0
For anyone who needs figures of the area around each address (people, age, rent, income by grid cell or census tract) from a publisher's open table, without sending the addresses anywhere.
What you need
Your rows: the output of batch mode with --with method, or your own file with lat and lon.
| Field | Required | What it holds | Example |
|---|---|---|---|
gp_lat, gp_lon (or lat, lon) | for a grid cell | the point the cell code is computed from | 52.5158714, 13.3780289 |
gp_point_method or gp_precision, gp_weak | with an answer's point | tells whether the point fixes a small area | registry_point |
| a code column | for a code of boundaries | a tract or area code; name it with --on | 36061007600 |
The table and its passport: the publisher's file as you download it, prepared to CSV, and <name>.table.json beside it. The passport names the code, the year of the boundaries, the columns, the publisher's marks for a hidden value, the licence and the caveat; its format: TABLE_PASSPORT.md.
id,address A1,"Pariser Platz 1, 10117 Berlin" A2,"Domkloster 4, 50667 Köln" A3,"Römerberg 23, 60311 Frankfurt am Main" A4,Potsdam
Run it
1. Geocode the rows and keep how each point was obtained.
$ gridpin batch germany.bin places.csv answers.csv --with method
2. Attach the table. A grid cell is computed from each point; a tract code needs --on and --key-vintage.
$ gridpin attach answers.csv --table zensus2022_1km.table.json -o with_area.csv
What you get
id,address,gp_point_method,gp_zensus_population,gp_zensus_mean_age,gp_zensus_net_rent_eur_m2,gp_zensus_status,gp_key_basis (trimmed) A1,"Pariser Platz 1, 10117 Berlin",registry_point,3408,41.63,10.15,matched,point A2,"Domkloster 4, 50667 Köln",registry_point,2263,47.41,11.30,matched,point A3,"Römerberg 23, 60311 Frankfurt am Main",registry_point,4899,42.01,13.86,matched,point A4,Potsdam,place_table,,,,no_key,weak_answer zensus2022_1km_excerpt: 4 rows: matched 3, key_absent 0, no_key 1, suppressed 0, out_of_dates 0 key basis: point 3, weak_answer 1 attribution: Statistische Ämter des Bundes und der Länder, Zensus 2022, dl-de/by-2-0, www.govdata.de/dl-de/by-2-0
| Column | Values | Meaning |
|---|---|---|
gp_<prefix>_<name> | the publisher's value; _moe its margin | a value of the area, empty when hidden by the publisher |
gp_<prefix>_status | matched, key_absent, no_key, suppressed, out_of_dates | why a row has values or not |
gp_<prefix>_edition | edition and year of boundaries | which table the values come from |
gp_key_basis | point, approximate, given, point_too_coarse, weak_answer, basis_unknown | what the point says about the area |
How it works
The table is read once and joined by its code. Three mistakes stop the run instead of giving numbers that look right: codes of another year of boundaries than the table's, more absent codes than a complete table allows, and a small area for a point that does not fix it. A town centre or a weak answer gets no tract and no grid cell.
Limits
- A value of the area, not of the household or the person at the address: do not read it as one.
- The tables are not shipped: you download each from its publisher and keep to its licence.
- The whole table is held in memory: a European grid of 4.6 million cells takes about 3 GB.
- A point on the border of two areas gets no code.
All its keys: command reference. Related: grid cell codes with --with cell, the same in one pass in gridpin-pro.
A sheet of your own places new in 0.9.0
For a campus, a hospital, a depot network or any site with names the country's sheet does not know: build a small sheet of your own places and ask it before the country's sheet. How it sits with the other files: sheets and layers.
What you need
A table of your places
| Field | Required | What it holds | Example |
|---|---|---|---|
name | yes | the name people write | Ensimag |
lat, lon | yes | the point in degrees | 45.19306, 5.76778 |
group | no | a campus or a site; it comes back as the answer's town | Grenoble INP |
code | no | a building code, answered like the name | BU1 |
aliases | no | other names, separated by | | Ecole Ensimag|Bâtiment Ensimag |
name,lat,lon,group,code,aliases Ensimag,45.19306,5.76778,Grenoble INP,ENS,Ecole Ensimag|Bâtiment Ensimag Bibliothèque universitaire Joseph-Fourier,45.19114,5.76626,Campus,BU1,BU Sciences
The country sheet
Run it
1. Build a sheet of your places with gridpin build --places; --license sets the licence line it carries (default “the owner's own data”).
$ gridpin build --places campus.csv campus.bin
2. Ask with --also: a query is asked of your sheet first, every other query goes to the country's sheet as before.
$ gridpin query france.bin "Ensimag, Saint-Martin-d'Hères" --also campus.bin -k 1
3. The same option exists in batch and serve, as Geocoder(sheet, also=...) in Python (gridpin.build_places builds the sheet) and as GRIDPIN_OWN_SHEET for the MCP server.
What you get
$ gridpin build --places campus.csv campus.bin
…
2 places -> campus.bin
$ gridpin query france.bin "Ensimag, Saint-Martin-d'Hères" --also campus.bin -k 1
{"lat":45.19306,"lon":5.76778,"precision":"street","score":3.0,"confidence":0.9,"street":"Ensimag","commune":"Grenoble INP","postcode":"","flags":["street_exact","own_sheet"],"weak":false,…}
$ gridpin query france.bin "Ensimga" --also campus.bin -k 1
{…,"precision":"street","confidence":0.55,"street":"Ensimag",…,"flags":["street_fuzzy","own_sheet"],"weak":true,…}
$ gridpin query france.bin "BU1" --also campus.bin -k 1
{"lat":45.19114,"lon":5.76626,"precision":"street",…,"street":"Bibliothèque universitaire Joseph-Fourier","commune":"Campus",…}
$ gridpin query france.bin "10 Rue de la Paix, Paris" --also campus.bin -k 1
{…,"street":"Rue de la Paix","housenumber":"10","commune":"Paris 2e Arrondissement",…,"flags":["street_exact","commune_prefix","house_rep"],…}
| Column | Values | Meaning |
|---|---|---|
flags | own_sheet | the answer came from your sheet |
confidence | 0.90, 0.55 | 0.90: the name as written; 0.55: one or two letters off, weak, a person confirms it |
street, commune | text | your place's name and its group |
precision | street | a named place, not a house |
How it works
Your table becomes a sheet of its own. With --also the query is first asked of it; a town after the name is dropped if your sheet does not know it. Only when your sheet has no answer does the query go to the country's sheet.
Limits
- Observed on 51 places of the Grenoble campus (Overture places): the name as written 50 found, with one letter dropped 45, with two letters swapped 50.
- With the campus sheet beside a country's sheet, the answers on every open set of our benchmark stayed byte for byte the same (77,381 queries, eleven countries).
- Not found: a place named like its group, and long names with a letter dropped.
- A name that is a number (“Building 7”) may be read as a house number.
- Your place named at the start of an address takes the answer, and the rest of the line is dropped without a flag: “Casino, Boulevard des Moulins 10” answers the casino.
All its keys: command reference. Related: your own data beside the sheet, query --also.
The sheet as a table
New in 0.9.0. A sheet is not only something to query: four commands read it like a table and write CSV, JSON Lines,
GeoJSON (one feature per line as geojsonl, or one FeatureCollection) or GPX, chosen by --format or
by the extension of -o. Every output opens with the sheet's licence and attribution (a CSV with two # lines:
read it with skiprows=2 in pandas, skip=2 in DuckDB; gridpin batch, nearest, join
and bench skip them by themselves); redistribution follows the source terms that
gridpin meta <sheet> prints.
| Command | What it does | Options |
|---|---|---|
gridpin list | prints the addresses that match every option given; with a street it says what it read the street as | --street with --city or --postcode, --postcode alone,
--near LAT,LON,METERS, --bbox MINLON,MINLAT,MAXLON,MAXLAT, --polygon area.geojson;
--limit stops early |
gridpin export | writes an area or the whole sheet to a file | --bbox,
--polygon, --all, or --region where a <sheet>_admin.bin polygon file stands
beside the sheet (the released sheets do not ship one; the command says so and points to --bbox or
--polygon) |
gridpin sample | draws real addresses at random, the same ones for the same seed: test data whose street, number, town and postcode belong together | --n 1000 --seed 7 |
gridpin stats | counts addresses per 0.01° cell, as CSV or GeoJSON, for a coverage map | --format, the same area options |
Points taken from address ranges (United States, TIGER) are not addresses: they stay out, and their count goes to stderr. On a laptop the whole United States sheet is counted in about ten seconds and written to CSV in under two minutes (5.8 GB).
$ gridpin list usa.bin --street "Pennsylvania Ave NW" --city Washington $ gridpin list usa.bin --near 38.8977,-77.0365,300 --format geojson -o around.geojson $ gridpin export rs.bin --all -o serbia.csv $ gridpin export rs.bin --polygon district.geojson -o district.geojsonl $ gridpin sample es.bin --n 1000 --seed 7 -o test_addresses.csv $ gridpin stats usa.bin -o coverage.geojson
Parquet goes through DuckDB, the engine does not write it (an output named .parquet stops with this hint):
COPY (SELECT * FROM read_csv('serbia.csv', skip=2, header=true)) TO 'serbia.parquet' (FORMAT parquet);.
From Python: Geocoder.houses(street=, city=, postcode=, near=, bbox=, polygon=, limit=) and
Geocoder.sample(n, seed=); for test data with Faker, from gridpin.faker import GridPinProvider and
fake.add_provider(GridPinProvider("us", n=1000, seed=1)) make fake.address() return a real address
instead of an invented one.
Faker limits: address() writes every country as “number street, postcode town” (the order of
Germany, Serbia or Brazil differs; the United States and Australia get no state; Brazil a five-digit postcode), and
city() and postcode() come from different rows. Pass seed= to the provider:
Faker.seed() alone does not repeat the addresses.
Parse and compare addresses
gridpin parse usa.bin "<address>" prints how the engine reads the line; gridpin same usa.bin "<a>" "<b>"
says whether two lines name the same place, and --pairs in.jsonl out.jsonl does it for a file of
{"a", "b"} lines. From Python: Geocoder.parse and Geocoder.same_address. The level is
house, street, commune, different or unknown; house is given only when
neither answer is weak and, when an answer is the nearest door, both lines wrote the same number; when a
line has no answer the verdict carries a text comparison instead.
Observed on Wikidata pairs: a clean address and its mechanically distorted copy (same place), and 3,000 pairs of different addresses in one commune (truth farther apart than 150 m). Engine 09238e49 (0.7.0), 2026-11-01.
| Country | Same-place pairs | house | street | unknown | Different-place pairs | called house |
|---|---|---|---|---|---|---|
| Brazil | 2,376 | 29.7% | 13.3% | 44.3% | 3,000 | 2 |
| Canada | 2,785 | 56.2% | 33.0% | 9.6% | 3,000 | 0 |
| France | 2,317 | 36.0% | 35.8% | 23.7% | 3,000 | 1 |
| Italy | 2,535 | 37.2% | 35.7% | 20.2% | 3,000 | 0 |
| Mexico | 909 | 15.8% | 13.1% | 59.0% | 3,000 | 0 |
| Netherlands | 4,222 | 61.6% | 12.2% | 19.2% | 3,000 | 1 |
| Serbia | 671 | 38.7% | 10.1% | 50.7% | 3,000 | 2 |
| Spain | 1,591 | 28.2% | 21.3% | 35.6% | 3,000 | 2 |
| United States | 3,655 | 53.8% | 23.5% | 19.5% | 3,000 | 1 |
Join two tables by address new in 0.10.0
For two lists that name the same places in different words, a customer list and its orders, two suppliers' files: gridpin match pairs the rows whose addresses are one house, without a shared id.
What you need
| Field | Required | What it holds | Example |
|---|---|---|---|
| two CSV files | yes | an address column in each; other columns are left as they are | crm.csv, orders.csv |
--column, --a-column, --b-column | no | the address column when it is not named address, query or q; several joined with “, ” | --b-column delivery_address |
--level | no | house (by default) or street | --level street |
--unmatched | no | also write the rows without a pair, with the reason |
Run it
$ gridpin match france.bin crm.csv orders.csv pairs.csv --b-column delivery_address --unmatched
What you get
A 4 rows, B 4 rows: 2 pairs at house; without a pair A 3 (no_pair 2, weak 1), B 2 (no_pair 1, weak 1); 0.1 s a_row,b_row,level,a_matches,b_matches,reason,a_address,b_address 1,1,house,2,1,,"10 Rue de la Paix, Paris",10 rue de la paix 75002 Paris 1,3,house,2,1,,"10 Rue de la Paix, Paris","10, Rue de la Paix, Paris" 2,,,0,,no_pair,"55 rue du Faubourg Saint-Honoré, 75008 Paris", 4,,,0,,weak,"Paix, Lyon", ,2,,,0,weak,,"55 Faubourg St Honore, Paris" …
| Column | Values | Meaning |
|---|---|---|
a_row, b_row | numbers | the row in each file, counted from 1 after the header |
a_matches, b_matches | numbers | how many rows of the other file this row pairs with: one customer with two orders is two pairs, each saying 2 |
reason | no_pair, weak, no_answer, no_number, no_street, no_commune, near (at the house level, the answer is the nearest door and carries a neighbour's number) | why a row has no pair (with --unmatched) |
How it works
Every row is answered by the sheet. Its key is the commune, street and house number of the answer, the same as gridpin same compares, so a pair at house is one that same calls house. The two files are joined on the key, so a large pair of files costs two geocoding runs, not a comparison of every row with every other.
Limits
- A weak answer makes no key: the row stays without a pair and says
weak.--lenientlets it pair, at your risk. - Two different houses never pair at
house; atstreetevery house of one street pairs with every other. - A house the sheet does not have cannot pair, even when both files write it the same way.
- Related:
nearestpairs by distance,dedupe(Pro) finds repeats inside one table.
All its keys: command reference. Related: parse and compare addresses, distances between two lists.
A smaller sheet: one city or a box new in 0.9.0
Make a small sheet of one town or one area: for a browser page, a phone app or a device with no room for a full country file, when your addresses all lie in that area.
What you need
A country sheet
The area, one of
| Field | Required | What it holds | Example |
|---|---|---|---|
--bbox | one of these | a box: west, south, east, north | 7.41,43.72,7.43,43.74 |
--near | a circle: lat, lon, metres | 43.7384,7.4246,300 | |
--city | a commune as the sheet names it | Lyon 3e Arrondissement | |
--postcode | one postcode | 98000 | |
--street | one street; needs --city or --postcode | Avenue de la Costa | |
--region | a region, from <sheet>_admin.bin beside the sheet | ||
--polygon | a GeoJSON file with a Polygon or MultiPolygon | area.geojson |
Run it
1. Cut the sheet. The source is not changed.
$ gridpin slice mc.bin --bbox 7.41,43.72,7.43,43.74 --out part.bin … 1261 houses -> part.bin
2. A commune is named as the sheet names it: in France, Lyon is split into arrondissements.
$ gridpin slice france.bin --city "Lyon 3e Arrondissement" --out lyon3.bin 6807 houses -> lyon3.bin
3. Check the passport of the cut.
$ gridpin meta part.bin | grep -E 'slice|derived'
What you get
derived_from: 42c05367f96b05655af9b1a20709fb6c86e76a9c1f9950661060119103f4dcf7 slice: bbox 7.41,43.72,7.43,43.74; 1261 houses; not the whole country
| Column | Values | Meaning |
|---|---|---|
derived_from | SHA-256 | the country sheet this region was cut from |
slice | text | the rule of the cut and the number of houses |
How it works
The houses inside the area are written into a new sheet. The reading rules of the source are copied as they are, so a query inside the area is answered as the source answers it. Here the cut is 95 KB against 127 KB of the Monaco sheet; the third arrondissement of Lyon is 5.3 MB against 365 MB of France.
Limits
- It is not the country: an address outside the area gets no house. It may get a weak answer on a street inside the area (a
weakanswer 1.9 km away in our test). --citytakes the commune name of the sheet:--city lyonfinds nothing on the France sheet.- A cut suits a browser (WebAssembly), a phone or a device.
All its keys: command reference. Related: WebAssembly.
Postcode outlines new in 0.9.0
Draw a map of delivery areas by postcode where the post publishes no boundaries: one outline per postcode, from the houses that carry it.
What you need
A country sheet
The cell size
| Field | Required | What it holds | Example |
|---|---|---|---|
--res | no | H3 resolution of the cells; 9 is about 0.1 km² | 9 |
Run it
1. Write the outlines as GeoJSON.
$ gridpin postcodes mc.bin -o postcodes.geojson --res 9 4 postcodes
What you get
{"features":[{"geometry":{"coordinates":[[[[7.41946895,43.738327636],[7.421518189,43.73946635],…]]],
"type":"MultiPolygon"},"properties":{"addresses":3,"cells":2,"postcode":"06240"},"type":"Feature"},…
(the properties of the four outlines)
06240: 3 addresses, 2 cells 06320: 1 address, 1 cell
98000: 272 addresses, 27 cells 98020: 2 addresses, 1 cell
| Column | Values | Meaning |
|---|---|---|
postcode | text | the postcode as the sheet stores it |
addresses | number | houses of the sheet with this postcode |
cells | number | H3 cells the outline is made of |
| geometry | MultiPolygon | the outline; one postcode can have several parts |
How it works
Every house with a postcode is put into its H3 cell. The cells of one postcode are joined into one outline.
Limits
- It is not the boundary the post draws: an outline covers the houses, not the empty land between them.
- A house without a postcode is not drawn: on the Monaco sheet 278 of 1,772 addresses carry one.
- A finer
--resfollows the houses closer and leaves more gaps.
All its keys: command reference. Related: delivery zones.
The address grammar of a sheet new in 0.9.0
See how a sheet reads addresses (street words, order of the parts, postcode form) without opening the code: to check a country before you rely on it, or to give the same rules to another tool.
What you need
A country sheet
Run it
1. Print the grammar as JSON.
$ gridpin grammar spain.bin > es.grammar.json
What you get
{
"country": "es",
"house_number": {"forms": [], "position": "after_street"},
"method": "declared",
"postcode": {"digits": null, "patterns": [], "position": "unknown"},
"source": {"method": "rules section of the sheet (SEC_RULES)", "release": "2026-08-19.0", "sheet": "spain.bin"},
"street": {"type_position": "first",
"types": [{"share": null, "word": "alameda"}, {"share": null, "word": "allee"}, …]}
}
(lines joined and trimmed; spain.bin declares 95 street words)
| Column | Values | Meaning |
|---|---|---|
street | words, position | street words the sheet knows and where they stand |
house_number | position, forms | where the number stands |
postcode | digits, patterns | the postcode form, when the rules declare it |
method | declared | taken from the rules of the sheet, not counted |
How it works
The rules section of the sheet is written out in an open JSON schema, address-grammar.schema.json (in docs-public/ of the repository). Another tool can read the same file.
Limits
- It shows what the rules declare: shares are empty, and a form the rules do not name shows as
unknown(the postcode of Spain). - Counted shares come from your own addresses: learn-grammar in Pro.
All its keys: command reference. Related: learn-grammar.
Towns of any country new in 0.9.0
Answer a town of a country whose sheet you do not have: when a few rows of your file lie abroad and a town is enough for them. How it sits with the other files: sheets and layers.
What you need
The world sheet, downloaded in step 1. Only to build it yourself: Overture divisions, the localities, as Parquet
| Field | Required | What it holds | Example |
|---|---|---|---|
| name, lat, lon | yes | the town and its point | Lyon, 45.757814, 4.832011 |
| region, country | yes | ISO codes; the region becomes the answer's commune | FR-ARA |
| names_common, population, subtype, id | yes | other names; the largest of equal names is kept | locality |
A country sheet
Run it
1. Download the world sheet once (390 MB, ODbL) and check it against its SHA-256. It sits outside the signed release set until 0.11.0, so the check is the file next to it.
$ curl -fLO https://dl.gridpin.dev/world/2026-10-21.0/world_places.bin $ curl -fLO https://dl.gridpin.dev/world/2026-10-21.0/world_places.bin.sha256 $ shasum -a 256 -c world_places.bin.sha256 world_places.bin: OK
Or build it yourself: the script is in the repository and needs DuckDB. --first-wins is needed: towns of one region share names, and without it the build stops at the first pair; with it the later name is left out and counted.
$ python3 prep/overture_world_places.py divisions_places__2026-10-21.0.parquet world_places.csv
$ gridpin build --places world_places.csv world_places.bin --first-wins \
--license "ODbL-1.0 (Overture Maps divisions, from OpenStreetMap)"
2. Ask it after the country sheet: --also-after works with query, batch and serve.
$ gridpin query spain.bin "Lyon, France" -k 1 --also-after world_places.bin
What you get
{"lat":45.757814,"lon":4.832011,"precision":"city","score":3.0,"confidence":0.6,"street":"Lyon",
"commune":"FR-ARA","postcode":"","flags":["world_place","place_exact"],"weak":true,…}
| Column | Values | Meaning |
|---|---|---|
precision | city | always a town, never a house |
street | text | the town's name |
commune | ISO 3166-2 | the region of the town |
flags | world_place | the answer came from the world sheet |
How it works
The world sheet (about 2.9 million places) opens beside the country sheet and is asked only when the country sheet has no answer or only a weak town. Most of its records come from OpenStreetMap, so it is under the ODbL, carries that licence in its passport and is never mixed into the country sheets.
Limits
- Towns of one name are told apart by how many names they go by in other languages:
Parisis Paris, France, not the village of Nepal. On 32 capitals and big cities, 31 are right with the name alone and 31 with the country (checked November 9, 2026). - A name with more than 100 namesakes can miss:
Buenos Aireshas 240 and is not found. - A name alone goes to the best known town of that name or spelling:
Nisis Nice. Add the country:Niš, Serbia. - A country after the comma, in English, its own language or as a code, keeps only its towns (
Berlin, Germany,Wien, Österreich); a country the world sheet does not hold gets no answer rather than a town of the sheet's own country. - Check every answer flagged
world_place.
All its keys: command reference. Related: batch and query.
Server, suggestions and Docker
Local server
gridpin serve usa.bin listens on 127.0.0.1:8080:
| Path | What it answers |
|---|---|
GET /v1/geocode?q=… | {"results": [...]}, the same JSON as one line of gridpin batch |
POST /v1/geocode | takes {"queries": [...]} (up to 10 000) |
GET /search, /reverse, /status | the Nominatim format (json, jsonv2, geojson), so geopy and
Leaflet Control Geocoder work with a changed base URL; json_callback=name wraps the answer for a client that loads it as a script, such as the search box of ipyleaflet and leafmap. What differs from Nominatim: no osm_type/osm_id unless the server runs with
--ids (object numbers, below), no polygons; /reverse without format answers jsonv2, not XML |
GET /photon/api, /photon/reverse, /photon/status | the Photon format new: see answer like Photon |
GET /ban/search, /ban/reverse; /census/geocoder/locations/... | the formats of the French address service and of the US Census Geocoder new: see answer like BAN or the Census Geocoder |
GET /pelias/v1/search, /autocomplete, /reverse, /place | the Pelias format new,
for clients written for Pelias. With --ids every answer carries a gid (gridpin:address:…) that
/place?ids= opens again; an interpolated answer or the neighbour's door does not open again, since its point is not a
house of the sheet. Without --ids there is no gid, and clients that key results by it skip them |
GET /health | the sheet; turns ok once the start-up warming is done (about 20 s on the
United States file) |
Recipe with geopy: a local geocoding server; in a container: Docker.
One key for a server on the internet new:
- Set
GRIDPIN_SERVE_KEY(24 characters or more;openssl rand -base64 32makes one) or pass--key-file. Every request but/healthmust then carryAuthorization: Bearer <key>. - Without it the answer is
401, the same for every path, and the engine never sees the request. - On
/maps/api/geocode/jsonthe key may also come askey=, as Google's clients send it; a wrong one answersREQUEST_DENIED. --require-key(orGRIDPIN_REQUIRE_KEY=1) refuses to start without a key, so a secret left unset never gives an open server. The key is never printed.- The key counts nothing, limits nothing and logs nothing: several keys, daily limits and a log are gridpin-pro serve.
More of Nominatim's fields new:
nameon every answer: empty for an address, the street for a street, the town for a town, the place's own name for a place of interest; beside itaddresstypeandplace_rank.namedetails=1addsnamedetails.name;addressnames the country besidecountry_code.format=xmlon/searchand/reverse: Nominatim'ssearchresultsandreversegeocodedocuments, the address parts as elements.zoomon/reverse: 17 and above the house, 14 to 16 its street, below that its town; above 18 counts as 18.format=geocodejson: the GeocodeJSON layout Nominatim writes, the answer underproperties.geocoding;accuracyin metres on reverse.- The same paths answer under
/nominatim/: give a clienthttp://127.0.0.1:8080/nominatimas its base URL. - A browser's preflight gets back the headers it asked to send, as from public Nominatim.
- The sheet knows addresses, not who is at them: where Nominatim names the shop at an address,
namehere stays empty.
Object numbers new: some clients take no answer without osm_type and
osm_id (TeslaMate, Dawarich, Atlas). gridpin serve sheet.bin --ids writes them on the Nominatim and
Photon paths:
- The number is made from the answer: its kind, its point on a grid of about 1.2 by 2.4 m and three bits of its street and number. It stays the same between sheet releases while the address does.
- It is negative,
osm_typenode(Nin Photon's format). These are not OpenStreetMap objects: a negative id never names one, so it cannot be merged with a real object. GET /lookup?osm_ids=N-…(up to 50) gives back the address of a number. A number two addresses share, a street's or a town's number, or someone else's gives no answer, never another house.- Measured on 1,000 addresses per sheet, the same house comes back for 992 in France, 785 in Italy, where many numbers share one point, 1,000 in Serbia and 994 in the United States; another house, for none.
Google's format (new in 0.9.0): GET /maps/api/geocode/json?address=…, also latlng= and
components=, answers in the shape of the Google Geocoding API: status, results[].formatted_address,
geometry.location, location_type (ROOFTOP, RANGE_INTERPOLATED,
GEOMETRIC_CENTER, APPROXIMATE) and address_components with types. geopy's
GoogleV3 and the googlemaps package work with a changed base URL; a key is accepted and ignored.
Not provided: plus_code, bounds, XML. Guide: moving off the Google
Geocoding API.
$ gridpin serve usa.bin --port 8080 $ curl "http://127.0.0.1:8080/maps/api/geocode/json?address=1600+Pennsylvania+Ave+NW,+Washington,+DC"
Answer like Photon new
Point a program written for Photon (geopy's Photon, the Ruby geocoder gem, Dawarich, Dawarich Atlas) at your
own server instead of photon.komoot.io: change its base URL, nothing else.
What you need
A running server and the base URL http://127.0.0.1:8080/photon.
| Path | Field | Required | What it holds | Example |
|---|---|---|---|---|
/photon/api | q | yes | the address or place | Kneza Mihaila 10, Beograd |
| limit | no | answers, 15 by default, 1 to 40 | 5 | |
| lat, lon | no | prefer answers near this point | 44.817, 20.457 | |
| bbox, layer, countrycode | no | keep answers in a box, of a layer (house, street, city), of a country | layer=house | |
/photon/reverse | lat, lon | yes | the point | 44.8171, 20.4577 |
| radius, limit | no | kilometres, 1 by default; answers, 15 by default | 0.5 |
Run it
1. Start the server.
$ gridpin serve rs.bin
2. Ask it as Photon is asked, or give the base URL to the client.
$ curl 'http://127.0.0.1:8080/photon/api?q=Kneza+Mihaila+10,+Beograd&limit=1'
from geopy.geocoders import Photon
geolocator = Photon(domain="127.0.0.1:8080/photon", scheme="http")
print(geolocator.geocode("Kneza Mihaila 10, Beograd").point)
# 44 48m 58.0147s N, 20 27m 32.9911s E
What you get
{"features":[{"geometry":{"coordinates":[20.4591642,44.8161152],"type":"Point"},
"properties":{"city":"Stari Grad","country":"Serbia","countrycode":"RS",
"extra":{"match_level":"PointAddress","match_status":"M"},"housenumber":"10",
"osm_key":"place","osm_value":"house","state":"Grad Beograd","street":"Kneza Mihaila",
"type":"house"},"type":"Feature"}],"type":"FeatureCollection"}
| Property | Values | Meaning |
|---|---|---|
type | house, street, city | Photon's layer of the answer |
housenumber, street, name | text | an address has a number and its street; a street, a town or a place of interest has a name |
city, state, postcode, country, countrycode | text | where it is; the code in capitals |
extra.match_level, extra.match_status | PointAddress…; M or T | how the answer matched; T means check it before use |
How it works
The same engine answers as on /v1/geocode: the coordinates are the same, laid out as Photon lays them out. A
property is written only when it has a value. With bbox or layer the engine is asked for its longest list
first, then the answers outside are dropped.
Limits
- No
osm_idandosm_typeunless the server runs with--ids(object numbers): the answers are not OpenStreetMap objects. Dawarich groups places by that number, so without the key it does not group ours. - No
/structuredpath;lang,zoom,dedupeand the rest are accepted and change nothing. - A sheet holds no OpenStreetMap tags. An
osm_tagthat asks for a tag, such asshop:supermarket, gets an empty list; one that only excludes a tag, such as!shop, changes nothing. - An unknown parameter is skipped, where Photon would refuse it.
- A place of interest has its name but not its kind:
osm_valueisyes. - Dawarich Atlas: the overlay
docker/dawarich-atlas/compose.gridpin.yamlof the repository sets itsPHOTON_URLand runs the server with--ids. The search box of Atlas keeps only answers that hold every word of the query, the postcode too, so where the sheet has no postcodes (Serbia), a query with a postcode shows nothing there; its/api/v1/searchis not filtered that way.
All its keys: command reference. Related: gridpin serve, a local geocoding server.
Answer like Mapbox Geocoding new in 0.10.0
For a map or an app written against the Mapbox Geocoding API (v5): point it at your own server and it searches your country file, with no request to Mapbox and no bill per search.
What you need
| Field | Required | What it holds | Example |
|---|---|---|---|
| the path | yes | /geocoding/v5/mapbox.places/<query>.json; the query is text, or lon,lat for reverse | Kneza%20Mihaila%2010%2C%20Beograd.json |
| access_token | no | not checked; the Mapbox libraries refuse to start without a key of the form pk.<base64>.x, so give them any such string | pk.eyJ1IjoibG9jYWwiLCJhIjoibG9jYWwifQ.x |
| limit, proximity, types, country, autocomplete | no | as Mapbox reads them: 1 to 10 answers; lon,lat to prefer; address, place, postcode, region | limit=1 |
Run it
1. Start the server.
$ gridpin serve rs.bin
2. Ask the Mapbox path, or set the library's origin to your server
(@mapbox/mapbox-gl-geocoder 5.1.3: origin: "http://127.0.0.1:8080").
$ curl 'http://127.0.0.1:8080/geocoding/v5/mapbox.places/Kneza%20Mihaila%2010%2C%20Beograd.json?access_token=pk.eyJ1IjoibG9jYWwiLCJhIjoibG9jYWwifQ.x&limit=1'
What you get
{"features":[{"address":"10","center":[20.4591642,44.8161152],
"context":[{"id":"place.Stari Grad","text":"Stari Grad"},{"id":"region.Grad Beograd","text":"Grad Beograd"},
{"id":"country.rs","short_code":"rs","text":"Serbia"}],
"place_name":"10 Kneza Mihaila, Stari Grad, Serbia","place_type":["address"],
"properties":{"accuracy":"rooftop","match_level":"PointAddress","source":"gridpin","weak":false},
"relevance":0.94,"text":"Kneza Mihaila","type":"Feature",…}],"type":"FeatureCollection",…}
| Field | Values | Meaning |
|---|---|---|
place_name, text, address | text | the label, the street, the house number |
properties.accuracy | rooftop, interpolated, street… | Mapbox's word for how the point was found; match_level is GridPin's |
properties.weak | true, false | true: check the answer before use |
relevance | 0 to 1 | GridPin's confidence, not a probability |
How it works
The same engine answers as on /v1/geocode, laid out as Mapbox Geocoding v5 lays it out. What Mapbox has and a
sheet does not is a stand-in: id is made from the point, context names the town, region and country.
Limits
- Version 5 only; the v6 path and the batch path are not served.
routing,worldview,languageandproximity=ipchange nothing.- The key is not checked: put the server where only your users reach it.
- A map that shows Mapbox's own tiles still needs Mapbox for the tiles; only the search moves.
All its keys: command reference. Related: answer like Photon, search on a web map, move Mapbox search to your server.
Answer like BAN or the Census Geocoder new
Point a program written for the French address service (geopy's BANFrance, Addok clients, Mobilizon) or for the US
Census Geocoder (censusgeocode, R tidygeocoder with method = "census") at your own server: change
its base URL, nothing else.
What you need
The Census paths start with /census/geocoder/locations/; the table writes them from there.
| Path | Field | Required | What it holds | Example |
|---|---|---|---|---|
/ban/search | q | yes | the address | 8 bd du port amiens |
| limit, lat, lon, type, postcode | no | 10 by default; prefer a point; keep one type (housenumber, street, municipality) or one postcode | type=street | |
/ban/reverse | lat, lon | yes | the point; each answer carries distance in metres | 49.8974, 2.2901 |
…/onelineaddress | address, benchmark | yes | the address on one line | 1600 Pennsylvania Ave NW, Washington, DC |
…/address | street, city, state, zip | street and one more | the address in parts | street=1600 Pennsylvania Ave NW |
…/addressbatch | addressFile | yes | POST, multipart: a CSV of id, street, city, state, zip | tidygeocoder sends it |
Run it
from geopy.geocoders import BANFrance
ban = BANFrance(domain="127.0.0.1:8080/ban", scheme="http")
print(ban.geocode("8 bd du port amiens"))
library(tidygeocoder)
geocode(addresses, address = q, method = "census",
api_url = "http://127.0.0.1:8080/census/geocoder/locations/onelineaddress")
What you get
{"type":"FeatureCollection","query":"8 bd du port amiens","features":[{"type":"Feature",
"geometry":{"type":"Point","coordinates":[2.290084,49.897442]},
"properties":{"label":"8 Boulevard du Port 80000 Amiens","score":0.94,"type":"housenumber",
"name":"8 Boulevard du Port","housenumber":"8","street":"Boulevard du Port",
"postcode":"80000","city":"Amiens","x":648952.58,"y":6977867.14}}],…}
The coordinates are those of /v1/geocode. x, y are Lambert-93, on the sheet of France only. The Census
answer lists addressMatches with matchedAddress, coordinates and addressComponents.
Limits
- BAN: no
citycode,contextorimportance; acitycode=filter is refused, since ignoring it would answer another town. Filter bypostcode. - BAN: a weak answer scores at most 0.4; places of interest are not listed;
type=streeton a query with a number can be empty. - Census: only an exact or an interpolated house the engine does not call weak is an address match; no
tigerLine; the street is not split into direction and type;stateis empty where the sheet has none. - Census:
/geographies/...answers 501; the census layer is a file of gridpin-pro.censusgeocodeasks for geographies by default: passreturntype="locations".
All its keys: command reference. Related: answer like Photon, gridpin serve.
Places of events in Mobilizon new
For a Mobilizon instance: the place field of an event and the map click ask your own server instead of public Nominatim, so organisers' searches stay on your network and work without the internet.
What you need
| Field | Required | What it holds | Example |
|---|---|---|---|
| Mobilizon | yes | the Docker image, which reads the geocoder from its environment | kaihuri/mobilizon:5.2.4 |
| gridpin serve | yes | a server Mobilizon can reach, started with --ids | gridpin serve france.bin --ids --host 0.0.0.0 |
Run it
Set these variables on the Mobilizon container. Photon, Addok and Pelias work the same way, with
MOBILIZON_GEOSPATIAL_SERVICE set to Photon, Addok or Pelias and the matching endpoint.
MOBILIZON_GEOSPATIAL_SERVICE=Nominatim MOBILIZON_GEOSPATIAL_NOMINATIM_ENDPOINT=http://gridpin:8080/nominatim # or: MOBILIZON_GEOSPATIAL_PHOTON_ENDPOINT=http://gridpin:8080/photon # or: MOBILIZON_GEOSPATIAL_ADDOK_ENDPOINT=http://gridpin:8080/ban # or: MOBILIZON_GEOSPATIAL_PELIAS_ENDPOINT=http://gridpin:8080/pelias
What you get
The place field lists the addresses of the sheet, and the event keeps the one chosen, with its point. Checked with Mobilizon 5.2.4 and the sheet of France: 10 events, each with its own address; the three providers answer.
Limits
- Start the server with
--ids. Without it every answer has the sameoriginId, and Mobilizon gives every new event the address of the first one. - A weak answer is listed like any other: the Nominatim format has no field for it.
- Where public Nominatim names the shop at the address, the place field here shows only the address.
All its keys: command reference. Related: gridpin serve, answer like Photon, answer like BAN.
Route to an address with Valhalla new
Hand a geocoded address to the Valhalla router as a route location, so the route ends on the street in front of the house and not on the street behind it.
What you need
| Where | Field | Required | What it holds | Example |
|---|---|---|---|---|
gridpin query | --format valhalla | yes | the top answer as one location | -k 1 --format valhalla |
GET /v1/geocode | format | yes | valhalla | format=valhalla |
Run it
$ gridpin query rs.bin "Kneza Mihaila 10, Beograd" -k 1 --format valhalla
What you get
{"locations":[{"display_lat":44.8161152,"display_lon":20.4591642,"lat":44.8160448,"lon":20.4590424}]}
| Field | Meaning |
|---|---|
lat, lon | the point on the street in front of the house; the house itself when the sheet has no houses across the street |
display_lat, display_lon | the house; Valhalla hands them back as they are |
How it works
Valhalla routes to the road nearest the point it gets. The point on the street is half way from the house to the
line of the houses across, the street_point of extra answer fields.
Limits
- No answer, or a weak one, is an error (exit code 1, HTTP 422), not a location: a route to the wrong house is worse than none.
- No
streethint: Valhalla documents it as not yet read (valhalla/valhalla#6467). - A point on a pedestrian street can leave a car with no path (Valhalla:
No path could be found); the house point may then route to the nearest road. - Measured on 100 Serbian addresses: the route ends on the address's own street 52 times in 70 from the street point, 47 from the house point.
- One address per call; for a list, call the server once per address.
All its keys: command reference. Related: gridpin serve.
Suggestions in an address field new in 0.9.0
Suggest streets while a person types an address into your web form: fewer typos before the address is geocoded.
What you need
A running server
The request GET /v1/suggest
| Field | Required | What it holds | Example |
|---|---|---|---|
| q | yes | the typed text: [number] street start[, town start] | 27 boulevard des mo |
| k | no | how many streets, 8 by default | 8 |
| near | no | a point the user is near, lat,lon: streets within 50 km of it come first, the nearest first, then the rest in the usual order; a point that is not two numbers in range is refused (400) | 48.86,2.35 |
The form field gridpin-address.js
| Field | Required | What it holds | Example |
|---|---|---|---|
| endpoint | no | the server; the page's own address by default | http://127.0.0.1:8080 |
| name | no | the field name in your form | address |
| min-chars | no | letters before the first request, 3 by default | 3 |
<script type="module" src="gridpin-address.js"></script> <gridpin-address endpoint="http://127.0.0.1:8080" name="address"></gridpin-address>
Run it
1. Start the server.
$ gridpin serve mc.bin
2. Ask for suggestions.
$ curl 'http://127.0.0.1:8080/v1/suggest?q=27%20boulevard%20des%20mo&k=8'
3. Or put the field in your page: copy gridpin-address.js (one file, no dependencies, in integrations/web/ of the repository) beside it.
What you get
{"suggestions":[{"commune":"Monaco","label":"27 Boulevard des Moulins, Monaco","lat":43.7426208,
"lon":7.4277842,"street":"Boulevard des Moulins"},
{"commune":"Monte-Carlo","label":"27 Boulevard des Moulins, Monte-Carlo",…},
{"commune":"Monaco","label":"27 Boulevard des Moneghetti, Monaco",…}]}
| Column | Values | Meaning |
|---|---|---|
label | text | what to show; a typed number stays where it was typed |
street, commune | text | the street and its town |
lat, lon | degrees | the house of the typed number when this street has it; otherwise the street's middle |
precision | house, street | which of the two the point is; a number the sheet does not have on this street gives street |
How it works
Street names are searched by their start; the streets with the most addresses come first. A number typed before or after the street (27 boulevard des mo, Kneza Mihaila 1) is kept in the label, and text after a comma narrows the town. With a number typed, a street that has that house comes first and points at it.
Limits
- A suggestion is a street, not a house: geocode the full line after the choice.
- The server keeps nothing: no session, no count per visitor.
- The field is keyboard and screen-reader ready; it sends a
gridpin-selectevent with the chosen street.
All its keys: command reference. Related: gridpin serve.
Search on a web map: MapLibre, Leaflet, OpenLayers, deck.gl new in 0.10.0
For a web map with a search box: the search controls of six map libraries ask your own server, or the engine inside the page, instead of a paid geocoding service.
What you need
| Field | Required | What it holds | Example |
|---|---|---|---|
| the map library and its search control | yes | one of the checked versions below | maplibre-gl 6.19.0 and @maplibre/maplibre-gl-geocoder 1.9.4 |
| gridpin-map-search | yes | the adapters, one folder with no dependencies: integrations/map-search of the repository | src/index.js |
| a source of answers | yes | gridpin serve on the country file, or the country file loaded into the page with gridpin-wasm | http://127.0.0.1:8080 |
| Library (checked version) | Adapter |
|---|---|
| @maplibre/maplibre-gl-geocoder 1.9.4 | maplibreGeocoderApi(source), or localGeocoder(gp) without a server |
| @mapbox/mapbox-gl-geocoder 5.1.3 | localGeocoder(gp), or the Mapbox path of the server |
| leaflet-control-geocoder 42.0.0 | leafletControlGeocoder(source, L): suggestions while typing |
| leaflet-geosearch 5.2.1 | geosearchProvider(source) |
| ol-geocoder 4.3.3 | olGeocoderProvider(endpoint), server only |
| deck.gl 9.4.1 GeocoderWidget | deckCustomGeocoder(source) with geocoder: "custom" |
Run it
1. Start the server on the country file.
$ gridpin serve mc.bin
2. Give the adapter to the library’s search control.
import { fromServer, maplibreGeocoderApi } from "gridpin-map-search";
const source = fromServer({ endpoint: "http://127.0.0.1:8080" });
map.addControl(new MaplibreGeocoder(maplibreGeocoderApi(source), { maplibregl, showResultsWhileTyping: true }));
What you get
# typed "27 boulevard des mou" on a map of Monaco; the list offers 27 Boulevard des Moulins, Monaco 27 Boulevard des Moulins, Monte-Carlo # leaflet-geosearch, after Enter on "27 boulevard des moulins" 27 Boulevard des Moulins, 98000 Monaco 22 Boulevard des Moulins, Monte-Carlo (approximate)
An answer the engine calls weak is shown with “(approximate)” and after the others. A server that does not answer is an error in the control, never an empty list.
How it works
Each library has a slot for its own geocoder; the adapter fills it with GridPin’s answers in the shape the library
expects. Suggestions come from /v1/suggest, searches from /v1/geocode; in the page, from the same
functions of the engine.
Limits
- Checked on the versions above; another major version of a library may change its slot.
- deck.gl’s widget can only fly to a point: it gets no weak answer at all.
- The engine in the page holds the country file in memory: 8 MB for a cut of Paris, 32 MB for Serbia.
- Not on npm yet: take the folder from the repository.
Related: suggestions in an address field, the engine in the browser, a search box on your map, folium.
Find an address by postcode new in 0.10.0
For a form that asks for an address: the person types the postcode (and the house number, or the street and number), chooses the address from a list, or types it by hand. The way UK government services do it, with your own server.
What you need
| Field | Required | What it holds | Example |
|---|---|---|---|
postcode | yes | the postcode, in any case, with or without its space | 10117 |
number | no | the house number, or the street and the number: a postcode that covers many streets needs the street | Albrechtstraße 5 |
limit | no | at most this many addresses (default 20, at most 40) | 20 |
Run it
1. Start the server on the country's sheet, then put the element in your form (one file, no dependencies, integrations/web/gridpin-address-finder.js):
<script type="module" src="gridpin-address-finder.js"></script> <gridpin-address-finder endpoint="http://127.0.0.1:8080" name-prefix="delivery-"></gridpin-address-finder>
2. Or ask the server yourself:
$ curl 'http://127.0.0.1:8080/v1/addresses?postcode=10117&number=Albrechtstra%C3%9Fe%205'
What you get
{"addresses":[{"commune":"Mitte","housenumber":"5","label":"Albrechtstraße 5, 10117, Mitte","lat":52.5228552,"lon":13.3838799,"postcode":"10117","region":null,"street":"Albrechtstraße"}],"more":false}
| Field | Values | Meaning |
|---|---|---|
label | text | street and number in the order the country writes them, postcode, town |
more | true, false | true: the list was cut; ask for the number or the street |
| form fields | address-line1, address-line2, city, postcode | what the element submits, with name-prefix in front; the list itself is not submitted |
How it works
The server walks the houses of the postcode on the sheet. The element shows them as radio buttons, announces how many were found, moves the focus to the list, and offers typing the address by hand on every step; the manual fields carry the autocomplete tokens browsers fill.
Limits
- A lookup reads every street of the sheet for the postcode: 0.06 s in Germany, 0.1 s in Poland, 0.7 s in the Netherlands on a laptop. Fine for a "Find address" button, too slow to run on every key.
- Where a postcode covers many streets (Germany, Poland), a number alone can match more than 20 houses: the element asks for the street.
- If the server cannot be reached, the element says so and opens the manual fields: the form never depends on it.
Related: suggestions as you type, OpenAPI description.
A street from a Brazilian CEP new in 0.10.0
For a Brazilian form or a script that has an eight-digit CEP and wants its street, town and state, the way ViaCEP answers, without asking an outside service.
What you need
| Field | Required | What it holds | Example |
|---|---|---|---|
| the sheet of Brazil | yes | the free sheet; it keeps the first five digits of a CEP | br.bin |
--postcode-layer | yes | the CEP layer, a file beside the sheet (23 MB): every eight-digit CEP of the sheet's source; download it from the files of the release | br_cep.tsv.gz |
| CEP | yes | eight digits, with or without the dash | 01310-100 |
Run it
$ gridpin serve br.bin --postcode-layer br_cep.tsv.gz --port 8080 $ curl http://127.0.0.1:8080/ws/01310100/json/ $ gridpin query br.bin "01310-100" --postcode-layer br_cep.tsv.gz
What you get
{"bairro":"","cep":"01310-100","complemento":"","ddd":"","estado":"","gia":"","ibge":"","lat":-23.564526,"localidade":"São Paulo","logradouro":"Avenida Paulista","lon":-46.652504,"regiao":"","siafi":"","uf":"SP","unidade":""}
# gridpin query: the same street as an answer
{"lat":-23.564526,"lon":-46.652504,"precision":"street",…,"street":"Avenida Paulista","commune":"São Paulo","postcode":"01310-100","flags":["postcode_layer"],"region":"SP","weak":false,…}
| Field | Values | Meaning |
|---|---|---|
logradouro, localidade, uf | text | street, town, state; an empty street is the code of a whole town (96230-000) |
lat, lon | numbers | a house of that street with that CEP, the one in the middle of them |
erro | "true" | the layer has no such CEP (status 200, as ViaCEP); a code that is not eight digits is a 400 |
How it works
The layer lists every CEP of the addresses the sheet was built from, with its streets and the number of houses of each. A query that is only a code is asked of the layer; any other query answers from the sheet as without it. A code that several streets share answers the street with most houses; /v1/geocode?q=01310-100&k=5 lists them all, and a street with a small share of the houses is weak.
Limits
- No district (
bairro), IBGE code or area code: the source has none; those fields are empty strings. - Against ViaCEP on 99 street codes the street name is the same for 78; about half of the rest is the spelling (“Rua 4” for “Rua Quatro”), the rest another name of the street.
- Loading the layer takes about two seconds and 70 MB of memory.
All its keys: command reference. Related: find an address by postcode, WooCommerce.
Docker
One image per country with the file inside, and an engine image for a file you mount; the server inside is
gridpin serve on port 8080. Tags, compose and the engine image: offline geocoding in Docker.
$ docker run --rm -p 127.0.0.1:8080:8080 ghcr.io/gridpin/gridpin:us
A page to geocode a CSV new in 0.9.0
Geocode a CSV in the browser, without a terminal: for a colleague who has a spreadsheet of addresses and needs coordinates.
What you need
A CSV with an address column
| Field | Required | What it holds | Example |
|---|---|---|---|
| an address column | yes | one address per row; you pick the column on the page | Boulevard des Moulins 27, Monaco |
| other columns | no | kept as they are | id |
id,address 1,"Avenue de la Costa 7" 2,"Boulevard des Moulins 27, Monaco" 3,"nowhere street 1"
A country sheet
Run it
1. Start the server.
$ gridpin serve mc.bin
2. Open http://127.0.0.1:8080/ui, drop the CSV, pick the address column, press Geocode, then Download CSV.
What you get
The page sends the rows to the server, 500 at a time; this is the same request by hand:
$ curl -X POST http://127.0.0.1:8080/v1/geocode -H 'Content-Type: application/json' \
-d '{"queries":["Avenue de la Costa 7","Boulevard des Moulins 27, Monaco","nowhere street 1"],"k":1}'
{"results":[[{"commune":"Monaco",…,"housenumber":"7","lat":43.7378742,"lon":7.4213651,
"match_level":"PointAddress",…,"street":"Avenue de la Costa",…}],
[{"commune":"Monaco",…,"housenumber":"27","lat":43.7436618,"lon":7.428483,…}],
[]]}
| Column | Values | Meaning |
|---|---|---|
gp_lat, gp_lon | degrees | the point; empty when there is no answer |
gp_match_level | PointAddress, StreetAddress, … | the level of the answer |
gp_weak, gp_confidence | true or false; 0 to 1 | a weak answer: often a house of the same name in another town; check it before you use the point |
gp_street, gp_housenumber, gp_commune, gp_postcode | text | the address found |
How it works
The page is one file served by gridpin serve at /ui, with no outside resources. It reads the CSV in the browser and posts the rows to /v1/geocode of the server on your machine; the file never leaves it.
Limits
- The page itself was not driven in a browser for this text; the request above is the one it sends.
- The map link of a row opens openstreetmap.org with that point, only when you click it.
- The page shows the first 20 rows; the download has all of them.
- The delimiter is read from the header row: comma, semicolon (Excel in Germany or France) or tab. The download keeps it.
- A cell longer than 1024 bytes is not sent: its row gets
too_longingp_match_level. - The file must be UTF-8. A file in another encoding is refused with a hint: in Excel, save it as CSV UTF-8.
- If the server refuses a batch of 500 rows, the page names those rows; the other rows go on.
- On a server of several countries, open
/ui?country=deto ask one country's sheet.
All its keys: command reference. Related: geocode a CSV, gridpin serve.
Several countries in one server new in 0.9.0
Answer addresses of several countries from one server address: for an app whose users live in more than one country.
What you need
Sheets
| Field | Required | What it holds | Example |
|---|---|---|---|
| the main sheet | yes | answers when no other sheet is chosen | spain.bin |
--sheets | yes | more sheets, separated by commas; one per country | serbia.bin,usa.bin |
The request
| Field | Required | What it holds | Example |
|---|---|---|---|
| q | yes | the address | Kneza Mihaila 10, Beograd |
| country | no | the two-letter code of the sheet to ask; on POST /v1/geocode it holds for every query | rs |
| countrycodes | no | Nominatim /search: the codes of the sheets to ask; a structured search reads country= as a country name | de |
| components=country: | no | the Google path: the sheet to ask | country:DE |
Run it
1. Start one server with three countries.
$ gridpin serve spain.bin --sheets serbia.bin,usa.bin
2. Name the country with country=.
$ curl 'http://127.0.0.1:8080/v1/geocode?q=Kneza+Mihaila+10,+Beograd&country=rs&k=1'
3. Or end the query with the country, in English, in its own language or as its code: …, Serbia, …, Srbija, …, SRB.
$ curl 'http://127.0.0.1:8080/v1/geocode?q=1600+Pennsylvania+Avenue+NW,+Washington,+DC,+USA&k=1'
What you get
{"results":[{"commune":"Stari Grad",…,"flags":["street_exact","commune_exact","house_rep","country_rs"],
"housenumber":"10","lat":44.8161152,"lon":20.4591642,…,"street":"Kneza Mihaila",…}]}
{"results":[{"commune":"Washington",…,"flags":["street_exact","commune_exact","house_rep","country_us"],
"housenumber":"1600","lat":38.8976751,"lon":-77.036547,…,"postcode":"20500",…}]}
| Column | Values | Meaning |
|---|---|---|
country_<cc> | a flag | the sheet that answered |
How it works
A query is asked of one sheet: the one named by country=, else the one whose region or country closes the query, else the main sheet.
- A region code is read before a country:
…, Los Angeles, CAis California on the US sheet, not Canada. - Country names come from a shared table in English, in their own languages and as ISO codes.
- Another country's sheet never answers a query that names neither its country nor one of its regions.
- The answer carries the country and the licence of the sheet that answered, on the Nominatim and Google paths too.
/v1/exists,/v1/explain,/v1/extractand thereasonandclarifyfields use the same sheet.- Reverse answers from the sheet with the nearest address, or from the sheet
country=names./healthlists every sheet.
Limits
- The country is read from the last comma segment only:
Belgrade Serbiawithout a comma does not choose a sheet. - Without either, only the main sheet answers: the same Belgrade query gets no answer.
- Two sheets of one country are refused at start.
All its keys: command reference. Related: gridpin serve.
OpenAPI description new in 0.9.0
Get a client for the local server in your language, or let a tool read its routes: for Postman, a code generator or an agent framework that reads OpenAPI.
What you need
The description
| Field | Required | What it holds | Example |
|---|---|---|---|
| openapi.json | yes | every route of gridpin serve, OpenAPI 3.1 | docs-public/openapi.json |
Run it
1. List the routes it describes.
$ jq -r '.openapi, (.paths | to_entries[] | "\(.key) \(.value|keys|join(","))")' openapi.json
2. Generate a client (your step; not run for this page).
$ openapi-generator generate -i openapi.json -g python -o client/
What you get
3.1.0 / get /health get /ui get /v1/geocode get,post /v1/extract post /v1/reverse get /v1/suggest get /v1/exists get /v1/explain get /search get /search.php get /reverse get /reverse.php get /status get /status.php get /maps/api/geocode/json get
| Column | Values | Meaning |
|---|---|---|
the /v1/ routes | the server's own format | |
/search, /reverse, /status | the Nominatim format | |
/maps/api/geocode/json | a subset of the Google Geocoding format |
How it works
The file is built from the server's own table of routes, and a test holds that table equal to the paths the server answers. A route cannot be added without the file changing.
Limits
- It describes one server; the address is yours (
127.0.0.1:8080by default). - The answer fields are described loosely: names and types, not every flag.
All its keys: command reference. Related: gridpin serve.
All ways to use it
One engine and the same country files behind every interface. Each one is described on this page or on its own guide; pick the one that matches where your addresses are.
- Command line:
gridpin query,gridpin reverse,gridpin batch,gridpin sheets,gridpin parse,gridpin same,gridpin meta; all commands: command reference. - Spreadsheets (CSV, TSV):
gridpin batchkeeps every column and addsgp_*; recipe: geocode a CSV. - Local server, Nominatim-compatible: a local geocoding server.
- Docker: one image per country, offline geocoding in Docker.
- Python, with pandas and geopy: offline geocoding in Python, GeoPandas.
- R: offline geocoding in R.
- Node.js: the
gridpinpackage on npm. - DuckDB: geocode inside DuckDB.
- QGIS: the GridPin Geocoder plugin.
- AI agents (MCP): geocoding for AI agents; LangChain tools.
- Rust: the
gridpincrate. - Spark and Databricks: the
gridpin-sparkpackage, geocode in Spark. - The sheet as a table:
gridpin list,gridpin export,gridpin sample,gridpin stats. - Your own data beside the sheet:
gridpin nearest,gridpin join,--aliases. - SQLite and Datasette: the
gridpin_geocodeSQL functions. - ClickHouse: an executable user-defined function.
- dbt: macros for DuckDB.
- polars:
df.gridpin.geocode, data-quality checks and a notebook map; recipe: geocode a polars column. - Research containers and Kubernetes: a DeGAUSS image for the United States and a Helm chart.
- NocoDB, Baserow and Grist: a webhook that fills the point columns.
- Google Sheets:
=GRIDPIN()through your own server. - Benthos and Redpanda Connect: a stream step against the local server.
- Address suggestions: the
<gridpin-address>field on/v1/suggest. - WebAssembly: the engine inside a web page, the
gridpin-wasmpackage. - Home Assistant: the address of a tracker, from the local server.
Every recipe and every country page: guides.
Python
The same engine as a wheel. Exact lookups run at ~3,000/s per core from Python;
use geocode_many(), the CLI batch mode, or DuckDB to spread messy input across cores.
$ pip install gridpin
With pandas: pip install "gridpin[pandas]", then
gridpin.sheets.fetch("us"), gridpin.geocode_df(df, "address", "us") (or df.gridpin.geocode(...))
and gridpin.reverse_df(df, "us"); the gp_* columns are the same as in gridpin batch CSV and
gp_geocode_df in R. gridpin.sheets.list / path / verify / fetch use the same cache and checks as
gridpin sheets. Without extras the wheel still has no dependencies; [geopy] adds the geopy class.
The geopy class gives a weak answer (the engine itself says check it, such as a town for a full address)
as an ordinary Location; its raw["weak"] tells it apart, and in GeoPandas such rows are worth filtering out or checking.
To fetch a sheet in one step, add gridpin-mcp: gridpin-fetch fr downloads the
France sheet into ~/.cache/gridpin, checks its size and SHA-256 against the signed release, and
prints the path; gridpin_mcp.sheets.download("fr") does the same from Python. Country codes: gridpin sheets list.
import gridpin g = gridpin.Geocoder("france.bin") # mmap, opens instantly # forward: query, k candidates hits = g.geocode("1 rue de la Paix Paris", 1) # reverse: lat, lon, k candidates addr = g.reverse(48.8686, 2.3305, 1) # exact lookups ~3,000/s per core
Results are plain objects with the same fields as the JSON response format below.
DuckDB extension
Geocode whole tables without leaving SQL. Load the extension, point it at a sheet, and call scalar functions in your queries.
LOAD gridpin_ext; SELECT gridpin_load('france.bin'); -- forward: one JSON result per row SELECT gridpin_geocode(address) FROM orders; -- reverse: nearest address per coordinate pair SELECT gridpin_reverse(lat, lon) FROM pings;
Both functions return the standard JSON response as a string;
unpack fields with DuckDB's json_extract or the ->> operator.
Switching sheets. One index per session. Loading the same sheet again is a no-op;
loading a different sheet is a hard error — it never silently replaces the
loaded index. Switch explicitly with gridpin_reset(), which must be its own
statement, then load the new sheet:
SELECT gridpin_load('france.bin'); -- index loaded SELECT gridpin_load('italy.bin'); -- ERROR: 'italy.bin' while 'france.bin' is loaded; run gridpin_reset() SELECT gridpin_reset(); -- index unloaded SELECT gridpin_load('italy.bin'); -- index loaded
R
The R package gridpin from R-universe: binary packages for Windows and macOS, a Rust build from source elsewhere.
Answers carry precision, confidence and weak; sf = TRUE returns sf points.
Recipe with DuckDB and sf: offline geocoding in R.
install.packages("gridpin", repos = c("https://gridpin.r-universe.dev", "https://cloud.r-project.org")) library(gridpin) gp_download("us") # once: fetched and checked against the release checksums gp_geocode("1600 Pennsylvania Ave NW, Washington, DC 20500", "us")
Node.js
npm install gridpin (Node.js 18 or newer) brings the engine for Linux x64 and arm64, macOS on Apple silicon and
Windows x64; no build step. sheets.fetch downloads a country once and checks it against the signed release;
the cache folder is shared with the CLI and gridpin-mcp.
const { Geocoder, sheets } = require("gridpin"); const g = new Geocoder(await sheets.fetch("us")); g.geocode("1600 Pennsylvania Ave NW, Washington, DC", { k: 1 }); g.geocodeMany(["233 S Wacker Dr, Chicago", "350 5th Ave, New York"]); // one list per row g.reverse(38.8977, -77.0365);
Spark and Databricks
New in 0.9.0. The package is not on PyPI: install it from the repository,
pip install "gridpin-spark @ git+https://github.com/gridpin/gridpin@v0.10.0#subdirectory=integrations/spark", then from gridpin_spark import geocode and
out = geocode(df, "address", "/Volumes/geo/sheets/usa.bin"): an iterator pandas UDF that opens the sheet once per
worker and adds the gp_* columns. Every row stays; one without an answer gets gp_match_status U.
Checked on local Spark; on Databricks by its documentation, classic clusters (DBR 14.3 LTS or later) with the sheet in a Unity
Catalog volume, not serverless. The helper underneath, gridpin.udf.geocode_iter(sheet), serves any engine with
iterator UDFs. Guide: geocode in Spark and Databricks.
QGIS
The GridPin Geocoder plugin (QGIS 3.44 or newer): Plugins →
Manage and Install Plugins → Settings → Show also experimental plugins, then search “GridPin”.
Processing → GridPin → Download country sheet, then Geocode address field turns any layer or table
into points (rows without a match keep no geometry); the locator bar answers gp <address>. The plugin
version in the catalog may trail a release by a few days; it lists the countries it knows.
MCP server
gridpin-mcp exposes GridPin to AI agents over the Model Context Protocol. It runs on the
user's machine over stdio; geocoding never leaves it, and the only network step is the one-time sheet
download, checked against the signed release.
$ claude mcp add gridpin -- uvx gridpin-mcp
{ "mcpServers": { "gridpin": { "command": "uvx", "args": ["gridpin-mcp"] } } }
Tools: list_countries, download_sheet (the only one that uses the network),
geocode, reverse, batch (up to 1,000 addresses per call) and
extract_addresses (addresses written in a free text, new in 0.9.0). Results
have the response format below. The server is listed in the MCP Registry as
io.github.gridpin/gridpin-mcp; source in
mcp/.
LangChain
pip install langchain-gridpin gives two tools, GridPinGeocode and GridPinReverse, for any
chat model with tool calling; the answers are the response format below, and nothing leaves the machine.
from langchain_gridpin import GridPinGeocode, GridPinReverse, download_sheet download_sheet("us") # once GridPinGeocode(country="us").invoke({"query": "1600 Pennsylvania Ave NW, Washington, DC 20500"})
Other agent frameworks new in 0.9.0
For developers of AI agents who want the agent to turn an address into coordinates and back, offline: gridpin-agents gives the same two tools as the MCP server to five agent frameworks.
What you need
Software
| Field | Required | What it holds | Example |
|---|---|---|---|
| Python | yes | 3.10 or newer | 3.12 |
| gridpin-agents | yes | the tools; the extra names your framework | gridpin-agents[pydantic-ai] |
| the country sheet | yes | downloaded once with gridpin-fetch, or any file with sheet= | gridpin-fetch us |
Which import for which framework
| Field | Required | What it holds | Example |
|---|---|---|---|
| LlamaIndex | FunctionTool | gridpin_agents.llamaindex | |
| CrewAI | BaseTool | gridpin_agents.crewai | |
| PydanticAI | Tool | gridpin_agents.pydantic_ai | |
| smolagents | Tool | gridpin_agents.smolagents | |
| OpenAI Agents SDK | FunctionTool | gridpin_agents.openai_agents |
Run it
1. Install the package with your framework's extra and download the sheet once.
$ pip install "gridpin-agents[pydantic-ai]" $ gridpin-fetch us
2. Give the tools to the agent: gridpin_tools("us") returns gridpin_geocode_us and gridpin_reverse_us.
from pydantic_ai import Agent
from gridpin_agents.pydantic_ai import gridpin_tools
agent = Agent("openai:gpt-5-mini", tools=gridpin_tools("us"))
print(agent.run_sync("Where is 1600 Pennsylvania Ave NW, Washington?").output)
What you get
# the two tool names, then what the geocode tool returns to the model (the call every adapter wraps; trimmed)
{'geocode': 'gridpin_geocode_us', 'reverse': 'gridpin_reverse_us'}
{"country": "us", "query": "1600 Pennsylvania Ave NW, Washington, DC", "results": [{"lat": 38.8976751, "lon": -77.036547, "precision": "house", …, "weak": false, "match_level": "PointAddress", "match_status": "M"}], "kind": "answer"}
| Column | Values | Meaning |
|---|---|---|
results | a list, empty when nothing matched | the candidates, best first |
weak | true, false | true: the engine itself says the answer needs a check |
match_level | PointAddress, StreetAddress, StreetName, Locality, … | how far the answer reaches: a house, a street, a town |
How it works
Each framework module wraps the same two calls in its own tool type and nothing else, so every framework gets the JSON of the MCP server, field for field. The query never leaves the machine.
Limits
- One tool pair reads one country's sheet; pass
sheet=to read a file of your own. - LangChain has its own package,
langchain-gridpin. - A Vercel AI SDK tool (
tool.ts, on the npm package) and one set of instructions for Claude Code, Cursor and GitHub Copilot come in the same folder of the repository. - The agent runs here were not repeated for this page: the output is the call the tools make.
All its keys: command reference. Related: MCP server, LangChain.
A skill for agents on the command line new
For an agent that runs commands, such as Claude Code, Codex or Cursor: a skill that tells it to geocode with the
gridpin tool on this computer, and a Markdown answer it can read and pass on.
What you need
| Field | Required | What it holds | Example |
|---|---|---|---|
| gridpin | yes | the command-line tool on the agent's PATH | install |
| the country sheet | yes | downloaded once; the skill asks before it downloads | gridpin sheets fetch de |
| the skill | yes | the folder integrations/skills/gridpin of the repository | npx skills add gridpin/gridpin |
Run it
1. Add the skill to the agent, or copy its folder into .claude/skills/ of a project.
$ npx skills add gridpin/gridpin
2. Ask the agent to geocode. It runs gridpin with --format md when it reads the answer
itself, and keeps JSON or CSV when a program or a file needs it.
$ gridpin query serbia.bin "Kneza Mihaila 10, Beograd" -k 1 --format md $ gridpin reverse serbia.bin 44.8161 20.4592 -k 1 --format md $ gridpin batch serbia.bin in.csv out.md --output-format md
What you get
## 1. 10 Kneza Mihaila, Stari Grad | field | value | |---|---| | lat | 44.8161152 | | lon | 20.4591642 | | precision | house | | confidence | 0.94 | | street | Kneza Mihaila | | housenumber | 10 | | weak | false | | match_level | PointAddress | | match_status | M |
Trimmed: the table holds every field of the JSON answer, in the same order and with the same values. A weak answer
says so in words: (weak) after the heading and a note row. A batch is one table with a
note column.
Limits
- A Markdown batch holds at most 200 rows; a larger file is refused before it is geocoded. Write CSV for it.
- The skill covers the countries of the release; for another country it tells the user there is no sheet instead of guessing.
- The MCP server and the Claude plugin keep their own tools; this skill is for agents that run commands.
All its keys: command reference. Related: other agent frameworks, MCP server.
ClickHouse new in 0.9.0
For analysts who keep addresses in ClickHouse and want coordinates in a SELECT, without sending the rows to an outside service.
What you need
Software and files
| Field | Required | What it holds | Example |
|---|---|---|---|
| ClickHouse server | yes | checked on 25.8 | clickhouse/clickhouse-server |
| the engine | yes | on the server's system, with batch --lines | /usr/local/bin/gridpin |
| the country sheet | yes | its path in GRIDPIN_SHEET | /var/lib/gridpin/us.bin |
| gridpin_function.xml | yes | declares geocode(address); next to the server's config | integrations/clickhouse |
| gridpin_udf.sh | yes | starts the engine; in user_scripts | integrations/clickhouse |
Run it
1. Copy gridpin_function.xml next to the server's config and gridpin_udf.sh into user_scripts, then restart the server.
2. Call the function in SQL.
SELECT address, JSONExtractFloat(geocode(address), 'lat') AS lat,
JSONExtractFloat(geocode(address), 'lon') AS lon
FROM customers;
What you get
# the process ClickHouse keeps running: gridpin_udf.sh, three addresses in, three lines out (trimmed)
{"lat":38.8976751,"lon":-77.036547,"precision":"house",…,"match_level":"PointAddress","match_status":"M"}
{"lat":39.1411761,"lon":-84.502386,"precision":"house",…,"match_level":"PointAddress","match_status":"M"}
| Column | Values | Meaning |
|---|---|---|
geocode(address) | JSON text, or an empty string | the top answer; empty when nothing matched (the second address here) |
How it works
An executable user-defined function: ClickHouse keeps gridpin batch <sheet> - - --lines running and sends it one address per line. Each line comes back as the JSON of the top answer, or empty.
Limits
- The program must run on the server's system. The image
clickhouse/clickhouse-serverhas glibc 2.35, so use the static Linux build of a release (gridpin-x86_64-unknown-linux-musl.tar.gz). - Checked on ClickHouse 25.8 with 10,000 rows.
- ClickHouse itself was not run for this page: the output is the script it calls.
- On a large sheet the first answer can take several seconds, while the sheet is read. The file sets
command_read_timeoutto 60 s; the default is 10 s.
All its keys: command reference. Related: geocode a CSV.
Odoo new in 0.9.0
For Odoo users who want partner addresses on the map without sending them to an outside geocoding service.
What you need
Software
| Field | Required | What it holds | Example |
|---|---|---|---|
| Odoo | yes | checked on Odoo 17 Community | 17.0 |
| base_geolocalize_gridpin | yes | the module; put the folder in your addons path | integrations/odoo |
| gridpin serve | yes | the local server with your country's sheet; port 8080 by default | gridpin serve usa.bin |
| base_geolocalize_gridpin.url | no | system parameter: the server address | http://127.0.0.1:8080 (default) |
Run it
1. Start the server with your country's sheet and leave it running.
$ gridpin serve usa.bin --port 8080 listening on http://127.0.0.1:8080
2. Install Partner geolocation with GridPin from the Apps menu.
3. Settings → Integrations → Geolocation: choose GridPin (your own server).
4. On a partner: Compute based on address.
What you get
# what the module reads from /v1/geocode for two partners (columns trimmed)
# partner 1: 3333 Burnet Ave, 45229 Cincinnati, Ohio
{"results":[{"commune":"Cincinnati",…,"lat":39.1411761,"lon":-84.502386,"match_level":"PointAddress",…,"weak":false}]}
# partner 2: Washington
{"results":[{"commune":"Washington",…,"match_level":"Locality",…,"precision":"city",…,"weak":true}]}
| Column | Values | Meaning |
|---|---|---|
| partner latitude, longitude | numbers or empty | set from the first answer; left empty when the answer is weak (the second partner) |
How it works
base_geolocalize_gridpin adds GridPin as a geolocation provider of Odoo's partner geolocation. It calls /v1/geocode of your own gridpin serve, so no address leaves your network.
Limits
- A partner keeps no coordinates rather than wrong ones when the answer is
weak. - The address is written street, postcode and town (in the United States, Canada and Australia “town, STATE postcode”); the region is left out after the town, where it made the answers worse.
- The server has 30 seconds to answer (system parameter
base_geolocalize_gridpin.timeout); a slow answer is reported as such, not as an unreachable server. - Odoo was not run for this page: the output is the server's answer the module reads.
- Ready-made connectors for ERPNext, EspoCRM or SuiteCRM: on request, contact@gridpin.dev.
All its keys: command reference. Related: local server.
WooCommerce new in 0.10.0
For a WooCommerce shop that wants address suggestions at checkout and a check of every delivery address, without sending customers' addresses to an outside service.
What you need
Software
| Field | Required | What it holds | Example |
|---|---|---|---|
| A server where you can run a program | yes | shared hosting that only runs PHP is not enough: gridpin serve runs beside the shop | a VPS |
| WooCommerce | yes | 9.9 or later, with “Enable address autocomplete” on; checked on 11.3, block and classic checkout | 11.3 |
| gridpin-address | yes | the plugin; put the folder in wp-content/plugins | integrations/woocommerce/gridpin-address |
| Server address | no | WooCommerce → GridPin Address: where gridpin serve listens | http://127.0.0.1:8080 (default) |
Run it
1. Start the server with your country's sheet and leave it running.
$ gridpin serve de.bin --port 8080 listening on http://127.0.0.1:8080
2. Activate GridPin Address for WooCommerce, then turn on WooCommerce → Settings → General → Enable address autocomplete.
3. At checkout, type the street: choose an address from the list.
What you get
# typed "Albrechtstraße 5, Ber"; the list offers
Albrechtstraße 5, Bernburg (Saale), Stadt
# chosen: the fields WooCommerce fills
{"address_1":"Albrechtstraße 5","address_2":"","city":"Bernburg (Saale)","state":"","postcode":"","country":"DE"}
# an order to Albrechtstraße 999, 06406 Bernburg (Saale): its private note
GridPin: this delivery address was not found on the map file (number_not_on_street). Check it with the customer before shipping.
| Field | Values | Meaning |
|---|---|---|
_gridpin_address_check | yes, maybe, no, unknown with the reason | order field after each order; unknown when the server did not answer |
| order note | text | only for no and maybe: a request to check, not a refusal |
How it works
The plugin is a provider of WooCommerce's own address autocomplete. The checkout script calls two REST routes of the shop; they ask /v1/suggest and /v1/geocode of your gridpin serve. After the order, /v1/exists judges the delivery address. No address leaves your server.
Limits
- Suggestions are offered only when the checkout country is the country of the sheet.
- Brazil: with the CEP layer on the server, a CEP typed into the street field lists the streets of that code and fills street, town, state and CEP.
- A field the sheet lacks stays empty for the customer to fill: in the example the house has no postcode on the sheet.
- The order is never blocked: a new house can be missing from the sheet.
- 120 calls a minute from one IP address; typing one address takes 20 to 30.
- Licence GPL-2.0-or-later (the plugin only), as plugins of the WordPress directory require. Not in the WordPress directory yet.
All its keys: command reference. Related: suggestions in an address field, does the address exist.
Rust
The engine is the gridpin crate: cargo add gridpin, API reference on
docs.rs. The crate also installs the command-line program: cargo install gridpin.
In the browser: WebAssembly new in 0.9.0
For web developers who want to geocode in a page or in Node with no server: the engine built for WebAssembly reads a sheet held in memory.
What you need
Files
| Field | Required | What it holds | Example |
|---|---|---|---|
| gridpin-wasm | yes | the npm package: the loader gridpin.js and the engine gridpin_wasm.wasm (about 1.5 MB); or build them from integrations/wasm with ./build.sh | npm install gridpin-wasm |
| the country sheet | yes | read whole into memory; small sheets suit a page best | serbia.bin (32 MB) |
Run it
1. Install the package, or build the engine yourself in integrations/wasm (needs the Rust target wasm32-unknown-unknown).
$ npm install gridpin-wasm # or: rustup target add wasm32-unknown-unknown && ./build.sh
2. Load the engine and the sheet, then geocode. In a page, get the two files with fetch.
import { readFile } from "node:fs/promises";
import { GridPin, wasmUrl } from "gridpin-wasm";
const gp = await GridPin.load(await readFile(wasmUrl), await readFile("serbia.bin"));
console.log(JSON.stringify(gp.geocode("Bulevar oslobođenja 10, Novi Sad", 1)));
What you get
[{"lat":45.2623457,"lon":19.830714,"precision":"house","score":5.5504303,"confidence":0.94,"street":"Bulevar Oslobođenja","housenumber":"10","commune":"Novi Sad I",…,"weak":false,"match_level":"PointAddress","match_status":"M"}]
| Column | Values | Meaning |
|---|---|---|
| each answer | the fields of the CLI | the same answer as gridpin query, field for field |
How it works
The same engine as the CLI, compiled to WebAssembly without wasm-bindgen. The sheet is copied into the module's memory once; after that no network is used.
Limits
- A browser holds the whole sheet in memory, so a small country or a cut of a sheet suits it best.
- Here Node loaded the Serbian sheet and answered in 0.12 s.
- For the agent of the browser new:
registerModelContextTools(gp)ofgridpin.jsgives it two tools,gridpin_geocodeandgridpin_reverse, through WebMCP (document.modelContext, a draft API; Chrome withchrome://flags/#enable-webmcp-testing). Call it after the sheet is loaded; in a browser without the API it does nothing. The tools answer from the sheet in the page.
All its keys: command reference. Related: cut a smaller sheet.
SQLite and Datasette new in 0.9.0
For anyone who keeps addresses in SQLite or browses them in Datasette and wants coordinates in a query.
What you need
Software
| Field | Required | What it holds | Example |
|---|---|---|---|
| SQLite | yes | a build that can load extensions | 3.41 |
| gridpin_sqlite | yes | the extension; ./build.sh makes the .dylib or .so | integrations/sqlite |
| the country sheet | yes | opened once per connection | usa.bin |
Your table
| Field | Required | What it holds | Example |
|---|---|---|---|
| an address column | yes | the address as text | 1600 Pennsylvania Ave NW, Washington, DC |
Run it
1. Load the extension, open the sheet, geocode the column.
$ sqlite3 customers.db
.load ./gridpin_sqlite
SELECT gridpin_open('usa.bin');
WITH g AS MATERIALIZED (SELECT id, gridpin_geocode(address) AS a FROM customers)
SELECT id, json_extract(a, '$.lat') AS lat, json_extract(a, '$.lon') AS lon,
json_extract(a, '$.match_level') AS level, json_extract(a, '$.weak') AS weak FROM g;
2. In Datasette: datasette data.db --load-extension ./gridpin_sqlite, then the same SQL.
What you get
# customers: 233 S Wacker Dr, Chicago, IL 60606 / 600 N Michigan Ave, Chicago, IL 60611 / Chicago / Nowhere Street 99999, Atlantis index loaded: usa.bin id,lat,lon,level,weak 1,41.878658,-87.6358684,PointAddress,0 2,41.8929239,-87.6248765,PointAddress,0 3,41.8495161,-87.6871276,Locality,1 4,,,,
| Column | Values | Meaning |
|---|---|---|
gridpin_geocode(text) | JSON text, '{}' when none | the best answer |
gridpin_lat, gridpin_lon | numbers or NULL | its coordinates |
weak | 0 or 1 | 1: the engine itself says check this answer (here a town for row 3); keep such rows out with WHERE json_extract(a, '$.weak') = 0 |
gridpin_reset() | text | unloads the sheet, so gridpin_open can open another |
How it works
A loadable extension over the engine's C interface. gridpin_open opens the sheet once per connection; each function call geocodes one value.
Limits
- A table function of several candidates is not in this version.
- One sheet per connection:
SELECT gridpin_reset();before opening another, or a new connection. - Every function call geocodes its value:
gridpin_lat(address), gridpin_lon(address)in one query geocodes each row twice, and a CTE withoutMATERIALIZEDonce per field read from it. On 100 Serbian rows the three-call form took 4.3 times as long as one call.
All its keys: command reference. Related: DuckDB.
Google Sheets new in 0.9.0
For people who keep addresses in Google Sheets and run their own GridPin server: one formula gives the point.
What you need
Software
| Field | Required | What it holds | Example |
|---|---|---|---|
| Apps Script | yes | Code.gs pasted into the sheet's script | integrations/sheets-bridge |
| gridpin serve | yes | the local server with your country's sheet; port 8080 by default | gridpin serve usa.bin |
| a tunnel | yes | a public address for your server | Cloudflare Tunnel, ngrok, Tailscale Funnel |
| GRIDPIN_URL | yes | script property: the tunnel's address | https://… |
Run it
1. Start the server with your country's sheet and leave it running.
$ gridpin serve usa.bin --port 8080 listening on http://127.0.0.1:8080
2. Open a tunnel to the server, then Extensions → Apps Script: paste Code.gs and set the script property GRIDPIN_URL.
3. Type =GRIDPIN(A2), or =GRIDPIN(A2:A100) for a column.
What you get
# the script's code run in Node against a local server: the three cells each address fills [38.8976751,-77.036547,"PointAddress"] ["","","none"]
| Column | Values | Meaning |
|---|---|---|
| three cells | lat, lon, match_level | none when nothing matched |
How it works
An Apps Script function asks your own gridpin serve through the tunnel you run.
Limits
- The requests are made by Google's servers, so the addresses pass through Google and through the tunnel.
- For data that must not leave your machine, use the page or a CSV instead.
- Google Sheets was not run for this page.
- A range is sent as one request per 500 rows. A custom function has 30 seconds: split a column that does not finish in time.
- An open tunnel puts your server on the internet without a password while it runs. Close it when the sheet is done.
All its keys: command reference. Related: a page to geocode a CSV.
NocoDB, Baserow and Grist new in 0.9.0
For teams who keep addresses in NocoDB, Baserow or Grist and want each new or changed row to get its point.
What you need
Software
| Field | Required | What it holds | Example |
|---|---|---|---|
| gridpin serve | yes | the local server with your country's sheet; port 8080 by default | gridpin serve usa.bin |
| gridpin_webhook.py | yes | the bridge; Python 3, no packages | integrations/tables |
| the table's API token | yes | NocoDB xc-token, Baserow Token, Grist Bearer |
Settings of the bridge
| Field | Required | What it holds | Example |
|---|---|---|---|
| GRIDPIN | yes | the server address | http://127.0.0.1:8080 |
| TABLE | yes | nocodb, baserow or grist | nocodb |
| TABLE_URL, TABLE_TOKEN | yes | the table's address and token | https://noco.example |
| ADDRESS_FIELD | no | the address column; address by default | address |
Your table
| Field | Required | What it holds | Example |
|---|---|---|---|
| the address column | yes | the address | 3333 Burnet Ave, Cincinnati, OH 45229 |
| lat, lon, match_level | yes | empty columns the bridge fills |
Run it
1. Start the server with your country's sheet and leave it running.
$ gridpin serve usa.bin --port 8080 listening on http://127.0.0.1:8080
2. Start the bridge.
$ GRIDPIN=http://127.0.0.1:8080 TABLE=nocodb TABLE_URL=https://noco.example TABLE_TOKEN=... \ python3 gridpin_webhook.py --port 8090
3. In the table, set a webhook on row changes to http://<bridge>:8090/ (Grist: add /<TableId>).
What you get
# a NocoDB webhook sent to the bridge; the request the bridge then sends to the table
PATCH /api/v2/tables/m1a2b3/records xc-token: …
[{"Id": 7, "lat": 39.1411761, "lon": -84.502386, "match_level": "PointAddress"}]
| Column | Values | Meaning |
|---|---|---|
lat, lon | numbers or empty | the point |
match_level | as above, none when nothing matched | how far the answer reaches |
How it works
The table calls the bridge when a row changes. The bridge geocodes the address on your server and writes lat, lon and match_level back into the row through the table's API.
Limits
- A Grist widget (
grist-widget.html) draws the rows' points without a background map. - The table was a stand-in for this page: the output is the request the bridge sent.
- The bridge writes only when the point changes, so its own write does not start it again. A point you fix by hand stays until the address changes.
- A cleared address clears its point.
- The bridge listens on 127.0.0.1. A table in Docker or on another machine needs
--host 0.0.0.0; the bridge has no key, so keep it on a network only the table reaches.
All its keys: command reference. Related: local server.
Home Assistant new in 0.9.0
For Home Assistant users who want each device tracker's address without a cloud service seeing where they are.
What you need
Software
| Field | Required | What it holds | Example |
|---|---|---|---|
| Home Assistant | yes | the integration folder copied into its configuration | config/custom_components/gridpin |
| gridpin serve | yes | the local server with your country's sheet; port 8080 by default | gridpin serve usa.bin |
| device trackers | yes | with latitude and longitude | device_tracker.phone |
Run it
1. Start the server on the local network.
$ gridpin serve usa.bin --host 0.0.0.0 --port 8080
2. Copy the folder integrations/home-assistant/custom_components/gridpin of the gridpin/gridpin repository into the custom_components folder of your Home Assistant configuration and restart Home Assistant. Then Settings → Devices & services → Add integration → GridPin, and give the server address.
HACS cannot install it: HACS takes an integration only from a repository whose root holds custom_components and hacs.json, and the integration is one folder among many in the repository gridpin/gridpin.
What you get
# the integration's code against a local server (port 18431 here): the URL, then the state and attributes
http://127.0.0.1:18431/v1/reverse?lat=38.897680&lon=-77.036550&k=1
('1600 PENNSYLVANIA Avenue Northwest, 20500 Washington', {'distance_m': 0.6, 'match_level': 'PointAddress', 'commune': 'Washington', 'latitude': 38.8976751, 'longitude': -77.036547})
| Column | Values | Meaning |
|---|---|---|
| state | text | the nearest address |
distance_m | metres | from the tracker to that address |
match_level | PointAddress, StreetAddress, StreetName, Locality, … | how far the answer reaches: a house, a street, a town |
How it works
One sensor per device tracker. When the tracker moves, the sensor asks /v1/reverse of your own gridpin serve on the local network.
Limits
--host 0.0.0.0opens the server to the network: keep it inside your home network.- Home Assistant itself was not run for this page.
All its keys: command reference. Related: reverse geocoding, local server.
dbt new in 0.9.0
For data engineers who build models in dbt and want coordinates as columns of a model.
What you need
Software
| Field | Required | What it holds | Example |
|---|---|---|---|
| dbt-duckdb | one of the two | through the DuckDB extension gridpin_ext | |
| dbt-postgres | one of the two | a gridpin_geocode(text) function in the database that returns the answer as jsonb; the macros call it; you write that function yourself | |
| the country sheet | yes | loaded when the run starts | /data/fr.bin |
Run it
1. Add the package to packages.yml and run dbt deps.
packages:
- git: "https://github.com/gridpin/gridpin.git"
subdirectory: "integrations/dbt"
2. With dbt-duckdb, load the extension and the sheet in dbt_project.yml.
on-run-start:
- "INSTALL gridpin_ext FROM community; LOAD gridpin_ext; SELECT gridpin_load('/data/fr.bin')"
3. Use the macros in a model.
with geocoded as materialized (
select id, address, {{ gridpin.gridpin_geocode('address') }} as answer
from {{ ref('customers') }}
)
select id, address,
cast({{ gridpin.gridpin_field('answer', 'lat') }} as double precision) as lat,
cast({{ gridpin.gridpin_field('answer', 'lon') }} as double precision) as lon,
{{ gridpin.gridpin_field('answer', 'match_level') }} as match_level,
{{ gridpin.gridpin_field('answer', 'weak') }} = 'true' as weak
from geocoded
What you get
-- dbt itself was not run for this page: the model's SQL, compiled by the macros, ran in DuckDB with the -- extension (on 200 rows, the points of gridpin batch row for row) and in PostgreSQL 14 with a stand-in function -- the model gets the four columns below
| Column | Values | Meaning |
|---|---|---|
lat, lon | double | the point of the first answer |
match_level | text | how far the answer reaches |
weak | boolean | true: the engine itself says check this answer; filter such rows out or check them |
How it works
Macros gridpin_geocode(column) and gridpin_field(answer, field) compile to the extension's functions or to your own PostgreSQL function, with the JSON functions of DuckDB or the ->> operator of PostgreSQL. gridpin_lat, gridpin_lon and gridpin_level give one field each, and each of them geocodes the address again: for more than one field, geocode once as above.
Limits
- The DuckDB extension's current build needs DuckDB 1.5.6 or newer.
- Only DuckDB loads the extension: other warehouses need another way, such as a batch run.
match_levelcomes with the 0.9.0 build of the extension; an older build in the DuckDB catalog leaves the column empty, while the point is the same.
All its keys: command reference. Related: DuckDB.
polars, data-quality checks and a notebook map new in 0.9.0
For data scientists who work in polars or notebooks: geocode a column, check how much of it geocodes, and see the points.
What you need
Software
| Field | Required | What it holds | Example |
|---|---|---|---|
| gridpin | yes | the Python package | pip install gridpin |
| polars | for df.gridpin | the DataFrame library | |
| pandera or Soda | no | for the data-quality checks | |
| the country sheet | yes | a path or a downloaded country | usa.bin |
Run it
1. Geocode a polars column: the answer columns are those of gridpin batch.
import polars as pl, gridpin.polars
df = pl.read_csv("customers.csv").gridpin.geocode("address", "us")
2. Measure the share of a column that reaches a level.
import gridpin.dq gridpin.dq.share_at_level(df["address"], "usa.bin", level="house") gridpin.dq.share_at_level(df["address"], "usa.bin", level="locality")
3. Draw the points in a notebook: gridpin.notebook.map(df).
What you get
# four addresses: 233 S Wacker Dr, Chicago, IL 60606 / 600 N Michigan Ave, Chicago, IL 60611 / Chicago / Nowhere Street 99999, Atlantis 0.5 0.5
| Column | Values | Meaning |
|---|---|---|
gp_lat, gp_lon, …, gp_match_status | as in gridpin batch | added by df.gridpin.geocode |
share_at_level | 0 to 1 | share reaching house, street or locality; a weak answer reaches none (here “Chicago”, a town without a street) |
How it works
gridpin.dq geocodes the column once and counts the answers at the level, leaving out the answers the engine marks weak. It also gives a pandera check (pandera_check) and the SQL of a Soda metric over DuckDB (soda_check_sql); any other tool, Great Expectations among them, can compare share_at_level with its own threshold.
Limits
gridpin.notebook.mapdraws the points without a background map and without a network.- One answer per row; input order is kept.
All its keys: command reference. Related: Python, offline geocoding in Python.
Streams: Benthos and Redpanda Connect new in 0.9.0
For teams who move addresses through Benthos or Redpanda Connect and want each message to carry its point.
What you need
Software
| Field | Required | What it holds | Example |
|---|---|---|---|
| Benthos or Redpanda Connect | yes | runs the pipeline | |
| benthos-gridpin.yaml | yes | the pipeline | integrations/streams |
| gridpin serve | yes | the local server with your country's sheet; port 8080 by default | gridpin serve usa.bin |
A message
| Field | Required | What it holds | Example |
|---|---|---|---|
| address | yes | a field of the JSON message | 3333 Burnet Ave, Cincinnati, OH 45229 |
{"id": 1, "address": "3333 Burnet Ave, Cincinnati, OH 45229"}
Run it
1. Start the server with your country's sheet and leave it running.
$ gridpin serve usa.bin --port 8080 listening on http://127.0.0.1:8080
2. Run the pipeline; it reads messages on stdin and writes them on stdout. Change the input and output to your own.
$ benthos -c benthos-gridpin.yaml
What you get
# the request the pipeline makes for that message, against a local server (columns trimmed)
{"results":[{"commune":"Cincinnati",…,"lat":39.1411761,"lon":-84.502386,"match_level":"PointAddress",…}]}
| Column | Values | Meaning |
|---|---|---|
lat, lon | numbers or null | added to the message |
match_level | as above, none when nothing matched | added to the message |
How it works
A branch processor sends one GET /v1/geocode per message to the local server and maps the first answer into the message.
Limits
- One request per message: for higher rates, batch with
POST /v1/geocode. - Benthos itself was not run for this page.
All its keys: command reference. Related: local server, the server's API.
Research containers and Kubernetes new in 0.9.0
For health research pipelines that already call the DeGAUSS geocoder: a container with its arguments and output columns, and a way to run servers on Kubernetes.
What you need
Software
| Field | Required | What it holds | Example |
|---|---|---|---|
| Docker | yes | builds and runs the container | |
| a GridPin country image | yes | the base: engine and sheet | ghcr.io/gridpin/gridpin:us |
Your CSV
| Field | Required | What it holds | Example |
|---|---|---|---|
| address | yes | the address | 3333 Burnet Ave, Cincinnati, OH 45229 |
| other columns | no | kept as they are | id |
id,address 1,"1600 Pennsylvania Ave NW, Washington, DC 20500" 2,"3333 Burnet Ave, Cincinnati, OH 45229" 3,"PO Box 100, Cincinnati, OH" 4,foreign
Run it
1. Build the container from the repository.
$ docker build -t gridpin-degauss --build-arg BASE=ghcr.io/gridpin/gridpin:us docker/degauss
2. Run it as you run DeGAUSS: the file and the score threshold.
$ docker run --rm -v $PWD:/tmp gridpin-degauss my_file.csv 0.5
3. For Kubernetes: the Helm chart docker/helm/gridpin or the plain manifests in docker/k8s run one server per country image.
What you get
# the container's entry point run on this machine with the United States sheet wrote my_file_gridpin_0.9_score_threshold_0.5.csv id,address,matched_street,matched_city,matched_state,matched_zip,precision,score,lat,lon,geocode_result 1,"1600 Pennsylvania Ave NW, Washington, DC 20500",1600 PENNSYLVANIA Avenue Northwest,Washington,,20500,range,0.95,38.8976751,-77.036547,geocoded 2,"3333 Burnet Ave, Cincinnati, OH 45229",3333 BURNET Avenue,Cincinnati,,45229,range,0.95,39.1411761,-84.502386,geocoded 3,"PO Box 100, Cincinnati, OH",,,,,,,,,po_box 4,foreign,,,,,,,,,non_address_text
| Column | Values | Meaning |
|---|---|---|
precision | range, street, intersection, zip, city | range: a house point or an interpolated number |
score | 0 to 1 | GridPin's confidence, not the DeGAUSS score |
geocode_result | geocoded, imprecise_geocode, po_box, non_address_text | below the threshold, lat and lon are emptied (unless all) |
How it works
The entry point geocodes the file with gridpin batch and writes the DeGAUSS columns. Where the engines differ the columns say so and are not bent to look alike.
Limits
- The institutional-address list of Cincinnati has no counterpart.
matched_statestayed empty on the United States sheet here.- The score is GridPin's, not DeGAUSS's: a house placed by interpolation scores 0.4, so the threshold 0.5 empties it. On 100 United States addresses 0.5 left 56 points;
allkept 100, and 36 of the 44 emptied ones were within 150 m. Use 0.4 to keep interpolated houses. - A CSV saved by Excel as “CSV UTF-8” with
addressas the first column is refused (the byte-order mark); an engine error shows as a trace without the reason. - Kubernetes: images are linux/amd64 only, tagged
ghcr.io/gridpin/gridpin:<country>-<version>. The readiness probe passes while the server is still warming up, andportin the chart's values changes the probe and the Service, not the port the server listens on (8080). - The container was not built for this page: the output is its entry point run directly.
All its keys: command reference. Related: geocoding for research, Docker.
Package managers
Debian and Ubuntu install the .deb, Fedora, RHEL and openSUSE the .rpm of a release, for x86_64 and arm64. The SHA-256 of each file is in the release's signed attestation (attestation.json); check it as in Install before installing.
$ base=https://github.com/gridpin/gridpin/releases/download/v0.10.0 $ curl -fsSLO "$base/gridpin_0.10.0-1_amd64.deb" && sudo apt install ./gridpin_0.10.0-1_amd64.deb $ curl -fsSLO "$base/gridpin-0.10.0-1.x86_64.rpm" && sudo dnf install ./gridpin-0.10.0-1.x86_64.rpm
Homebrew installs the program on macOS (Apple silicon) and Linux x86_64 from our tap, Scoop on Windows x86_64 from our bucket. Both take the archive of the same release and check its SHA-256. Other system package managers are not offered yet (pip, npm, cargo and R-universe are above); each channel is named here on the day it can be installed from.
$ brew install gridpin/gridpin/gridpin > scoop bucket add gridpin https://github.com/gridpin/scoop-gridpin > scoop install gridpin
Publishing and research
Publish a geocoded table without its points new in 0.9.0
Share where your cases are without saying which house: for a public health report, a research paper or open data from a geocoded table.
What you need
A CSV of addresses
| Field | Required | What it holds | Example |
|---|---|---|---|
| an address column | yes | the address; address, query or q, or name it with --column | Boulevard des Moulins 27, Monaco |
| other columns | no | kept as they are: drop the address column before you publish | id |
id,address 1,"Boulevard des Moulins 27, Monaco" 2,"Boulevard des Moulins 10, Monaco" 3,"Avenue de la Costa 7, Monaco"
The way to hide the house
| Field | Required | What it holds | Example |
|---|---|---|---|
--aggregate | one of the two | counts by cell: h3:8, geohash:6 or a GeoJSON file of named polygons | h3:8 |
--min-count | no | with --aggregate: smaller cells go into the line other; 5 by default | 10 |
--mask | one of the two | move every point at random in a ring, metres; ,k:5 moves further where needed | donut:200-500,k:5 |
--seed | no | with --mask: repeat a run; without it the seed is printed | 7 |
Run it
1. Counts by cell (eight Monaco rows; a small file needs a small --min-count).
$ gridpin batch mc.bin cases.csv by_cell.csv --aggregate h3:8 --min-count 3
2. Or each point moved.
$ gridpin batch mc.bin cases.csv masked.csv --mask donut:200-500,k:5 --seed 7
What you get
by_cell.csv: gp_cell,rows,at_house,weak,cells 883969a40bfffff,3,1,0,1 883969a457fffff,4,1,0,1 other,1,1,0,1 masked.csv (columns trimmed): id,address,gp_lat,gp_lon,gp_precision,…,gp_street,gp_housenumber,gp_postcode,gp_commune,…,gp_masked_m,gp_mask_k 1,"Boulevard des Moulins 27, Monaco",43.74678028956204,7.428940028896245,house,…,,,98000,Monaco,…,349,5 2,"Boulevard des Moulins 10, Monaco",43.74618430955674,7.427509887291358,interp,…,,,98000,Monaco,…,484,5
| Column | Values | Meaning |
|---|---|---|
gp_cell | cell id or other | the cell; other holds the small cells together |
rows, at_house, weak | numbers | rows in the cell, answers at a house, weak answers |
cells | number | how many cells the line holds |
gp_masked_m | metres | how far the point was moved |
gp_mask_k | number | addresses of the sheet within the move |
How it works
--aggregate writes no coordinate anywhere, and a cell with fewer rows than --min-count goes into the line other, so a lone address is never a cell of its own. --mask moves each point in a ring of 200 to 500 m (donut masking, Hampton et al. 2010) and leaves out the street and the number; k moves further until at least that many addresses lie within the move (Allshouse et al. 2010).
Limits
- k counts addresses of the sheet, not households; a sparse place says when it found fewer.
- Your own columns stay as they are, the address column too: drop it before you publish.
- The postcode and the commune stay in the masked file.
All its keys: command reference. Related: patient addresses, privacy.
Cite the sheet and keep a receipt new in 0.9.0
Cite the sheet a study geocoded with and keep a receipt of the run: for a paper, a thesis or an audit that must say how the coordinates were made.
What you need
The sheet and your file
| Field | Required | What it holds | Example |
|---|---|---|---|
| the sheet | yes | the sheet you geocoded with | serbia.bin |
--format | no | bibtex (default), apa or cff | cff |
--receipt | no | with batch: write OUTPUT.receipt.json beside the output |
id,address 1,"Kneza Mihaila 10, Beograd" 2,"Zmaj Jovina 5, Novi Sad"
Run it
1. Print a citation of the sheet.
$ gridpin cite serbia.bin --format cff > CITATION.cff
2. Geocode with a receipt.
$ gridpin batch serbia.bin cohort.csv cohort_geocoded.csv --receipt receipt: cohort_geocoded.csv.receipt.json
What you get
CITATION.cff:
cff-version: 1.2.0
type: dataset
title: "GridPin address sheet: Serbia"
version: "v0.8.0"
doi: "10.5281/zenodo.24057169"
identifiers:
- type: other
value: "sha256:9e358bd6a940b290e01cd52081e476e2799513f16dd934dc6a5bc89ba4fb5388"
abstract: "… data release 2026-06-17.0; licence: data.gov.rs Terms of use; geocoded with gridpin 0.8.0; …"
(lines trimmed)
cohort_geocoded.csv.receipt.json:
{
"command": ["gridpin", "batch", "serbia.bin", "cohort.csv", "cohort_geocoded.csv", "--receipt"],
"engine": "0.8.0",
"finished": "2026-11-09T18:19:02Z",
"input": {"file": "cohort.csv", "sha256": "7657e71c…"},
"output": {"file": "cohort_geocoded.csv", "sha256": "508923f1…"},
"prev": null,
"receipt": "gridpin batch",
"rows": 2,
"sheet": {"file": "serbia.bin", "sha256": "9e358bd6…"},
"started": "2026-11-09T18:19:01Z"
}
(hashes shortened)
| Column | Values | Meaning |
|---|---|---|
engine, command | text | the engine version and the command line |
sheet, input, output | file, SHA-256 | what went in and out |
started, finished | UTC | the time of the run |
prev | SHA-256 or null | the receipt written before it in the folder |
How it works
The citation is read from the sheet's passport: its GridPin release, data release, licence, SHA-256 and the engine version, with a DOI where one is recorded. To check a result, rerun the command line with the same sheet and engine and compare the output's hash. Receipts of one folder form a chain; verify-chain in Pro walks it.
Limits
- A receipt proves what was run, not that the answers are right.
- The command line keeps your file names: name the files as you would publish them.
All its keys: command reference. Related: Reproducible geocoding for research.
Reference
Dry and complete: every command with every flag, generated from the program's own help, and the fields of an answer.
- Command reference: every
gridpincommand, its arguments and flags. - Response format: the fields of an answer; extra answer fields.
- Local server: the HTTP paths of
gridpin serve. - Free, Starter and Pro, feature by feature; gridpin-pro documentation.
Data, files and plans
POI layer
Addresses are the core index. Places — "Musée du Louvre, Paris" — live in an opt-in, separate file, one for each country (France: 399 MB of Overture places). How it combines with the address sheet, your own places and the world sheet: sheets and layers.
How the cascade works
The POI layer never sits inside the address index — it is a second file, and the engine runs the cascade for you when you pass it:
# CLI $ gridpin query france.bin "Musée du Louvre, Paris" --poi fr_poi.bin -k 1 # Python g = gridpin.Geocoder("france.bin", poi="fr_poi.bin") -- DuckDB SELECT gridpin_load_poi('fr_poi.bin'); -- after gridpin_load(...)
Cascade rules (built in): 1) the address index answers first; 2) the POI file is
consulted only when the address result is empty, city-level or low-confidence;
3) an exact address match is never overridden. POI answers carry a
"poi_layer" flag. Without --poi the engine behaves exactly
as before — the layer is strictly opt-in.
Building sheets yourself
The prep/ pipeline that produces sheets is public: plain DuckDB SQL
from raw source data to the finished file. You can build a working sheet for any
supported country end-to-end. Official sheets differ in one part: the curated
per-country rules section is private, so a self-built sheet runs on the engine's
built-in defaults.
Try it on Monaco
Monaco is the smallest end-to-end example: it builds a sheet from a raw OSM extract. The same target runs in CI as a public smoke test with 23 live-query checks.
$ make mc # build the Monaco sheet from an OSM extract $ make smoke # build Monaco + run the 23 live-query checks CI runs
Under the hood the targets run gridpin build, which turns the sorted CSV stream from prep/ into a
sheet; gridpin repack replaces the provenance record of a finished sheet without rebuilding its data, and
gridpin meta prints it.
Full countries
The same pipeline builds any country in the atlas, but plan for it: a full-country build takes hours and tens of gigabytes of temporary disk for the source data and intermediate tables. That is exactly the work the subscription buys you out of — fresh, tested sheets arrive monthly; the free tier is static, with no update schedule.
Buying a plan and getting your sheets
Starter, Pro and Snapshot are sold for USDC through MoonPay Commerce. You pay from your own crypto wallet; MoonPay Commerce does not hold the money, it forwards the payment to us and keeps its processing fee. Card payment is not available yet. You buy on the buy page; the plans are compared on the home page. The rules, including refunds, are in the terms, and what data the payment involves is on the privacy page.
- Choose a plan on the buy page; for Starter, also your country.
- Pay. Press “Continue to payment”. MoonPay Commerce opens a checkout page for exactly the listed price; enter your email there, connect your wallet and confirm. On-chain payments are final, so check the amount before you confirm. MoonPay Commerce emails you a receipt.
- Your order page. You come straight back to it. It waits for the payment to be confirmed, then shows a Download button for every file. A button makes a link for that one file and starts the download; if it stops, press it again for a new link.
- Your key. The page shows it once, so save it. It is the password to this purchase: the order page
works for 72 hours, and after that, when new sheets are out, or after you renew, you
open your files with the key.
- Lost it? Write to support@gridpin.dev with the email you paid with and the Transaction ID from the MoonPay receipt.
- The new page goes only to the email of the payment; if your letter comes from another address, we ask there first, and your old key keeps working until then.
- We never ask for the secret phrase of your wallet.
- From a program. The key also lists and downloads your files:
# what your plan covers right now curl -H "Authorization: Bearer $GRIDPIN_KEY" https://api.gridpin.dev/latest.json # each entry carries a ready url url=$(curl -s -H "Authorization: Bearer $GRIDPIN_KEY" https://api.gridpin.dev/latest.json | jq -r '.sheets[0].url') curl -LO -H "Authorization: Bearer $GRIDPIN_KEY" "https://api.gridpin.dev$url"
Limits. A link lives for 1 to 7 hours depending on the file and is good for two downloads. Each file can be downloaded 5 times a day and 20 times a month. Every copy carries a mark of your purchase, so a shared link, key or file can be traced, and sharing them ends your access (terms).
Subscriptions renew by hand. A crypto wallet cannot be charged automatically. Press Renew on your
files page, or pay the link MoonPay Commerce emails you before a period ends. You can pay early: the next period
starts when the current one ends, and the key stays the same. If you do not pay,
nothing is charged: access simply ends when the paid period runs out. Every build we publish while the
subscription is paid appears in latest.json.
Snapshot is one payment for this month's build of every available country, with a 14-day window to download it. The files are yours to keep and use for as long as you like; there are no updates afterwards.
Starter covers one country, which you choose on the buy page before you pay. Your key opens only that country's sheets. Chose the wrong one? Write to support@gridpin.dev before you download a file and we will change it. A second country, or moving to Pro, is a separate purchase with its own key.
What is open and what is gridpin-pro
Every feature side by side: Free, Starter and Pro; the commands of gridpin-pro with examples: gridpin-pro documentation.
The engine and every command on this page are Apache-2.0 and free. Each country file of the release is free too and carries
the licence of its source (gridpin meta prints it). gridpin-pro is a separate, closed build on the same
engine for teams that keep an address database; it comes with a Starter or Pro subscription (how you get it). Use is governed by the
gridpin-pro EULA; the program checks its licence on your machine, without a network call.
What Pro adds besides the tools:
- A commercial licence of our packaging: use the paid builds in production for your organisation and inside the products and services you sell, your customers included; the sheet files themselves are not resold or redistributed. The licences of the data sources still apply to the data.
- Support: questions from Pro customers are answered first. No response time is promised.
Need a plan the page does not list (OEM)? Write to contact@gridpin.dev.
Frequently asked questions
Can I load two countries at once?
CLI and Python: yes — open one Geocoder per country (each is
just an mmap). DuckDB: one index per session — loading the same sheet again is a
no-op, but loading a different sheet is refused. Switch explicitly with
SELECT gridpin_reset(); then gridpin_load the new sheet (or use
a separate session per country); see switching sheets.
Can I store the results?
Yes — forever. Everything GridPin computes on your machine is yours: cache it, load it into your database, ship it inside your product.
How does this work with GDPR?
Your data never leaves your infrastructure: no API call to geocode, no third-party processor, no telemetry — the geocoder runs where your data already lives. The only network action is downloading a sheet yourself, and a downloaded sheet carries no query data.
Does it really work offline?
Fully. The engine needs only the sheet file on disk. Air-gapped VPC, a laptop on a plane, a box in a basement — all the same to GridPin.
How often is the data updated?
Monthly on subscription. Free builds are static — no update schedule — and carry the same curated rules section subscribers get: you trade freshness, not quality. Each sheet states its source and build date.
If GridPin is useful to you, a star on GitHub helps other people find it.