{
  "openapi": "3.0.1",
  "info": {
    "title": "Hiking Trails Worldwide Scraper (OSM)",
    "description": "Scrape hiking trails worldwide from OpenStreetMap via Overpass API. Search by country, region, or bounding box. Get multilingual names, GPS routes, length, trail markers and Wikipedia links for hundreds of thousands of trails. No API key. Data under ODbL.",
    "version": "1.0",
    "x-build-id": "IfDst9IcAk6OYUjb2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/piquno~hiking-trails-worldwide-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-piquno-hiking-trails-worldwide-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/piquno~hiking-trails-worldwide-scraper/runs": {
      "post": {
        "operationId": "runs-sync-piquno-hiking-trails-worldwide-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/piquno~hiking-trails-worldwide-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-piquno-hiking-trails-worldwide-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "search_mode"
        ],
        "properties": {
          "search_mode": {
            "title": "Search mode",
            "enum": [
              "country",
              "iso_code",
              "region",
              "bbox"
            ],
            "type": "string",
            "description": "Search by country/region name, ISO country code, or a custom bounding box.",
            "default": "country"
          },
          "country": {
            "title": "Country name",
            "type": "string",
            "description": "Country name in English (only used if Search mode = 'country'). Examples: 'New Zealand', 'Japan', 'France', 'United States', 'Australia'.",
            "default": "New Zealand"
          },
          "iso_code": {
            "title": "ISO country code",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code (only used if Search mode = 'iso_code'). Examples: NZ, US, JP, FR, AU, GB, CA, DE, IT, ES.",
            "default": "NZ"
          },
          "region": {
            "title": "Region / state / city name",
            "type": "string",
            "description": "Region, state, prefecture, or city name (only used if Search mode = 'region'). Examples: 'Bavaria', 'California', 'Hokkaido', 'Patagonia'.",
            "default": "Bavaria"
          },
          "bbox_south": {
            "title": "Bounding box - South latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "integer",
            "description": "South (minimum) latitude. Used only if Search mode = 'bbox'. Example: 45 for southern France.",
            "default": 45
          },
          "bbox_west": {
            "title": "Bounding box - West longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "integer",
            "description": "West (minimum) longitude. Used only if Search mode = 'bbox'. Example: 6 for southern France.",
            "default": 6
          },
          "bbox_north": {
            "title": "Bounding box - North latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "integer",
            "description": "North (maximum) latitude. Used only if Search mode = 'bbox'. Example: 46.",
            "default": 46
          },
          "bbox_east": {
            "title": "Bounding box - East longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "integer",
            "description": "East (maximum) longitude. Used only if Search mode = 'bbox'. Example: 7.",
            "default": 7
          },
          "route_types": {
            "title": "Route types to include",
            "type": "array",
            "description": "Which OSM route types to include. 'hiking' = dedicated hiking trails. 'foot' = general walking/pedestrian routes (broader, includes urban walks).",
            "items": {
              "type": "string",
              "enum": [
                "hiking",
                "foot"
              ]
            },
            "default": [
              "hiking"
            ]
          },
          "min_network_level": {
            "title": "Minimum network classification",
            "enum": [
              "international",
              "national",
              "regional",
              "local"
            ],
            "type": "string",
            "description": "Filter by trail importance. 'international' = major cross-border trails only. 'national' = country-wide trails and up. 'regional' = regional trails and up. 'local' = include all (most results).",
            "default": "local"
          },
          "include_unnamed": {
            "title": "Include unnamed trails",
            "type": "boolean",
            "description": "If enabled, include hiking routes that don't have a name tag. Many local hiking paths lack names, so this can dramatically increase results but reduce data quality.",
            "default": false
          },
          "min_length_km": {
            "title": "Minimum trail length (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out trails shorter than this length in kilometres. Set to 0 to disable.",
            "default": 0
          },
          "max_length_km": {
            "title": "Maximum trail length (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out trails longer than this length in kilometres. Set to 0 to disable.",
            "default": 0
          },
          "include_geometry": {
            "title": "Include GPS geometry (waypoints)",
            "type": "boolean",
            "description": "If enabled, include the full list of GPS waypoints (lat/lon pairs) for each trail. Increases payload significantly for long trails (can be thousands of points). Disable for lightweight metadata-only output.",
            "default": false
          },
          "preferred_language": {
            "title": "Preferred language for trail names",
            "type": "string",
            "description": "ISO language code. If a trail has a name in this language (e.g. name:en), that becomes the primary 'name' field. Original local name is preserved in 'name_local'. Examples: en, fr, de, ja, es, it, zh.",
            "default": "en"
          },
          "max_results": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of trails to return.",
            "default": 100
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}