Swiss Address Validation & Geocoding (geo.admin.ch) avatar

Swiss Address Validation & Geocoding (geo.admin.ch)

Pricing

from $2.00 / 1,000 address results

Go to Apify Store
Swiss Address Validation & Geocoding (geo.admin.ch)

Swiss Address Validation & Geocoding (geo.admin.ch)

Validate, normalise and geocode Swiss addresses with the official swisstopo data: postal code, municipality and BFS number, canton, building identifiers (EGID / EGAID), WGS84 and LV95 coordinates, building facts from the federal register, and reverse geocoding from coordinates.

Pricing

from $2.00 / 1,000 address results

Rating

0.0

(0)

Developer

Najim Abdelmoula

Najim Abdelmoula

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

What does Swiss Address Validation & Geocoding do?

Swiss Address Validation & Geocoding turns a free-text Swiss address into its official, normalised form with every identifier you need to join it to other data: postal code, locality, municipality with its BFS number, canton, building identifier (EGID), address identifier (EGAID), WGS84 and LV95 coordinates, plus facts about the building from the Federal Register of Buildings and Dwellings (construction year, floors, dwellings, category). It also resolves postal codes, municipality names, and does reverse geocoding from coordinates. It is a Swiss geocoding API built on the official swisstopo data through geo.admin.ch.

It does not scrape private websites and processes no personal data: it only ever sees the address text or coordinates you send.

Why use Swiss Address Validation & Geocoding?

Swiss addresses are tricky: postal codes span several municipalities, localities are not municipalities, three official languages, and the identifiers that matter (BFS municipality number, EGID) never appear on a letter.

  • Official data, official identifiers: results come from swisstopo's federal address directory and the federal building register, not from a commercial map provider.
  • 🧭 One call, many keys: BFS number for statistics and premium regions, EGID for building-level joins, LV95 for Swiss GIS, WGS84 for web maps.
  • 🏢 Building facts included: year built, floors, dwellings, category and class, heating and energy source codes, parcel.
  • 🔁 Both directions: address → identifiers and coordinates, or coordinates → nearest building and municipality.
  • 🎯 Match quality you can act on: exact, probable, ambiguous or none for every row, with optional alternative candidates.
  • 🤖 Automation-friendly: batch up to 1,000 queries per run, call it from n8n, Make, Zapier or the Apify API, or expose it to AI agents through the Apify MCP server.

Typical users: CRMs and e-commerce checkouts cleaning customer addresses, insurers and property managers keying buildings by EGID, solar and energy companies, real-estate and proptech tools, data teams joining addresses to federal statistics, and AI assistants answering "which municipality is this address in".

What data does it return?

FieldTypeDescription
status / matchQualitystringok, not_found, error; exact, probable, ambiguous, none
formattedAddressstring"Avenue de Milan 3, 1007 Lausanne"
street / houseNumber / postalCode / localitystringNormalised address parts
municipality / municipalityBfs / cantonstring / integerMunicipality name, federal BFS number, two-letter canton
egid / edid / egaidintegerBuilding, entrance and address identifiers of the federal registers
isOfficialAddressbooleanWhether the address is the official one for the entrance
lat / lonnumberWGS84 coordinates
lv95East / lv95NorthnumberSwiss LV95 coordinates (EPSG:2056)
buildingobjectconstructionYear, floors, dwellings, status, category, class, footprintM2, heating and energy codes, parcel
sourcestring"© Data: swisstopo, api3.geo.admin.ch"

How to validate and geocode Swiss addresses

  1. Open the Actor and paste your queries: plain strings ("Bahnhofstrasse 1, 8001 Zürich", "8914", "Biel", "46.5165, 6.6242") or objects with an id so you can join results back to your data.
  2. Leave mode on auto, or force address, postalCode, municipality or reverse.
  3. Set candidates per query to more than 1 if you want alternatives for ambiguous inputs.
  4. Click Start. Each query yields one row (or one per candidate) in the Output tab.
  5. Download as JSON, CSV or Excel, or read the dataset from your automation.

How is match quality decided?

exact: every word of your query is found in the official address and the search engine did not need fuzzy matching. probable: most words match, or fuzzy matching was needed (typo, "Place" instead of "Avenue"). ambiguous: several candidates score equally, for example a street without a house number or a postal code shared by several localities. none: nothing found. Rows with not_found are free.

Municipality versus locality

The locality is the name printed after the postal code; the municipality is the political entity with the BFS number. They often differ (locality Aeugstertal, municipality Aeugst am Albis). The Actor returns both.

How much does it cost?

The Actor is paid per result row (see the pricing box on this page). A query with one candidate is one result; not_found and error rows are free. Validating 1,000 addresses costs a couple of dollars, well below commercial geocoders, and the swisstopo data is authoritative.

Input

See the Input tab for all options. Example:

{
"queries": [
{"id": "hq", "address": "Avenue de Milan 3, 1007 Lausanne"},
{"id": "zip", "postalCode": "8914"},
{"id": "city", "municipality": "Biel"},
{"id": "point", "lat": 46.51649, "lon": 6.62416}
],
"maxCandidates": 1,
"includeBuilding": true
}

Output

You can download the dataset in JSON, CSV, Excel or HTML formats. One resolved address:

{
"id": "hq",
"status": "ok",
"matchQuality": "exact",
"rank": 1,
"formattedAddress": "Avenue de Milan 3, 1007 Lausanne",
"street": "Avenue de Milan",
"houseNumber": "3",
"postalCode": "1007",
"locality": "Lausanne",
"municipality": "Lausanne",
"municipalityBfs": 5586,
"canton": "VD",
"country": "CH",
"egid": 886051,
"edid": 0,
"egaid": 100496355,
"isOfficialAddress": true,
"lat": 46.516494,
"lon": 6.624155,
"lv95East": 2537495.616,
"lv95North": 1152010.746,
"building": {"status": "existing", "category": "residential only", "class": "multi-family house", "constructionYear": 1903, "floors": 5, "dwellings": 10},
"source": "© Data: swisstopo, api3.geo.admin.ch",
"errors": []
}

Using the Actor from code and AI agents

Call it through the Apify API in any language, or expose it to Claude, ChatGPT, Cursor or any MCP client through the Apify MCP server. Example with the Python client:

from apify_client import ApifyClient
client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("<ACTOR_ID>").call(run_input={ # Actor ID or "username/name" from the API tab
"queries": [{"id": "1", "address": "Bahnhofstrasse 1, 8001 Zürich"}],
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row["matchQuality"], row["formattedAddress"], row["municipalityBfs"], row["egid"], row["lat"], row["lon"])

Data source, fair use and privacy

  • Data: Federal Office of Topography swisstopo, through the public geo.admin.ch REST API (federal address directory, Federal Register of Buildings and Dwellings, swissBOUNDARIES3D, postal code directory). Results carry the required attribution "© Data: swisstopo".
  • Fair use: the Actor paces its requests (about 8 per second at most, 1,000 queries per run) to respect the fair-use policy of the federal spatial data infrastructure. For very large batches, split them across runs.
  • Privacy: queries are processed in memory and written only to your run's dataset. Addresses of buildings are public data; do not send names or other personal data in the query text.

Frequently asked questions

Does it cover Liechtenstein?

Yes, the federal address directory includes Liechtenstein (country code LI).

Why is my street returned as ambiguous?

Without a house number, every building on the street is an equally good match. Add the number, or set maxCandidates to see the alternatives.

Can I get the premium region, the electricity tariff or the building register data for this address?

This Actor already returns the building register facts. For premium regions and tariffs, chain it with the companion Swiss data Actors from the same author, which take the BFS municipality number as input.

Something looks wrong

Open an issue in the Issues tab with the query you used.

Development

Python 3.12, Apify SDK, no other dependency: geocoder_actor/geoadmin.py is a minimal client for the geo.admin.ch REST API, normalize.py holds the parsing and scoring logic. pytest -m "not live" runs on recorded API responses; pytest -m live calls the real API; apify run runs the Actor locally.