{
  "openapi": "3.0.1",
  "info": {
    "title": "AllTrails Scraper",
    "description": "Supercharge your outdoor adventure planning with our comprehensive AllTrails Scraper! Automate collection of detailed trail information, ratings, reviews, and photos from AllTrails.com. Perfect for hikers, outdoor enthusiasts, and travel planners who need accurate without manual work.",
    "version": "1.0",
    "x-build-id": "A1Duhf4Ru0fEM92gX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~alltrails-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-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/parseforge~alltrails-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-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/parseforge~alltrails-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-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",
        "required": [
          "searchType"
        ],
        "properties": {
          "startUrl": {
            "title": "🔗 Start URL",
            "type": "string",
            "description": "AllTrails URL to scrape. Supports: trail pages, park/area pages, city pages, or explore URLs with coordinates."
          },
          "maxItems": {
            "title": "📊 Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of trails to extract. 🆓 Free users: Limited to 10. ✅ Paid users: Optional, max 1,000,000"
          },
          "searchType": {
            "title": "🔍 Search By",
            "enum": [
              "region",
              "state",
              "city",
              "coordinates"
            ],
            "type": "string",
            "description": "How do you want to find trails? (Ignored if Start URLs provided)",
            "default": "region"
          },
          "region": {
            "title": "Region",
            "enum": [
              "yosemite",
              "yellowstone",
              "grand_canyon",
              "zion",
              "rocky_mountain",
              "glacier",
              "olympic",
              "acadia",
              "joshua_tree",
              "death_valley",
              "great_smoky_mountains",
              "shenandoah",
              "arches",
              "bryce_canyon",
              "canyonlands",
              "sequoia",
              "kings_canyon",
              "redwood",
              "crater_lake",
              "mount_rainier",
              "banff",
              "jasper",
              "swiss_alps",
              "dolomites",
              "washington_dc",
              "new_york_city",
              "los_angeles",
              "san_francisco",
              "seattle",
              "denver",
              "phoenix",
              "portland",
              "austin",
              "boston"
            ],
            "type": "string",
            "description": "Select a national park or predefined region"
          },
          "state": {
            "title": "US State",
            "enum": [
              "california",
              "colorado",
              "washington",
              "oregon",
              "utah",
              "arizona",
              "montana",
              "wyoming",
              "idaho",
              "nevada",
              "new_mexico",
              "texas",
              "florida",
              "new_york",
              "north_carolina",
              "tennessee",
              "virginia",
              "georgia",
              "maine",
              "vermont"
            ],
            "type": "string",
            "description": "Search all trails in a US state"
          },
          "city": {
            "title": "🏙️ City",
            "type": "string",
            "description": "Enter a city name (e.g., Denver, CO or Seattle, WA)"
          },
          "searchRadius": {
            "title": "📏 Search Radius",
            "minimum": 10,
            "maximum": 200,
            "type": "integer",
            "description": "How far from the city center to search (in miles)",
            "default": 50
          },
          "difficultyFilter": {
            "title": "⛰️ Difficulty",
            "type": "array",
            "description": "Only include trails with these difficulty levels",
            "items": {
              "type": "string",
              "enum": [
                "easy",
                "moderate",
                "hard",
                "expert"
              ],
              "enumTitles": [
                "Easy",
                "Moderate",
                "Hard",
                "Expert"
              ]
            },
            "default": []
          },
          "minRating": {
            "title": "⭐ Minimum Rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only trails rated this high or better (0-5)",
            "default": 0
          },
          "minReviews": {
            "title": "💬 Minimum Reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Only trails with at least this many reviews",
            "default": 0
          },
          "activityFilter": {
            "title": "🚶 Activity Type",
            "type": "array",
            "description": "Filter by activity type",
            "items": {
              "type": "string",
              "enum": [
                "hiking",
                "trail-running",
                "backpacking",
                "camping",
                "mountain-biking",
                "rock-climbing",
                "horseback-riding"
              ],
              "enumTitles": [
                "Hiking",
                "Trail Running",
                "Backpacking",
                "Camping",
                "Mountain Biking",
                "Rock Climbing",
                "Horseback Riding"
              ]
            },
            "default": []
          },
          "routeTypeFilter": {
            "title": "🗺️ Route Type",
            "type": "array",
            "description": "Filter by route type",
            "items": {
              "type": "string",
              "enum": [
                "loop",
                "out-and-back",
                "point-to-point"
              ],
              "enumTitles": [
                "Loop",
                "Out & Back",
                "Point to Point"
              ]
            },
            "default": []
          },
          "lengthMin": {
            "title": "📏 Min Length (meters)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum trail length in meters"
          },
          "lengthMax": {
            "title": "📏 Max Length (meters)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum trail length in meters"
          },
          "elevationGainMin": {
            "title": "⛰️ Min Elevation Gain (meters)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum elevation gain in meters"
          },
          "elevationGainMax": {
            "title": "⛰️ Max Elevation Gain (meters)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum elevation gain in meters"
          },
          "featuresFilter": {
            "title": "✨ Features",
            "type": "array",
            "description": "Filter by trail features",
            "items": {
              "type": "string",
              "enum": [
                "dogs-leash",
                "dogs-no-leash",
                "kid-friendly",
                "wheelchair-friendly",
                "stroller-friendly",
                "paved",
                "partially-paved",
                "views",
                "waterfall",
                "river",
                "lake",
                "beach",
                "hot-springs",
                "wild-flowers",
                "wildlife",
                "historic-site",
                "cave",
                "forest",
                "city-walk"
              ],
              "enumTitles": [
                "Dogs Allowed (On Leash)",
                "Dogs Allowed (Off Leash)",
                "Kid Friendly",
                "Wheelchair Friendly",
                "Stroller Friendly",
                "Paved",
                "Partially Paved",
                "Views",
                "Waterfall",
                "River",
                "Lake",
                "Beach",
                "Hot Springs",
                "Wild Flowers",
                "Wildlife",
                "Historic Site",
                "Cave",
                "Forest",
                "City Walk"
              ]
            },
            "default": []
          },
          "visitorUsageFilter": {
            "title": "👥 Visitor Traffic",
            "type": "array",
            "description": "Filter by how busy the trail typically is",
            "items": {
              "type": "string",
              "enum": [
                "light",
                "moderate",
                "heavy"
              ],
              "enumTitles": [
                "Light Traffic",
                "Moderate Traffic",
                "Heavy Traffic"
              ]
            },
            "default": []
          },
          "descriptionLanguage": {
            "title": "🌍 Description Language",
            "type": "string",
            "description": "Language code for trail descriptions (e.g., 'en' for English, 'es' for Spanish, 'fr' for French). Leave empty for English.",
            "default": "en"
          },
          "customTopLat": {
            "title": "North Latitude",
            "type": "number",
            "description": "Northern boundary (e.g., 38.2)"
          },
          "customTopLng": {
            "title": "West Longitude",
            "type": "number",
            "description": "Western boundary (e.g., -119.9). Negative for Western Hemisphere."
          },
          "customBottomLat": {
            "title": "South Latitude",
            "type": "number",
            "description": "Southern boundary (e.g., 37.5)"
          },
          "customBottomLng": {
            "title": "East Longitude",
            "type": "number",
            "description": "Eastern boundary (e.g., -119.2). Negative for Western Hemisphere."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}