OSM Overpass Hiking Trail Route Scraper avatar

OSM Overpass Hiking Trail Route Scraper

Pricing

Pay per event

Go to Apify Store
OSM Overpass Hiking Trail Route Scraper

OSM Overpass Hiking Trail Route Scraper

Query the Overpass API for OpenStreetMap hiking route relations by bounding box or region. Returns ODbL-licensed trail geometry: route names, distance, network level, way coordinates, and full OSM tags. The only license-clean trail corpus on Apify — safe for AI training and GIS use.

Pricing

Pay per event

Rating

0.0

(0)

Developer

BowTiedRaccoon

BowTiedRaccoon

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

Query the Overpass API for OpenStreetMap hiking route relations by bounding box or region name. Returns ODbL-licensed trail geometry, route metadata, and full OSM tags — the only license-clean trail corpus on Apify, safe for AI training and GIS use.


What it does

The actor sends Overpass QL queries against the public overpass-api.de endpoint (or a mirror of your choice) to retrieve relation elements with route=hiking or route=foot tags within the specified geographic area. For each relation it returns:

  • Route name, type, and network level (international / national / regional / local)
  • Operator and start/end node names
  • Distance in kilometres (from OSM distance or length tags)
  • OSMC waymark symbol
  • Bounding box coordinates
  • Pipe-separated member way IDs as a geometry proxy
  • Full OSM tag map as a JSON string
  • Wikidata / Wikipedia cross-references

All data is released by OpenStreetMap contributors under the Open Database Licence (ODbL). You are free to use it for AI training, GIS pipelines, or commercial products — attribution required.


Input

FieldTypeDefaultDescription
Max Itemsinteger100Maximum route relations to return across all queries
Bounding Boxesarray["35.5,136.5,36.2,137.5"]One or more south,west,north,east decimal-degree strings
Region Namesarray[]Place names resolved to bounding boxes via Nominatim. Used when Bounding Boxes is empty. Example: "Tyrol, Austria"
Route Typesarray["hiking","foot"]OSM route tag values to include
Network Filterarray[]Restrict to specific network levels: iwn (international), nwn (national), rwn (regional), lwn (local). Empty = all levels
Mirror EndpointstringAlternative Overpass API URL, e.g. https://overpass.kumi.systems/api/interpreter

Example inputs

Fetch all hiking routes in a Japanese alpine area:

{
"maxItems": 50,
"bboxList": ["35.5,136.5,36.2,137.5"],
"routeTypes": ["hiking", "foot"]
}

Fetch only international and national routes in the Swiss Alps:

{
"maxItems": 20,
"bboxList": ["46.0,7.0,47.0,8.5"],
"routeTypes": ["hiking"],
"networkFilter": ["iwn", "nwn"]
}

Resolve a region by name:

{
"maxItems": 30,
"regionNames": ["Tyrol, Austria"],
"routeTypes": ["hiking"]
}

Output

Each result is a flat object. Numeric fields (distance_km, bbox_*) are numbers; all others are strings. Missing fields are omitted.

FieldDescription
osm_idOSM relation numeric ID
osm_typerelation or way
route_nameHuman-readable name from the name tag
route_typehiking or foot
networkNetwork level: iwn, nwn, rwn, lwn, or empty
operatorOperator/maintainer of the route
distance_kmRoute distance in kilometres
osmc_symbolOSMC waymark symbol string
from_nodeStart location name
to_nodeEnd location name
geometryPipe-separated member way OSM IDs
bbox_south / bbox_west / bbox_north / bbox_eastElement bounding box
tagsFull OSM tag map as a JSON string
wikidataWikidata entity QID
wikipediaWikipedia article reference
source_bboxThe query bbox that returned this element

Example result

{
"osm_id": 12345678,
"osm_type": "relation",
"route_name": "Nakasendo Trail",
"route_type": "hiking",
"network": "nwn",
"distance_km": 42.5,
"from_node": "Magome",
"to_node": "Narai",
"bbox_south": 35.57,
"bbox_west": 137.49,
"bbox_north": 35.98,
"bbox_east": 137.88,
"tags": "{\"route\":\"hiking\",\"network\":\"nwn\",\"name\":\"Nakasendo Trail\"}",
"source_bbox": "35.5,136.5,36.2,137.5"
}

Rate limits and mirrors

The public overpass-api.de server enforces a concurrent-query limit. For bulk collection across many bounding boxes, use the Mirror Endpoint input to point at a less-loaded server:

  • https://overpass.kumi.systems/api/interpreter
  • https://maps.mail.ru/osm/tools/overpass/api/interpreter
  • https://overpass.openstreetmap.ru/api/interpreter

The actor inserts an 800 ms delay between successive bbox queries to respect server etiquette.


License

Route data is copyright OpenStreetMap contributors, available under the Open Database Licence. Attribution is required for any derived work.