Skip to content

How do I turn addresses into map coordinates for a WordPress directory?

Geocode each address once, when the entry is saved, and store latitude and longitude in the database through a service whose terms allow keeping them: geo.admin.ch for Switzerland and Liechtenstein, Nominatim or Geoapify elsewhere, but not the Google Geocoding API, which limits caching to 30 days. A whole list goes in through an import that geocodes every row without coordinates once, at most one address per second with Nominatim, which makes 74 seconds for the 74 entries of eastki.ch and more than 83 minutes for 5,000. From then on the map reads only the stored values. All terms quoted here were read on 29 November 2026.

The methodology page explains how the figures were collected.

Which geocoding services can a directory use?

Four services are realistic options for a directory in Switzerland. Any one of them can handle the volume of the 74 entries on eastki.ch, counted on 17 November 2026. Where they differ is what you may store and how quickly requests go through. The table summarizes their terms as read on 29 November 2026:

Service Rule that matters for a directory
Nominatim (OpenStreetMap) At most 1 request per second, no autocomplete, bulk geocoding discouraged
geo.admin.ch (swisstopo) Free, no registration, fair use up to an average of 20,000 users per day for a web application
Geoapify Free plan with 3,000 credits per day at up to 5 requests per second, commercial use in production only with limitations set by Geoapify
Google Geocoding API 10,000 requests per month without charge, coordinates cached for at most 30 days, not with a non‑Google map

The figures come from the Nominatim usage policy, the terms of use of the federal spatial data infrastructure, the Geoapify pricing page, the Geoapify terms, the Google Maps Platform pricing, the Geocoding API policies and the Google Maps Platform Service Specific Terms. For the latter, section 6 counts in the version last modified on 24 November 2026, which applies to customers without a billing address in the European Economic Area.

Can I store the coordinates from Google for good?

Not for a directory. Section 6.3.1 of the Service Specific Terms, read on 29 November 2026, caps caching of Geocoding API coordinates at 30 consecutive calendar days. Under section 6.3.2 they may be kept indefinitely only for the direct, end-user-facing function of the application that made the request, isolated for that one end user and never used across several end users. A directory shows every visitor the same coordinates.

Section 6.2 adds a second restriction: the results may not be used with a non‑Google map. If your directory runs on OpenStreetMap, Google is ruled out as the geocoder. If the directory on eastki.ch used a Google map instead, its 74 entries would need 74 fresh requests every 30 days, far below the 10,000 monthly requests Google provides free of charge.

Can I use Nominatim for a whole directory?

Yes, as long as the directory is small and each address is geocoded once on saving. The Nominatim policy, read on 29 November 2026, permits at most 1 request per second. It requires a User‑Agent that identifies the application and expects results to be cached. Periodic requests from apps are strongly discouraged, and bulk geocoding of larger datasets is not encouraged.

At one request per second, 74 addresses need at least 74 seconds and 5,000 addresses need at least 5,000 seconds, more than 83 minutes. Autocomplete is explicitly banned by the policy. Nominatim therefore can’t power the search box your visitors type into.

Which service suits Swiss addresses?

The geo.admin.ch search from swisstopo, which works without a key. All 74 entries on eastki.ch are in Switzerland, as queried on 17 November 2026. Under the terms of the federal spatial data infrastructure, use is free and needs no registration. A web application averaging 20,000 users per day counts as fair use, read on 29 November 2026.

Addresses outside Switzerland and Liechtenstein and autocomplete need a service with a separate key for each site. Geoapify fits that case: its free plan includes 3,000 credits per day at up to 5 requests per second, and one geocoding request costs one credit, according to its pricing page on 29 November 2026. Its terms, version 5 of 2 February 2024, allow commercial use of the free plan in development and, with some limitations, in production, and refer to Geoapify for the details. The license cannot be sublicensed, so every site needs its own key.

Do I have to geocode again when switching plugins?

Not if the previous plugin saved the coordinates in the database. On eastki.ch, every one of the 74 rows in the GEO my WP table had latitude and longitude, as queried on 17 November 2026. An import can carry those values over without sending a single request to a geocoding service, and the move from GEO my WP to Mapfolk does exactly that.

For the other costs of switching, see what a directory map with filters costs. Setting up the directory itself is covered in how to add a member directory with a map.

How do I turn a list of addresses into a map in WordPress?

Import the list in two steps, then geocode every row once that has no coordinates yet. In the first step the plugin reads the spreadsheet and shows a preview of which rows it will create, which it will update and which it will skip, before anything is saved. In the second step it saves the entries and sends the addresses to the geocoder one at a time. Rows that already carry latitude and longitude need no request at all.

The preview catches the errors that are visible in the file itself: a row without a name, coordinates outside the valid range or a country nobody can read. An address the geocoder cannot find only shows up after the request, so it needs a second place to land, an error list with the row number. With that list you correct the spreadsheet and import it again.

How long does a list of addresses take with Nominatim?

At least one second per address. The Nominatim usage policy, read again on 29 November 2026, sets an absolute maximum of 1 request per second, and that limit counts for the sum of all users of an application. A site with several editors importing at the same time shares the same second.

For one‑off bulk jobs the policy adds three conditions: a single thread, a single machine and results cached on your side. Scripts that run longer than a day or at regular intervals are limited to 4 requests per minute. At that rate, 5,000 addresses would take 1,250 minutes, almost 21 hours, instead of the 83 minutes a single run at one request per second needs.

Does importing the same list twice create duplicates?

Only if the import cannot recognize the entries it created the first time. A column with the ID of each entry is the surest key. Without one, name plus address is the usual fallback, and then a name spelled differently in the second file counts as a new entry. The directory on eastki.ch shows why coordinates are no key: three coordinate pairs appear twice in its 74 rows, queried on 17 November 2026, for six different entries. How such entries can share one map is the topic of showing multiple locations on one map.

How does Mapfolk do it?

Mapfolk geocodes in the backend, once when an entry is saved, and never from a visitor’s browser. By default it asks geo.admin.ch, which finds addresses in Switzerland and Liechtenstein; for addresses in other countries you choose Nominatim for the map, at most one request per second, with a User‑Agent that names the site. Mapfolk Pro adds Geoapify with a separate key for each site, set up as described in radius search outside Switzerland. Because of section 6.2, Pro uses Google only as a map.

Mapfolk Pro also imports a list from Excel (.xlsx) or CSV of up to 2 MB in two steps: the file, then a preview with the column mapping that says for every row whether it will be created, updated or skipped, and why. The preview stays valid for 15 minutes. Mapfolk recognizes existing entries by the ID column or by name plus address, ignoring upper and lower case and extra spaces, so the same file imported twice updates the entries instead of doubling them. An empty cell never changes a stored value. Rows with the same ID count once if their values agree; if they contradict each other, the preview names all their row numbers and the entry stays as it is. If a step fails while a row is saved, an existing entry gets its old values back and a new one is removed again. Rows with latitude and longitude are saved without a request, the others are geocoded afterwards one entry at a time, and every address that is not found goes to the error list with its row number, which you can download as a CSV file. Every step is in the documentation on importing entries.

Back to the blog