{
  "openapi": "3.0.1",
  "info": {
    "title": "AllTrails Scraper",
    "description": "[💰 $9 / 1K] Extract trail data from AllTrails — ratings, difficulty, length, elevation, GPS, photos, and trail features. Search by national park, US state, or city, or paste any AllTrails URL. Filter by difficulty, rating, activity, route type, and 20 trail features.",
    "version": "1.0",
    "x-build-id": "Za0QPmoc0ZcJX5fK3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solidcode~alltrails-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solidcode-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/solidcode~alltrails-scraper/runs": {
      "post": {
        "operationId": "runs-sync-solidcode-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/solidcode~alltrails-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-solidcode-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": "Paste AllTrails URLs directly. Supports trail pages, national park / area pages, state pages, city pages, and explore/map URLs. Filters below are ignored for URLs — everything comes from the URL itself.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search By",
            "enum": [
              "park",
              "state",
              "city",
              "coordinates"
            ],
            "type": "string",
            "description": "How to find trails when you are not pasting URLs. Choose a famous national park, a US state, a city name, or a custom map area (coordinates)."
          },
          "park": {
            "title": "National Park",
            "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"
            ],
            "type": "string",
            "description": "A famous national park or destination to search. Used when Search By is set to National Park."
          },
          "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": "A US state to search all trails within. Used when Search By is set to US State."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "A city name to search trails near (e.g. 'Denver, CO' or 'Seattle'). Used when Search By is set to City."
          },
          "searchRadius": {
            "title": "Search Radius (miles)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How far from the city center to search, in miles. Only applies to City searches.",
            "default": 50
          },
          "boundingBox": {
            "title": "Custom Map Area (coordinates)",
            "type": "string",
            "description": "Search inside a map rectangle. Enter four comma-separated coordinates as 'south,west,north,east' (e.g. '37.7,-119.7,37.9,-119.4'). Only applies when Search By is set to Custom Map Area."
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of trails to return across all URLs and searches. Set to 0 for all trails in the area. Extremely dense regions (e.g. a major national park or a whole state) are sampled up to a very high limit rather than capped early. Tip: start with 10-50 to test, then increase.",
            "default": 100
          },
          "includePhotos": {
            "title": "Include Photo Galleries",
            "type": "boolean",
            "description": "Add a photo gallery to every trail. When on, each trail row includes a list of photo URLs (imageGallery) in addition to its main photo. This makes runs take a little longer because photos are fetched for each trail. Leave off if you only need the single main photo.",
            "default": false
          },
          "language": {
            "title": "Result Language",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "nl",
              "ja",
              "ko",
              "zh-CN"
            ],
            "type": "string",
            "description": "Language for trail names and place names where AllTrails provides translations.",
            "default": "en"
          },
          "difficulty": {
            "title": "Difficulty",
            "uniqueItems": true,
            "type": "array",
            "description": "Only include trails at these difficulty levels. Leave empty for all difficulties.",
            "items": {
              "type": "string",
              "enum": [
                "easy",
                "moderate",
                "hard",
                "extreme"
              ],
              "enumTitles": [
                "Easy",
                "Moderate",
                "Hard",
                "Extreme"
              ]
            },
            "default": []
          },
          "minRating": {
            "title": "Minimum Rating",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Only include trails with at least this average rating (0 to 5 stars). Leave at 'Any rating' for no minimum.",
            "default": "0"
          },
          "minReviews": {
            "title": "Minimum Reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Only include trails with at least this many reviews. Useful for filtering out obscure or unverified trails. This is applied after fetching results (AllTrails has no server-side review-count filter). Leave at 0 for no minimum.",
            "default": 0
          },
          "activities": {
            "title": "Activities",
            "uniqueItems": true,
            "type": "array",
            "description": "Only include trails suited to these activities. Leave empty for all activities.",
            "items": {
              "type": "string",
              "enum": [
                "hiking",
                "trail-running",
                "backpacking",
                "camping",
                "mountain-biking",
                "rock-climbing",
                "horseback-riding",
                "walking",
                "birding",
                "scenic-driving",
                "fishing",
                "snowshoeing"
              ],
              "enumTitles": [
                "Hiking",
                "Trail running",
                "Backpacking",
                "Camping",
                "Mountain biking",
                "Rock climbing",
                "Horseback riding",
                "Walking",
                "Bird watching",
                "Scenic driving",
                "Fishing",
                "Snowshoeing"
              ]
            },
            "default": []
          },
          "routeTypes": {
            "title": "Route Type",
            "uniqueItems": true,
            "type": "array",
            "description": "Only include trails with these route shapes. Leave empty for all route types.",
            "items": {
              "type": "string",
              "enum": [
                "loop",
                "out-and-back",
                "point-to-point"
              ],
              "enumTitles": [
                "Loop",
                "Out & back",
                "Point to point"
              ]
            },
            "default": []
          },
          "features": {
            "title": "Trail Features",
            "uniqueItems": true,
            "type": "array",
            "description": "Only include trails that have these features and amenities (e.g. waterfalls, views, dog-friendly). Leave empty for all trails.",
            "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",
                "wildflowers",
                "wildlife",
                "historic-site",
                "cave",
                "forest",
                "rails-trails",
                "city-walk"
              ],
              "enumTitles": [
                "Dogs on leash",
                "Dogs off leash",
                "Kid friendly",
                "Wheelchair accessible",
                "Stroller friendly",
                "Paved",
                "Partially paved",
                "Views",
                "Waterfall",
                "River",
                "Lake",
                "Beach",
                "Hot springs",
                "Wildflowers",
                "Wildlife",
                "Historic site",
                "Cave",
                "Forest",
                "Rail trail",
                "City walk"
              ]
            },
            "default": []
          },
          "trafficLevel": {
            "title": "Traffic Level",
            "uniqueItems": true,
            "type": "array",
            "description": "Only include trails with these expected visitor levels. Leave empty for all traffic levels.",
            "items": {
              "type": "string",
              "enum": [
                "light",
                "moderate",
                "heavy"
              ],
              "enumTitles": [
                "Light traffic",
                "Moderate traffic",
                "Heavy traffic"
              ]
            },
            "default": []
          },
          "minLengthMiles": {
            "title": "Minimum Length (miles)",
            "minimum": 0,
            "type": "number",
            "description": "Only include trails at least this long, in miles. Leave empty for no minimum."
          },
          "maxLengthMiles": {
            "title": "Maximum Length (miles)",
            "minimum": 0,
            "type": "number",
            "description": "Only include trails no longer than this, in miles. Leave empty for no maximum."
          },
          "minElevationGainFt": {
            "title": "Minimum Elevation Gain (feet)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include trails with at least this much elevation gain, in feet. Leave empty for no minimum."
          },
          "maxElevationGainFt": {
            "title": "Maximum Elevation Gain (feet)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include trails with no more than this much elevation gain, in feet. Leave empty for no maximum."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}