For running apps
A race name.Its official route.
Your users type the name of their race in your app; RaceHub returns the event, its date, its location and the GPX file published by the organizer, checked and ready to load.
The documentation is in French for now; the OpenAPI contract is readable by any tool.
Race found
Lakeside Half 2027
Official route · lakeside-half.example
Send to my watchWhat the API does
Search by name
Names, abbreviations and editions understood; location and dates tell apart two races with the same name.
On-demand discovery
A race RaceHub doesn't know yet is looked up live, on the organizer's website: a few seconds, then it serves everyone.
Checked, clean GPX
GPX 1.1: track, elevations, useful points; no author, timestamps or device data. Distance, elevation gain and point count included.
Versions and webhooks
Every change by the organizer is a version; subscribe to a route and receive signed route.updated or route.removed events.
Reports
A user thinks a route is wrong? Report it: several reports take it out of search while it is checked.
Standard and secure
REST and JSON, described in OpenAPI 3.1; OAuth2 (client credentials); quotas per plan; /v1 kept for 12 months after a /v2.
In practice
- Get your credentials: a client ID and a secret, for an OAuth2 token.
- Search:
GET /v1/search?q=…, with the user's rounded location if you have it. - Load the file:
GET /v1/routes/{id}/gpx. - Show the source next to the route, with its link.
- Stay up to date: subscribe to the route, receive the webhooks.
# Search for a race
curl -H "Authorization: Bearer $TOKEN" \
"https://racehub.nonrien.com/v1/search?q=lakeside+half&lat=46.2&lon=6.1"
{
"status": "found",
"best": {
"event": {
"name": "Lakeside Half 2027", "starts_on": "2027-04-11",
"city": "Geneva", "country": "CH",
"routes": [{ "id": 42, "label": "Half marathon",
"distance_m": 21130, "version": 2 }]
},
"route_id": 42,
"source": { "page_url": "https://lakeside-half.example/route",
"kind": "organizer" }
}
}
# Load the route
curl -H "Authorization: Bearer $TOKEN" \
"https://racehub.nonrien.com/v1/routes/42/gpx" -o half.gpx
Your commitments
RaceHub only keeps files published by organizers. To keep it that way, every app agrees to:
- show the source with every route
- delete a withdrawn route within 72 hours (
410orroute.removed) - not scrape the catalogue: you search for a race on behalf of a user
- not send a location more precise than 0.1° (about 10 km)
- not resell the files on their own
Locations received are never stored or logged by RaceHub.