{
  "openapi": "3.0.1",
  "info": {
    "title": "AllTrails Scraper — Hiking, Biking & Running Trails",
    "description": "Scrapes hiking, biking and running trails from AllTrails by park, city, state, country, coordinates or keyword, with difficulty, length, elevation gain, rating, reviews, location and cover photo. Optionally adds full descriptions, recent reviews and surface types.",
    "version": "1.0",
    "x-build-id": "SMyAPNjqkbEj3FpzG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/confidential_gnat~alltrails-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-confidential_gnat-alltrails-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/confidential_gnat~alltrails-scraper/runs": {
      "post": {
        "operationId": "runs-sync-confidential_gnat-alltrails-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/confidential_gnat~alltrails-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-confidential_gnat-alltrails-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",
        "properties": {
          "startUrls": {
            "title": "AllTrails URLs",
            "type": "array",
            "description": "AllTrails pages to scrape trails from: a park (e.g. https://www.alltrails.com/parks/us/california/yosemite-national-park), a city, state or country page (e.g. https://www.alltrails.com/us/california/fremont) or a single trail page. Combine with the filters below.",
            "default": [
              {
                "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQuery": {
            "title": "Search keyword",
            "type": "string",
            "description": "Optional. Search trails by name or place, for example \"waterfall\" or \"Mount Rainier\". Can be combined with the coordinates below."
          },
          "latitude": {
            "title": "Latitude",
            "type": "number",
            "description": "Optional. Latitude of a point to search around, for example 37.5. Use together with Longitude."
          },
          "longitude": {
            "title": "Longitude",
            "type": "number",
            "description": "Optional. Longitude of a point to search around, for example -121.9."
          },
          "radiusKm": {
            "title": "Search radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How far around the coordinates to look.",
            "default": 25
          },
          "difficulty": {
            "title": "Difficulty",
            "type": "array",
            "description": "Only return trails with these difficulties. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "easy",
                "moderate",
                "hard"
              ],
              "enumTitles": [
                "Easy",
                "Moderate",
                "Hard"
              ]
            }
          },
          "routeTypes": {
            "title": "Route type",
            "type": "array",
            "description": "Only return trails with these route types. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "loop",
                "out_and_back",
                "point_to_point"
              ],
              "enumTitles": [
                "Loop",
                "Out & back",
                "Point to point"
              ]
            }
          },
          "activities": {
            "title": "Activities",
            "type": "array",
            "description": "Return trails suited to any of these activities. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "hiking",
                "walking",
                "trail-running",
                "running",
                "birding",
                "mountain-biking",
                "camping",
                "road-biking",
                "backpacking",
                "horseback-riding",
                "snowshoeing",
                "bike-touring",
                "fishing",
                "cross-country-skiing",
                "paddle-sports",
                "scenic-driving",
                "rock-climbing",
                "off-road-driving",
                "skiing"
              ],
              "enumTitles": [
                "Hiking",
                "Walking",
                "Trail Running",
                "Running",
                "Birding",
                "Mountain Biking",
                "Camping",
                "Road Biking",
                "Backpacking",
                "Horseback Riding",
                "Snowshoeing",
                "Bike Touring",
                "Fishing",
                "Cross Country Skiing",
                "Paddle Sports",
                "Scenic Driving",
                "Rock Climbing",
                "Off Road Driving",
                "Skiing"
              ]
            }
          },
          "features": {
            "title": "Required features",
            "type": "array",
            "description": "Return only trails that have ALL of these features, for example dogs on leash and waterfall.",
            "items": {
              "type": "string",
              "enum": [
                "views",
                "forest",
                "wildlife",
                "river",
                "wild-flowers",
                "dogs-leash",
                "dogs",
                "dogs-no",
                "kids",
                "lake",
                "partially-paved",
                "paved",
                "historic-site",
                "waterfall",
                "strollers",
                "city-walk",
                "beach",
                "ada",
                "hot-springs",
                "cave",
                "rails-trails",
                "pub-crawl"
              ],
              "enumTitles": [
                "Views",
                "Forest",
                "Wildlife",
                "River",
                "Wildflowers",
                "Dogs on leash",
                "Dogs allowed (off leash)",
                "No dogs",
                "Kid friendly",
                "Lake",
                "Partially Paved",
                "Paved",
                "Historic Site",
                "Waterfall",
                "Stroller friendly",
                "City Walk",
                "Beach",
                "Wheelchair friendly",
                "Hot Springs",
                "Cave",
                "Rails Trails",
                "Pub crawl"
              ]
            }
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only trails rated at least this high (0–5)."
          },
          "minReviews": {
            "title": "Minimum number of reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Only trails with at least this many reviews."
          },
          "minLengthKm": {
            "title": "Minimum length (km)",
            "minimum": 0,
            "type": "number",
            "description": "Only trails at least this long."
          },
          "maxLengthKm": {
            "title": "Maximum length (km)",
            "minimum": 0,
            "type": "number",
            "description": "Only trails no longer than this."
          },
          "minElevationGainM": {
            "title": "Minimum elevation gain (m)",
            "minimum": 0,
            "type": "integer",
            "description": "Only trails climbing at least this many metres."
          },
          "maxElevationGainM": {
            "title": "Maximum elevation gain (m)",
            "minimum": 0,
            "type": "integer",
            "description": "Only trails climbing no more than this many metres."
          },
          "maxItems": {
            "title": "Max trails per URL or search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of trails to return for each start URL and for the keyword/coordinates search (up to 1,000).",
            "default": 3
          },
          "includeExtraDetails": {
            "title": "Include extra details (slower, extra charge per trail)",
            "type": "boolean",
            "description": "Loads each trail's own page to add: the FULL trail description (the standard listing is cut at 500 characters), the 5 most recent reviews (author, date, rating, activity, text, conditions and parking notes), the AI summary of what trailgoers say, the surface-type breakdown (e.g. 53% natural, 5% gravel) and the top sights. Adds a per-trail charge and takes several seconds per trail. Off by default.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The scraper works without a proxy.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}