Use the data
Everything in The Directory is free to use: build a map, an app, a guide, a study or an assistant on it. No key, no sign-up.
Route data is derived from OpenStreetMap, so it comes under the Open Database Licence. Credit “© OpenStreetMap contributors; Adventure On Foot”, link to the route’s page when you show one, and share anything you build from the data itself under the same licence. Where every field comes from.
The API
Read-only JSON, open to any site (CORS) and cached for a day. Two calls:
GET /api/v1/trails: find routes. Near a point withlatandlon(nearest start first, withinwithinmiles, default 10, at most 50), or byq(part of a name, or a code),min_miles,max_miles,shape(circular or linear),tier(national, long or short),difficulty(easy, moderate or challenging) andlimit(at most 50).GET /api/v1/trails/<slug>: one route in full: its facts, whether it’s been checked against its publisher and which page, its sections with the nearest station or bus stop at each end, and links to its page, its history and a GPX file. The slug is the end of the route’s page address.
The full description, for tools and assistants, is /api/v1/openapi.json (OpenAPI 3.1).
Try it
- Circular walks of up to 8 miles within 8 miles of Keswick: https://adventureonfoot.co.uk/api/v1/trails?lat=54.6&lon=-3.13&within=8&shape=circular&max_miles=8
- Easy walks near Bath: https://adventureonfoot.co.uk/api/v1/trails?lat=51.38&lon=-2.36&difficulty=easy
- Long-distance routes with “Way” in the name: https://adventureonfoot.co.uk/api/v1/trails?tier=long&q=way&limit=50
- The Pennine Way in full, with its sections and the station or bus stop at each end: https://adventureonfoot.co.uk/api/v1/trails/pennine-way
The whole registry
For every route at once, use a registry release: a fixed, dated CSV each quarter with every code, its facts, our check and its OpenStreetMap relation ids, with a suggested citation. The registry also has a live CSV that changes daily.
Please
- Show the credit and link to the route’s page.
- Keep requests reasonable: results are cached, so asking the same question twice costs nothing, but please don’t crawl every route through the API when a release has them all.
- Tell people to check before they go: lines, lengths and facts can be out of date, and this is not a navigation service.
- Our codes are ours, not an official system. Say so if you show them.
Using it for something? We’d love to hear: ben@adventureonfoot.co.uk.