{"openapi":"3.1.0","info":{"title":"Hiking Republic API","version":"1.0.0","description":"Read-only, static JSON for every hike on hikingrepublic.org. Files are rebuilt when the site is; fetch /api/hikes.json once and filter it yourself rather than polling."},"servers":[{"url":"https://hikingrepublic.org"}],"security":[],"paths":{"/api/hikes.json":{"get":{"operationId":"listHikes","summary":"All hikes","responses":{"200":{"description":"All hikes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Hike"}}}}}}}},"/api/hikes/{id}.json":{"get":{"operationId":"getHike","summary":"One hike, with a simplified track","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The hike","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HikeDetail"}}}},"404":{"description":"No hike with that id"}}}},"/api/seasons/{season}.json":{"get":{"operationId":"listHikesBySeason","summary":"Hikes for one season","parameters":[{"name":"season","in":"path","required":true,"schema":{"type":"string","enum":["spring","summer","autumn","winter"]}}],"responses":{"200":{"description":"Hikes for the season","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Hike"}}}}},"404":{"description":"Unknown season"}}}}},"components":{"schemas":{"Hike":{"type":"object","required":["id","name","region","from","to","grade","seasons","teaser","highlight","tip","transport","family","pram","run","snowshoe","exposed","best","loop","km","ascent","descent","maxElevation","minElevation","hours","start","links","gpx","url"],"properties":{"id":{"type":"string","description":"Stable slug, also the GPX file name","examples":["lavaux"]},"name":{"type":"string"},"region":{"type":"string"},"from":{"type":"string","description":"Start point"},"to":{"type":"string","description":"End point"},"grade":{"type":"string","enum":["T1","T2","T3","T4"],"description":"SAC hiking scale"},"seasons":{"type":"array","items":{"type":"string","enum":["spring","summer","autumn","winter"]}},"teaser":{"type":"string","description":"One-line description"},"highlight":{"type":"string"},"tip":{"type":"string"},"transport":{"type":"string","description":"Public transport to the start and back"},"family":{"type":"boolean","description":"Good with kids"},"pram":{"type":"boolean","description":"Sturdy all-terrain pram on gravel"},"run":{"type":"boolean","description":"Good as a trail run"},"snowshoe":{"type":"boolean"},"exposed":{"type":"boolean","description":"Needs a head for heights"},"best":{"type":"boolean","description":"Editor pick"},"loop":{"type":"boolean","description":"Ends where it starts (computed from the GPX)"},"km":{"type":"number","description":"Distance in km, from the GPX"},"ascent":{"type":"integer","description":"Metres up"},"descent":{"type":"integer","description":"Metres down"},"maxElevation":{"type":"integer","description":"Metres above sea level"},"minElevation":{"type":"integer"},"hours":{"type":"number","description":"Estimated walking time, to the nearest 0.25 h"},"start":{"type":"object","required":["lat","lon"],"properties":{"lat":{"type":"number"},"lon":{"type":"number"}}},"links":{"type":"object","description":"Every link is optional","properties":{"komoot":{"type":"string","format":"uri"},"alltrails":{"type":"string","format":"uri"},"hikr":{"type":"string","format":"uri"},"schweizmobil":{"type":"string","format":"uri"},"official":{"type":"string","format":"uri"},"webcam":{"type":"string","format":"uri"}}},"gpx":{"type":"string","format":"uri","description":"Full GPX track"},"url":{"type":"string","format":"uri","description":"The hike on hikingrepublic.org"}}},"HikeDetail":{"allOf":[{"$ref":"#/components/schemas/Hike"},{"type":"object","required":["track"],"properties":{"track":{"type":"array","description":"~120 [lat, lon] points; use gpx for the full track","items":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2}}}}]}}}}