{"openapi":"3.1.0","info":{"title":"Adventure On Foot API","version":"1","description":"Read-only search of Adventure On Foot's directory of UK named walking routes: national trails, long-distance routes and walks, each checked against its publisher where one exists, with sections and the nearest station or bus stop at each end. No key needed. Route data is derived from OpenStreetMap and available under the Open Database Licence: credit \"© OpenStreetMap contributors; Adventure On Foot\" and link to the route's page.","contact":{"name":"Ben Willis","email":"ben@adventureonfoot.co.uk","url":"https://adventureonfoot.co.uk/data"},"license":{"name":"ODbL-1.0","url":"https://opendatacommons.org/licenses/odbl/1-0/"}},"externalDocs":{"description":"How to use it, with examples","url":"https://adventureonfoot.co.uk/data"},"servers":[{"url":"https://adventureonfoot.co.uk"}],"paths":{"/api/v1/trails":{"get":{"operationId":"searchTrails","summary":"Find walking routes, near a point or by name, length, shape and difficulty","description":"Near a point (lat and lon), nearest start first; otherwise in code order. At most 50 results.","parameters":[{"name":"lat","in":"query","required":false,"schema":{"type":"number"},"description":"Latitude of the point to search near (with lon)."},{"name":"lon","in":"query","required":false,"schema":{"type":"number"},"description":"Longitude of the point to search near (with lat)."},{"name":"within","in":"query","required":false,"schema":{"type":"number","default":10,"maximum":50},"description":"Miles from the point."},{"name":"min_miles","in":"query","required":false,"schema":{"type":"number"},"description":"Shortest route length in miles."},{"name":"max_miles","in":"query","required":false,"schema":{"type":"number"},"description":"Longest route length in miles."},{"name":"shape","in":"query","required":false,"schema":{"type":"string","enum":["circular","linear"]},"description":"Circular or linear."},{"name":"tier","in":"query","required":false,"schema":{"type":"string","enum":["national","long","short"]},"description":"National trails, long-distance routes or walks (under 20 miles)."},{"name":"difficulty","in":"query","required":false,"schema":{"type":"string","enum":["easy","moderate","challenging"]},"description":"Our grade, the same rule for every route."},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Part of a route's name, or its code."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"maximum":50},"description":"How many results."}],"responses":{"200":{"description":"Matching routes","content":{"application/json":{"schema":{"type":"object","properties":{"trails":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Our code, e.g. UK 001. Never changes and is never reused."},"name":{"type":"string"},"url":{"type":"string","description":"The route's page. Link to it when you use the data."},"api":{"type":"string","description":"This route in full."},"kind":{"type":"string","enum":["national trail","long-distance route","walk"]},"shape":{"type":"string","enum":["linear","circular","out_and_back"]},"miles":{"type":"number"},"start":{"type":["string","null"]},"finish":{"type":["string","null"]},"start_point":{"type":["object","null"],"properties":{"lat":{"type":"number"},"lon":{"type":"number"}}},"difficulty":{"type":["string","null"],"enum":["easy","moderate","challenging",null]},"climbing_m":{"type":["number","null"]},"walking_hours":{"type":["number","null"]},"counties":{"type":"array","items":{"type":"string"}},"coastal":{"type":"boolean"},"summary":{"type":["string","null"]},"checked_against_publisher":{"type":"boolean"},"status":{"type":["string","null"],"description":"Set when the route is closed, diverted, withdrawn or similar."},"miles_away":{"type":"number","description":"Only when searching near a point."}}}},"licence":{"type":"object","properties":{"data":{"type":"string"},"heights":{"type":"string"},"sources":{"type":"string"},"releases":{"type":"string"},"about":{"type":"string"}}}}}}}}}}},"/api/v1/trails/{slug}":{"get":{"operationId":"getTrail","summary":"One route in full, with its sections","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"The route's slug, as in its page address, e.g. pennine-way."}],"responses":{"200":{"description":"The route","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"kind":{"type":"string"},"shape":{"type":"string"},"miles":{"type":"number","description":"The publisher's length where it gives one, otherwise measured from the map."},"measured_miles":{"type":"number"},"start":{"type":["string","null"]},"finish":{"type":["string","null"]},"region":{"type":"string"},"counties":{"type":"array","items":{"type":"string"}},"coastal":{"type":"boolean"},"difficulty":{"type":["string","null"]},"walking_hours":{"type":["number","null"]},"climbing_m":{"type":["number","null"]},"highest_m":{"type":["number","null"]},"summary":{"type":["string","null"]},"opened":{"type":["string","null"]},"maintained_by":{"type":["string","null"]},"waymark":{"type":["string","null"]},"history":{"type":["string","null"],"description":"A link to the route's sourced history on its page; the text itself stays on the page."},"map":{"type":"object","properties":{"incomplete":{"type":"boolean"},"gpx":{"type":["string","null"]}}},"status":{"type":["string","null"]},"checked_against_publisher":{"type":"boolean"},"publisher_page":{"type":["string","null"]},"sections":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"miles":{"type":"number"},"start":{"type":["string","null"]},"finish":{"type":["string","null"]},"climbing_m":{"type":["number","null"]},"getting_there":{"type":["object","null"],"description":"The nearest railway station or bus stop to that end of the section.","properties":{"kind":{"type":"string","enum":["station","bus_stop"]},"name":{"type":["string","null"]},"metres":{"type":"number"},"within_1km":{"type":"boolean"}}},"getting_back":{"type":["object","null"],"description":"The nearest railway station or bus stop to that end of the section.","properties":{"kind":{"type":"string","enum":["station","bus_stop"]},"name":{"type":["string","null"]},"metres":{"type":"number"},"within_1km":{"type":"boolean"}}}}}},"licence":{"type":"object","properties":{"data":{"type":"string"},"heights":{"type":"string"},"sources":{"type":"string"},"releases":{"type":"string"},"about":{"type":"string"}}}}}}}},"404":{"description":"No such route"}}}}}}