Hiking and cycling trails API

The marked routes of OpenStreetMap as ready GeoJSON lines: hiking trails, cycle routes, mountain bike trails and running routes, each with its name, network and tags. The same request gives national parks and nature reserves, ski pistes and lifts, and administrative boundaries.

curl "https://geo.runningcat.dev/v1/layers/route?bbox=6.8,45.85,6.95,46.0&kinds=hiking&limit=500" \
  -H "Authorization: Bearer YOUR_KEY"
Example request

Trails in a box

{
  "type": "FeatureCollection", "truncated": false,
  "features": [
    { "type": "Feature", "id": "R5329763",
      "properties": { "layer": "route", "kind": "hiking", "name": "Plan de l'Aiguille - Montenvers",
                      "tags": { "ref": "RW9", "network": "lwn", "osmc:symbol": "yellow:yellow:: RW9 :black", ... } },
      "geometry": { "type": "LineString", "coordinates": [[6.885086, 45.901489], ...] } },
    ...
  ]
}
Layers
route (marked routes), protected_area, piste, aerialway, boundary
Route kinds
bicycle, mtb, hiking, foot, running
Box
Up to 16 square degrees, up to 5,000 features (2,000 by default); truncated says when there were more
Ids
OpenStreetMap ids: R for a relation, W for a way

The tags keep what mappers recorded, such as the waymark symbol in osmc:symbol, the network level (iwn, nwn, rwn, lwn for hiking) and the route number, so an app can draw the trails the way they are signposted.

What your route follows

POST /v1/route/layers takes a GeoJSON route and lists the marked routes it follows and the parks and borders it passes, each with the kilometre stretches where it does. A ride planner can say "km 12 to 31 on EuroVelo 6", or warn that a stretch crosses a national park.

Your own query

For tags the layers do not cover, the Overpass endpoint returns route relations with their geometry; the examples include hiking routes in the Chamonix valley.

Price

A layer request counts as one request. The free plan gives 500 a day, also for commercial apps; Developer is $14.99 a month for 5,000 a day. Map data is refreshed every month.

Credits: map data © OpenStreetMap contributors, available under the Open Database License.

The free plan gives 500 requests a day, for commercial apps too. Create an account with Google or your email and make your keys right away.