{"openapi":"3.1.0","info":{"title":"racewindow API","summary":"Human-verified registration windows for European marathons and half marathons: read-only, free, no key.","description":"racewindow publishes when registration for each tracked race is announced, opens, closes or sells out. Every date was checked by a person against the organizer's own page, and each one comes with the organizer's verbatim wording and source link.\n\nThe read API is the public pages themselves: request `/` or `/race/{slug}` with `Accept: application/json` for JSON (ISO dates, race-local and UTC times) or `Accept: text/markdown` for Markdown (same facts and wording as the HTML; browsers get HTML). Agents can also use the MCP server at `/mcp` (tools `search_races` and `get_race`: Markdown, plus the same JSON as structured content). JSON fields are only ever added, never renamed or removed. Please link the race page when you quote a date.","version":"1.6.0","contact":{"name":"racewindow","url":"https://racewindow.com/about"}},"servers":[{"url":"https://racewindow.com"}],"externalDocs":{"description":"Developer docs","url":"https://racewindow.com/developers"},"tags":[{"name":"races","description":"Race list and race pages."},{"name":"mcp","description":"The MCP server."},{"name":"discovery","description":"Files that describe the site to agents."}],"components":{"schemas":{"Problem":{"type":"object","description":"RFC 9457 problem details. type is always about:blank, so the status code is the machine-readable part and title is its reason phrase.","required":["type","title","status","detail"],"properties":{"type":{"type":"string","format":"uri-reference","const":"about:blank"},"title":{"type":"string","examples":["Not Found"]},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","description":"What went wrong, for people."}}},"JsonRpcError":{"type":"object","description":"A JSON-RPC 2.0 error response (MCP).","required":["jsonrpc","id","error"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","integer","null"]},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","description":"JSON-RPC error code, e.g. -32700 parse error, -32600 invalid request, -32601 method not found, -32602 invalid params (also: unknown resource)."},"message":{"type":"string"},"data":{}}}}},"JsonRpcResult":{"type":"object","description":"A JSON-RPC 2.0 success response (MCP).","required":["jsonrpc","id","result"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","integer"]},"result":{"type":"object"}}},"Edition":{"properties":{"year":{"title":"Year","type":"integer"},"registration":{"description":"General entry's status, as on the race list (the badge).","enum":["open","upcoming","announced","rumored","sold_out","closed","raceday","expected","unknown"],"title":"Registration","type":"string"},"registration_label":{"description":"The badge's words, e.g. 'Open · lottery'.","title":"Registration Label","type":"string"},"also_open":{"description":"Restricted routes open meanwhile, e.g. 'charity'.","items":{"type":"string"},"title":"Also Open","type":"array"},"race_days":{"items":{"$ref":"#/components/schemas/RaceDay"},"title":"Race Days","type":"array"},"windows":{"items":{"$ref":"#/components/schemas/Window"},"title":"Windows","type":"array"}},"required":["year","registration","registration_label","also_open","race_days","windows"],"title":"Edition","type":"object"},"ExpectedEdition":{"description":"Not announced yet: racewindow's projection from the last edition.","properties":{"year":{"title":"Year","type":"integer"},"month":{"description":"YYYY-MM, expected race month (a projection).","title":"Month","type":"string"},"based_on_year":{"title":"Based On Year","type":"integer"},"last_opened":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"When registration opened for based_on_year.","title":"Last Opened"}},"required":["year","month","based_on_year","last_opened"],"title":"ExpectedEdition","type":"object"},"PastEdition":{"properties":{"year":{"title":"Year","type":"integer"},"status":{"title":"Status","type":"string"},"start":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"Start"},"end":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"title":"End"},"windows":{"items":{"$ref":"#/components/schemas/Window"},"title":"Windows","type":"array"}},"required":["year","status","start","end","windows"],"title":"PastEdition","type":"object"},"RaceDay":{"properties":{"distance":{"anyOf":[{"enum":["marathon","half"],"type":"string"},{"type":"null"}],"description":"null: the race weekend as a whole.","title":"Distance"},"date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"Race day, when the organizer gave the day.","title":"Date"},"date_end":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"Last day of a multi-day span.","title":"Date End"},"month":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM.","title":"Month"},"precision":{"anyOf":[{"enum":["day","month","estimated"],"type":"string"},{"type":"null"}],"description":"day = the date is known, month = only the month, estimated = approximate.","title":"Precision"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The organizer's own words.","title":"Text"}},"required":["distance","date","date_end","month","precision","text"],"title":"RaceDay","type":"object"},"RaceDetail":{"description":"One race in full: what /race/<slug> shows.","properties":{"slug":{"title":"Slug","type":"string"},"name":{"title":"Name","type":"string"},"city":{"title":"City","type":"string"},"country":{"description":"ISO 3166-1 alpha-2.","title":"Country","type":"string"},"distances":{"items":{"enum":["marathon","half"],"type":"string"},"title":"Distances","type":"array"},"series":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Series"},"timezone":{"description":"IANA time zone all local times are in.","title":"Timezone","type":"string"},"official_site":{"title":"Official Site","type":"string"},"page":{"title":"Page","type":"string"},"editions":{"description":"Upcoming editions, soonest first.","items":{"$ref":"#/components/schemas/Edition"},"title":"Editions","type":"array"},"expected":{"anyOf":[{"$ref":"#/components/schemas/ExpectedEdition"},{"type":"null"}],"description":"Set only when no upcoming edition is announced."},"past_editions":{"items":{"$ref":"#/components/schemas/PastEdition"},"title":"Past Editions","type":"array"}},"required":["slug","name","city","country","distances","series","timezone","official_site","page","editions","expected","past_editions"],"title":"RaceDetail","type":"object"},"RaceList":{"description":"What / shows: one row per upcoming edition, soonest registration first.\nComplete for what racewindow tracks, a curated set of major European races\n(not every race: one missing here is untracked, not closed). Never\npaginated: every match is in `races`.","properties":{"count":{"description":"Rows in races: every match, never paginated.","title":"Count","type":"integer"},"tracked_races":{"description":"How many races racewindow tracks in all, before filters.","title":"Tracked Races","type":"integer"},"filters":{"additionalProperties":{"type":"string"},"description":"The filters applied.","title":"Filters","type":"object"},"ignored_filters":{"additionalProperties":{"type":"string"},"description":"Filters given a value they don't take, with the values they do.","title":"Ignored Filters","type":"object"},"unknown_parameters":{"description":"Query parameters that aren't filters (a typo, or another API's name), ignored. The filters: country, distance, mechanism (or entry_type), status, month (or race_month), series.","title":"Unknown Parameters","type":"integer"},"races":{"items":{"$ref":"#/components/schemas/RaceListItem"},"title":"Races","type":"array"}},"required":["count","tracked_races","filters","ignored_filters","unknown_parameters","races"],"title":"RaceList","type":"object"},"RaceListItem":{"properties":{"slug":{"title":"Slug","type":"string"},"name":{"title":"Name","type":"string"},"city":{"title":"City","type":"string"},"country":{"title":"Country","type":"string"},"distances":{"items":{"enum":["marathon","half"],"type":"string"},"title":"Distances","type":"array"},"series":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Series"},"page":{"title":"Page","type":"string"},"official_site":{"description":"The organizer's own site.","title":"Official Site","type":"string"},"edition_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Edition Year"},"race_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"First race day, when the day is known.","title":"Race Date"},"race_date_label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"As the list shows it, e.g. '8–9 May 2027'.","title":"Race Date Label"},"race_date_expected":{"description":"true: the race date is racewindow's projection, not announced.","title":"Race Date Expected","type":"boolean"},"registration":{"enum":["open","upcoming","announced","rumored","sold_out","closed","raceday","expected","unknown"],"title":"Registration","type":"string"},"registration_label":{"title":"Registration Label","type":"string"},"also_open":{"items":{"type":"string"},"title":"Also Open","type":"array"},"closes":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"General entry's closing day, race-local.","title":"Closes"},"verified_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When a person last checked this edition's registration against the organizer (UTC, newest of its windows); null: nothing published yet.","title":"Verified At"}},"required":["slug","name","city","country","distances","series","page","official_site","edition_year","race_date","race_date_label","race_date_expected","registration","registration_label","also_open","closes","verified_at"],"title":"RaceListItem","type":"object"},"When":{"description":"One registration date as published.","properties":{"date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"description":"The day, when the organizer gave one.","title":"Date"},"month":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"YYYY-MM, whenever any date is known.","title":"Month"},"local":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"The moment in the race's time zone, only when a time of day was stated.","title":"Local"},"utc":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"The same moment in UTC.","title":"Utc"},"precision":{"anyOf":[{"enum":["exact","day","month","estimated"],"type":"string"},{"type":"null"}],"description":"exact = date and time of day (local, utc set), day = the date only, month = only the month is known, estimated = approximate. null: only text.","title":"Precision"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The organizer's own words, original language.","title":"Text"}},"required":["date","month","local","utc","precision","text"],"title":"When","type":"object"},"Window":{"description":"One way in: a phase (route), how places are allocated, and its dates.","properties":{"phase":{"enum":["general","early_bird","late","loyalty","charity","qualifier","resale"],"title":"Phase","type":"string"},"mechanism":{"description":"fcfs = first come, first served.","enum":["lottery","fcfs"],"title":"Mechanism","type":"string"},"distance":{"anyOf":[{"enum":["marathon","half"],"type":"string"},{"type":"null"}],"description":"null: the whole event.","title":"Distance"},"status":{"description":"As the page shows it: derived from the dates for upcoming editions (an announced window whose opening has passed is open).","enum":["open","upcoming","announced","rumored","closed","sold_out"],"title":"Status","type":"string"},"opens":{"anyOf":[{"$ref":"#/components/schemas/When"},{"type":"null"}]},"closes":{"anyOf":[{"$ref":"#/components/schemas/When"},{"type":"null"}]},"results":{"anyOf":[{"$ref":"#/components/schemas/When"},{"type":"null"}],"description":"Lottery results, when announced."},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The organizer page the dates come from.","title":"Source Url"},"source_kind":{"anyOf":[{"enum":["page","newsletter"],"type":"string"},{"type":"null"}],"title":"Source Kind"},"verified_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"When a person last checked it against the organizer (UTC).","title":"Verified At"}},"required":["phase","mechanism","distance","status","opens","closes","results","source_url","source_kind","verified_at"],"title":"Window","type":"object"}},"responses":{"NotFound":{"description":"No such page, or the race is not tracked. Markdown (what the site is, with links to the race list, sitemap, llms.txt and these docs) for Accept: text/markdown; otherwise problem details.","content":{"text/markdown":{"schema":{"type":"string"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"ServerError":{"description":"Something broke on our side.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"McpNoStream":{"description":"No server-to-client stream here: use POST.","headers":{"Allow":{"schema":{"type":"string","const":"POST"}}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"McpRequestError":{"description":"The HTTP request itself was wrong: not JSON (400) or an Accept header without application/json and text/event-stream (406).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcError"}}}}}},"paths":{"/":{"get":{"tags":["races"],"operationId":"listRaces","summary":"List races with their registration status","description":"Every tracked race (filtered by the parameters): race date, registration status of general entry, closing date and the race page URL.","parameters":[{"name":"country","in":"query","required":false,"description":"ISO 3166-1 alpha-2 country code, upper case, e.g. DE.","schema":{"type":"string","pattern":"^[A-Z]{2}$"}},{"name":"distance","in":"query","required":false,"description":"Races that include this distance.","schema":{"type":"string","enum":["marathon","half"]}},{"name":"mechanism","in":"query","required":false,"description":"Races with a window of this entry type (fcfs = first come, first served).","schema":{"type":"string","enum":["lottery","fcfs","qualifier","charity","late"]}},{"name":"status","in":"query","required":false,"description":"Registration status of general entry, as the table shows it (upcoming = opening date announced; expected = next edition not announced).","schema":{"type":"string","enum":["open","upcoming","announced","closed","sold_out","expected","unknown"]}},{"name":"month","in":"query","required":false,"description":"Month of race day, 1-12.","schema":{"type":"integer","minimum":1,"maximum":12}},{"name":"series","in":"query","required":false,"description":"A race series as the list labels it, any case: SuperHalfs (both its Originals and Europa series) or WMM (World Marathon Majors).","schema":{"type":"string","examples":["SuperHalfs","WMM"]}},{"name":"entry_type","in":"query","required":false,"description":"Same as mechanism (the MCP tool's name for it).","schema":{"type":"string","enum":["lottery","fcfs","qualifier","charity","late"]}},{"name":"race_month","in":"query","required":false,"description":"Same as month (the MCP tool's name for it).","schema":{"type":"integer","minimum":1,"maximum":12}}],"responses":{"200":{"description":"The race list.","headers":{"Vary":{"schema":{"type":"string"},"description":"Always Accept."}},"content":{"text/html":{"schema":{"type":"string"}},"text/markdown":{"schema":{"type":"string"}},"application/json":{"schema":{"$ref":"#/components/schemas/RaceList"}}}},"500":{"$ref":"#/components/responses/ServerError"}}}},"/race/{slug}":{"get":{"tags":["races"],"operationId":"getRace","summary":"One race: race day and every registration window","description":"Race day, each registration window of the upcoming edition(s) with phase, entry type, status, opens and closes (race-local time), the organizer's verbatim wording with sources and verification dates, and past editions.","parameters":[{"name":"slug","in":"path","required":true,"description":"The race's slug, e.g. berlin-marathon (from the race list's links).","schema":{"type":"string","pattern":"^[a-z0-9-]+$"}}],"responses":{"200":{"description":"The race page.","headers":{"Vary":{"schema":{"type":"string"},"description":"Always Accept."}},"content":{"text/html":{"schema":{"type":"string"}},"text/markdown":{"schema":{"type":"string"}},"application/json":{"schema":{"$ref":"#/components/schemas/RaceDetail"}}}},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/ServerError"}}}},"/mcp":{"post":{"tags":["mcp"],"operationId":"mcp","summary":"MCP server (Streamable HTTP, stateless, read-only, no auth)","description":"Model Context Protocol over JSON-RPC 2.0. Tools search_races and get_race; resources racewindow://races and racewindow://race/{slug}. Send `Accept: application/json, text/event-stream`; answers are plain JSON, never an event stream. The server card lists the tools with their input schemas.","externalDocs":{"description":"MCP server card","url":"https://racewindow.com/.well-known/mcp/server-card.json"},"parameters":[{"name":"MCP-Protocol-Version","in":"header","required":false,"description":"The protocol version agreed at initialize.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"A JSON-RPC 2.0 request or notification.","required":["jsonrpc","method"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","integer"]},"method":{"type":"string"},"params":{"type":"object"}}}}}},"responses":{"200":{"description":"The JSON-RPC response: a result, or an error object (unknown method, invalid params, unknown resource). A tool that fails returns a result with isError true and the reason as text.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/JsonRpcResult"},{"$ref":"#/components/schemas/JsonRpcError"}]}}}},"202":{"description":"A notification, accepted (no body)."},"400":{"$ref":"#/components/responses/McpRequestError"},"406":{"$ref":"#/components/responses/McpRequestError"}}},"get":{"tags":["mcp"],"operationId":"mcpGet","summary":"No event stream: 405","description":"The server is stateless and sends nothing unasked, so it offers no server-to-client stream (the spec's 405 answer).","responses":{"405":{"$ref":"#/components/responses/McpNoStream"}}}},"/llms.txt":{"get":{"tags":["discovery"],"operationId":"llmsTxt","summary":"Site summary for language models (llms.txt)","responses":{"200":{"description":"llms.txt.","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"$ref":"#/components/responses/ServerError"}}}},"/sitemap.xml":{"get":{"tags":["discovery"],"operationId":"sitemap","summary":"Every race page, with the date it was last verified","responses":{"200":{"description":"The sitemap.","content":{"application/xml":{"schema":{"type":"string"}}}},"500":{"$ref":"#/components/responses/ServerError"}}}},"/.well-known/mcp/server-card.json":{"get":{"tags":["discovery","mcp"],"operationId":"mcpServerCard","summary":"MCP server card: tools, resources, transport","responses":{"200":{"description":"The server card.","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"$ref":"#/components/responses/ServerError"}}}},"/.well-known/api-catalog":{"get":{"tags":["discovery"],"operationId":"apiCatalog","summary":"API catalog (RFC 9727)","responses":{"200":{"description":"A linkset.","content":{"application/linkset+json":{"schema":{"type":"object"}}}},"500":{"$ref":"#/components/responses/ServerError"}}}}}}