A year ago I wanted a simple answer: which gyms near me are HYROX-affiliated? An official finder exists, but it answers "which gyms around this point" — not "which gyms in my département", and certainly not "which ones were added recently".
So I built one, on RoxZone, a French HYROX site I run. Today it holds 331 gym pages, 94 city pages and 38 département pages. Against that, 1,040 affiliated gyms currently exist in France. So I cover 32 %, and that gap is half the point of this article.
Here is what I learned building it, including the parts that did not work.
Finding a usable source
First problem: there is no public list of HYROX-affiliated gyms. The brand's sites give you a map, not an export.
Inspecting the network requests behind the official finder showed that the data comes from a third-party platform's API. It answers one kind of question: give me the gyms around this point, within this radius.
Hence the first architectural decision: a geographic grid. Instead of an impossible "all of France" query, I run 38 reads centred on points spread across the country and merge the results. Every gym carries a stable identifier, so deduplication is trivial.
One detail saved me from a silent failure. The API sets a truncated flag when it cuts results short. Without checking it, a dense area like greater Paris would have returned an incomplete list with nothing to indicate it.
python
The API tells you itself when it truncates.
if isinstance(data, dict) and data.get("truncated"):
truncated_zones.append(zone)
Detecting new affiliations
A directory is only worth something if it stays current. But the API carries no affiliation date. You cannot ask for "gyms added this month".
The solution is dumb and effective: a weekly read, a baseline stored as JSON, and a diff. Anything present in week N and absent from week N-1 is a new affiliation. It runs as a GitHub Action on a Monday-morning cron and emails me only when something changed.
This approach has a limit I accept: it detects appearance in the database, not the opening of a gym. A gym that has been running for three years and affiliates today shows up as "new". Fine for my purpose, but I do not claim to detect openings.
The real trap is the mass false positive. Two of them, specifically.
The API hiccup. If a read returns 400 gyms instead of 1,040, the diff concludes that 640 gyms closed and overwrites the baseline with garbage. Hence this guard, which has already earned its place:
python
Suspicious read: refuse to overwrite the baseline.
if previous and len(gyms) < previous * 0.85:
sys.exit(1)
The chain deal. When a gym chain signs a network-wide agreement, forty locations appear in the same week. Technically forty new affiliations; editorially, one event. So the pipeline collapses any cluster above a threshold into a single notification instead of forty, and flags it as a likely network deal.
Same logic for email: a send failure fails the job. A monitoring script that fails silently is worse than no monitoring, because you trust it.
Name matching, the part I underestimated
Three datasets had to be reconciled: the API, my existing WordPress database, and enrichment sources. All three name gyms differently. "CrossFit Lab", "Crossfit LAB Toulouse", "Le Lab CrossFit".
My first version matched on geographic distance alone. Result: 6 wrong matches out of 10. One gym was paired with a completely unrelated chain location 200 metres away.
The version that works combines three signals, after Unicode normalisation to strip accents:
substring inclusion, but only with at least 5 characters and one shared distinctive word;
Jaccard similarity on distinctive words, excluding the city name and a domain stop-word list (crossfit, fitness, gym, club, training, box, studio…);
SequenceMatcher, but only above 0.75, as a last resort.
Those two exclusions are what fixed it. Without removing the city name, "CrossFit Mulhouse" matched "Climbing Mulhouse Center" — they share one word, and it is the city. Without requiring a distinctive word, "CrossFit Bastia" matched any "CrossFit" within range. After the fix: 16 out of 16 on my test cases.
If I had to keep one lesson: in a geographic dataset, the place name is noise, not signal. It is the one token guaranteed to be shared by every candidate.
What did not work: OpenStreetMap
I wanted to fill in missing phone numbers and opening hours without paying for an API. OpenStreetMap and Overpass looked like the obvious answer.
Honest verdict: across 150 gyms needing enrichment, OSM filled in 2 phone numbers. Private gyms are barely mapped. I kept the code — it costs nothing to run — but it is not a substitute for a commercial API. I would rather write that than let anyone assume otherwise.
The bug that cost me the most
French postal codes in départements 01 to 09 start with a zero. Somewhere in my pipeline, a postal code passed through an integer.
06000 became 6000. Result: 49 gyms filed under the wrong département, including 27 from the Alpes-Maritimes assigned to a département that does not exist.
The rule I took from it, and apply since: when you find one error in a dataset, immediately write a global diagnostic script. Never fix case by case. I had spotted a single gym; the diagnostic found 49. Had I patched the first one by hand, I would still be finding the others today.
A WordPress gotcha worth knowing
The directory uses three custom post types: département, city, gym. Clean model, clean URLs.
At some point I changed the PHP template that renders one of those types. The pages changed. Google kept serving the old version for weeks.
The reason took me an evening to find: editing a template file does not touch post_modified in the database. The sitemap's lastmod therefore still advertised the date of the original import, five months earlier, for all 38 pages. Nothing in the pipeline told search engines anything had changed.
The fix is a few lines. Re-sending an already-published status triggers wp_update_post, which stamps post_modified with the current time, without touching a single field of content:
python
Triggers wp_update_post without modifying any content:
post_modified is refreshed, and the sitemap's lastmod follows.
requests.post(f"{base}/wp-json/wp/v2/cpt_dept/{post_id}",
json={"status": "publish"}, auth=auth)
Two things to know before running it. On shared hosting, each write took 44 seconds — half an hour for 38 pages. And if you use an SEO plugin that caches its sitemaps, the XML will keep serving stale dates until that cache is flushed, which cost me another hour of wrongly blaming my own script.
Open questions
I am at 32 % coverage: 331 pages for 1,040 affiliated gyms. Inside the 94 cities I do cover, the directory is near complete — 331 pages for 335 existing gyms. The entire gap is cities with no page at all.
Three things I am still undecided about, and where I would genuinely like other people's input:
How far should page generation be automated? Generating 600 city pages from the weekly feed is technically trivial. But a generated page with no original content is a weak page, and publishing 600 at once is a good way to waste a crawl budget.
Should the scope widen beyond affiliated gyms? A competitor covers twice as many cities by including boxes that program HYROX workouts without being affiliated. More coverage, but a fuzzier definition of what the directory actually lists.
How should de-affiliations be handled? Six of my city pages no longer have a single affiliated gym in the current feed. Delete the page, keep it with a note, redirect it? I have not decided.
The directory is here: roxzone.fr/salles-hyrox. If you have built a geo-directory fed by an external source, I would be curious how you handled name matching — by a wide margin, it is the part that took the most iterations.

