# AllTrails Scraper (`solidcode/alltrails-scraper`) Actor

\[💰 $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.

- **URL**: https://apify.com/solidcode/alltrails-scraper.md
- **Developed by:** [SolidCode](https://apify.com/solidcode) (community)
- **Categories:** Travel, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## AllTrails Scraper

Pull structured trail data from AllTrails at scale — difficulty, length, elevation gain, route type, GPS coordinates, ratings, review counts, activities, and location for every trail in a park, city, state, or map area you choose. Search by name or paste any AllTrails link, and get back clean, analysis-ready rows in both imperial and metric units. Built for outdoor-gear marketplaces, travel and trip-planning app builders, hiking-content publishers, and tourism researchers who need a reliable trail dataset without collecting it by hand.

### Why This Scraper?

- **Four difficulty tiers, decoded for you** — every trail is labeled `easy`, `moderate`, `hard`, or `extreme` instead of AllTrails' raw 1–7 internal codes, so you can filter and sort on day one.
- **Dual units on every metric** — length comes back in both **miles and kilometers**, elevation gain in both **feet and meters**. No conversions, no rounding errors in your pipeline.
- **Five ways to target trails** — paste an AllTrails URL, or search by **24 famous national parks**, **20 US states**, any **city + radius**, or a precise **GPS bounding box** to sweep a custom map area.
- **Three route shapes you can filter on** — `loop`, `out-and-back`, and `point-to-point`, so trip planners can match trails to the exact outing a user wants.
- **20 trail-feature filters** — surface only trails with waterfalls, lake or river views, wildflowers, wildlife, forests, caves, historic sites, dog-friendly access, kid-friendly or wheelchair-accessible paths, and more.
- **12 activity filters** — hiking, trail running, backpacking, mountain biking, rock climbing, horseback riding, snowshoeing, bird watching, and beyond.
- **Quality gates built in** — set a minimum star rating (1–5) and a minimum review count to skip obscure, unverified trails and keep only well-established ones.
- **Worldwide coverage by coordinates** — the bounding-box search reaches any region on Earth, from the Swiss Alps and Dolomites to Banff, not just the US park presets.
- **Exact GPS for every trail** — latitude and longitude on every row, ready to drop onto a map or join against your own location data.
- **Optional full photo galleries** — every trail ships with a main photo URL, and one toggle adds the complete `imageGallery` list of trail images for visual content, listings, and gallery widgets.

### Use Cases

**Outdoor & Travel Apps**
- Power a hike-finder or trip-planning feature with current trail metrics
- Match trails to user fitness levels using the four difficulty tiers
- Surface nearby trails from a user's GPS location and a search radius
- Suggest loop vs. out-and-back routes based on the time a user has

**Market & Competitive Research**
- Benchmark trail density and difficulty mix across parks and states
- Compare average ratings and review volume between regions
- Track which activities dominate a destination's trail network
- Size the addressable market for outdoor products by geography

**Tourism & Destination Marketing**
- Build curated "best trails" guides for a city or national park
- Identify high-rated, high-traffic trails worth featuring in campaigns
- Map trail offerings around a resort, hotel, or visitor center
- Quantify a destination's hiking appeal with hard numbers

**Content & Media**
- Generate data-backed trail roundups and listicles at scale
- Feed difficulty, length, and elevation into automated trail pages
- Keep editorial trail databases fresh with up-to-date ratings
- Compare trails on consistent, structured fields readers can sort

**Lead Generation & Partnerships**
- Find the busiest trails near a retail location for sponsorship targeting
- Prioritize outreach by region using review counts as demand signals
- Map dog-friendly or family-friendly trail clusters for niche brands

### Getting Started

#### Search a National Park

The simplest way to start — pick a park and a result cap:

```json
{
    "searchType": "park",
    "park": "yosemite",
    "maxResults": 50
}
````

#### Search a City with Filters

Find well-rated, family-friendly day hikes near a city:

```json
{
    "searchType": "city",
    "city": "Denver, CO",
    "searchRadius": 40,
    "difficulty": ["easy", "moderate"],
    "features": ["kid-friendly", "views"],
    "minRating": "4",
    "maxResults": 200
}
```

#### Advanced — Bounding Box with Full Filtering

Sweep a precise map area for long, high-elevation loop trails with waterfalls:

```json
{
    "searchType": "coordinates",
    "boundingBox": "37.7,-119.7,37.9,-119.4",
    "routeTypes": ["loop"],
    "features": ["waterfall"],
    "activities": ["hiking", "backpacking"],
    "minLengthMiles": 8,
    "maxLengthMiles": 20,
    "minElevationGainFt": 2000,
    "minReviews": 100,
    "maxResults": 0
}
```

### Input Reference

You only need **one** search target — either `startUrls` or one of the `searchType` options. Filters apply to searches only and are ignored for pasted URLs.

#### Search Targets

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `startUrls` | array | — | Paste AllTrails URLs (trail, park/area, state, city, or explore/map pages). Filters are ignored — everything comes from the URL. |
| `searchType` | select | `park` | How to find trails: `park`, `state`, `city`, or `coordinates`. |
| `park` | select | `yosemite` | One of 24 famous parks/destinations (Yosemite, Yellowstone, Zion, Banff, Swiss Alps, Dolomites, and more). Used when Search By is National Park. |
| `state` | select | `california` | One of 20 US states. Used when Search By is US State. |
| `city` | string | — | City name to search near (e.g. `Denver, CO`). Used when Search By is City. |
| `searchRadius` | integer | `50` | Miles from the city center to search (1–200). City searches only. |
| `boundingBox` | string | — | Map rectangle as `south,west,north,east` (e.g. `37.7,-119.7,37.9,-119.4`). Used when Search By is Custom Map Area. |

#### Filters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `difficulty` | array | all | Keep only `easy`, `moderate`, `hard`, and/or `extreme` trails. |
| `activities` | array | all | Keep only trails suited to chosen activities (hiking, trail running, backpacking, mountain biking, and 8 more). |
| `routeTypes` | array | all | Keep only `loop`, `out-and-back`, and/or `point-to-point` routes. |
| `features` | array | all | Keep only trails with chosen features (waterfall, views, lake, river, dog-friendly, kid-friendly, and 14 more). |
| `trafficLevel` | array | all | Keep only trails with chosen visitor levels: light, moderate, and/or heavy. |
| `minRating` | select | `Any rating` | Minimum average rating: `1+` through `5` stars. |
| `minReviews` | integer | `0` | Minimum number of reviews — filters out obscure or unverified trails. |
| `minLengthMiles` | number | — | Only trails at least this long, in miles. |
| `maxLengthMiles` | number | — | Only trails no longer than this, in miles. |
| `minElevationGainFt` | integer | — | Only trails with at least this much elevation gain, in feet. |
| `maxElevationGainFt` | integer | — | Only trails with no more than this much elevation gain, in feet. |

#### Output Control

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `maxResults` | integer | `100` | Maximum trails to return across all searches. Set to `0` for every trail in the area (very dense regions are sampled up to a high limit). |
| `includePhotos` | boolean | `false` | Add a `imageGallery` list of photo URLs to every trail. Adds a little time per trail. Off by default — every row still includes the single main `imageUrl`. |
| `language` | select | `English` | Language for trail names where AllTrails provides translations (English, Spanish, French, German, Italian, Portuguese, Dutch, Japanese, Korean, Chinese). |

### Output

Each trail is returned as one flat row:

```json
{
    "id": "10023041",
    "name": "Mist Trail to Vernal and Nevada Falls",
    "url": "https://www.alltrails.com/trail/us/california/mist-trail",
    "rating": 4.8,
    "reviewCount": 12480,
    "difficulty": "hard",
    "lengthMiles": 5.4,
    "lengthKm": 8.69,
    "elevationGainFt": 2152,
    "elevationGainM": 656,
    "routeType": "out-and-back",
    "area": "Yosemite National Park",
    "city": "Yosemite Valley",
    "state": "California",
    "country": "United States",
    "latitude": 37.7281,
    "longitude": -119.5586,
    "activities": ["hiking", "backpacking"],
    "imageUrl": "https://www.alltrails.com/api/alltrails/trails/10023041/profile_photo",
    "imageGallery": [
        "https://images.alltrails.com/eyJidWNrZXQiOiJhc3NldHMuYWxsdHJhaWxzLmNvbSIsImtleSI6InVwbG9hZHMvcGhvdG8vaW1hZ2UvMTA0Nzc5MzgxLzJhYWYzYzZmZDQ3YmVhY2MyZDI4ZGI4OTAxNjNjMGU0LmpwZyJ9"
    ],
    "popularity": 98.4,
    "isClosed": false,
    "estimatedDurationMinutes": 222,
    "scrapedAt": "2026-06-19T14:30:00Z"
}
```

#### Core Fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | AllTrails trail identifier (stable across runs). |
| `name` | string | Trail name. |
| `url` | string | Full AllTrails trail page URL. |
| `routeType` | string | Route shape: `loop`, `out-and-back`, or `point-to-point`. |
| `difficulty` | string | Difficulty tier: `easy`, `moderate`, `hard`, or `extreme`. |
| `activities` | array | Activities the trail is suited to (e.g. `hiking`, `mountain-biking`). |
| `isClosed` | boolean | Whether the trail is currently marked closed. |
| `scrapedAt` | string | ISO 8601 timestamp of when the row was collected. |

#### Metrics

| Field | Type | Description |
|-------|------|-------------|
| `lengthMiles` | number | Trail length in miles. |
| `lengthKm` | number | Trail length in kilometers. |
| `elevationGainFt` | integer | Total elevation gain in feet. |
| `elevationGainM` | integer | Total elevation gain in meters. |
| `estimatedDurationMinutes` | integer | Estimated time to complete, in minutes. |
| `popularity` | number | AllTrails popularity score for the trail. |

#### Ratings

| Field | Type | Description |
|-------|------|-------------|
| `rating` | number | Average star rating (0–5). |
| `reviewCount` | integer | Total number of reviews. |

#### Location

| Field | Type | Description |
|-------|------|-------------|
| `area` | string | Park or area the trail belongs to. |
| `city` | string | Nearest city. |
| `state` | string | State or province. |
| `country` | string | Country. |
| `latitude` | number | Trailhead latitude. |
| `longitude` | number | Trailhead longitude. |

#### Photos

| Field | Type | Description |
|-------|------|-------------|
| `imageUrl` | string | Primary trail photo URL. Always included. |
| `imageGallery` | array | Full list of trail photo URLs. Only present when **Include Photo Galleries** is turned on. |

### Tips for Best Results

- **Start small to dial in filters.** Set `maxResults` to 10–50 on your first run, confirm the trails match what you expect, then raise the cap or set it to `0` for the full region.
- **Use a bounding box to sweep a dense park exhaustively.** A tight `south,west,north,east` box around a busy national park returns far more complete coverage than a single park preset, with no overlap or duplicates.
- **Raise `minReviews` to surface only established trails.** A floor of 100–500 reviews filters out obscure, unverified paths and leaves the well-trodden trails travelers actually search for.
- **Combine `minRating` with `trafficLevel` for editorial picks.** `minRating: "4"` plus `heavy` traffic reliably isolates the crowd-favorite, must-feature trails in a destination.
- **Widen `searchRadius` for rural areas.** Trails cluster far from town centers — a 40–80 mile radius captures the real hiking options around smaller cities.
- **Filter by `routeTypes` for trip planning.** `loop` trails suit a single outing where you don't want to backtrack; `out-and-back` lets hikers turn around early.
- **Leave filters empty for a full census.** With no filters and `maxResults: 0`, you get every trail in the target area — ideal for building a complete regional dataset. Across most parks, cities, and states this is exhaustive; extremely dense regions are sampled up to a very high limit rather than capped early.
- **Turn on Include Photo Galleries when you need every image.** Each row already carries a main `imageUrl`; switch the toggle on to also get the full `imageGallery` list per trail. It adds a little time per trail, so leave it off when the main photo is enough.

### Pricing

**From $9 per 1,000 results** — a simple, predictable rate for clean, structured trail data. No compute or time-based charges — you pay per result, plus a small fixed per-run start fee. Bronze, Silver, and Gold subscribers pay progressively less; the table below shows total cost at each discount tier.

| Results | No discount | Bronze | Silver | Gold |
|---------|-------------|--------|--------|------|
| 100 | $1.08 | $1.02 | $0.96 | $0.90 |
| 1,000 | $10.80 | $10.20 | $9.60 | $9.00 |
| 10,000 | $108 | $102 | $96 | $90 |
| 100,000 | $1,080 | $1,020 | $960 | $900 |

A "result" is one trail row pushed to your dataset. Standard Apify platform fees apply on top.

### Integrations

Export data in JSON, CSV, Excel, XML, or RSS. Connect to 1,500+ apps via:

- **Zapier** / **Make** / **n8n** — Workflow automation
- **Google Sheets** — Direct spreadsheet export
- **Slack** / **Email** — Notifications on new results
- **Webhooks** — Trigger custom APIs on run completion
- **Apify API** — Full programmatic access

### Legal & Ethical Use

This actor collects publicly available trail information for legitimate research, analysis, and product use. You are responsible for using the data in compliance with AllTrails' terms of service and all applicable laws. Do not use the data to infringe intellectual property rights, and review the source platform's terms before large-scale or commercial use.

# Actor input Schema

## `startUrls` (type: `array`):

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.

## `searchType` (type: `string`):

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` (type: `string`):

A famous national park or destination to search. Used when Search By is set to National Park.

## `state` (type: `string`):

A US state to search all trails within. Used when Search By is set to US State.

## `city` (type: `string`):

A city name to search trails near (e.g. 'Denver, CO' or 'Seattle'). Used when Search By is set to City.

## `searchRadius` (type: `integer`):

How far from the city center to search, in miles. Only applies to City searches.

## `boundingBox` (type: `string`):

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` (type: `integer`):

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.

## `includePhotos` (type: `boolean`):

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.

## `language` (type: `string`):

Language for trail names and place names where AllTrails provides translations.

## `difficulty` (type: `array`):

Only include trails at these difficulty levels. Leave empty for all difficulties.

## `minRating` (type: `string`):

Only include trails with at least this average rating (0 to 5 stars). Leave at 'Any rating' for no minimum.

## `minReviews` (type: `integer`):

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.

## `activities` (type: `array`):

Only include trails suited to these activities. Leave empty for all activities.

## `routeTypes` (type: `array`):

Only include trails with these route shapes. Leave empty for all route types.

## `features` (type: `array`):

Only include trails that have these features and amenities (e.g. waterfalls, views, dog-friendly). Leave empty for all trails.

## `trafficLevel` (type: `array`):

Only include trails with these expected visitor levels. Leave empty for all traffic levels.

## `minLengthMiles` (type: `number`):

Only include trails at least this long, in miles. Leave empty for no minimum.

## `maxLengthMiles` (type: `number`):

Only include trails no longer than this, in miles. Leave empty for no maximum.

## `minElevationGainFt` (type: `integer`):

Only include trails with at least this much elevation gain, in feet. Leave empty for no minimum.

## `maxElevationGainFt` (type: `integer`):

Only include trails with no more than this much elevation gain, in feet. Leave empty for no maximum.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.alltrails.com/parks/us/california/yosemite-national-park"
  ],
  "searchType": "park",
  "park": "yosemite",
  "state": "california",
  "searchRadius": 50,
  "maxResults": 100,
  "includePhotos": false,
  "language": "en",
  "difficulty": [],
  "minRating": "0",
  "minReviews": 0,
  "activities": [],
  "routeTypes": [],
  "features": [],
  "trafficLevel": []
}
```

# Actor output Schema

## `overview` (type: `string`):

Table of scraped trails with key fields.

## `location` (type: `string`):

Table of trail location, GPS, length, elevation, and route type.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        "https://www.alltrails.com/parks/us/california/yosemite-national-park"
    ],
    "searchType": "park",
    "park": "yosemite",
    "state": "california",
    "city": "",
    "searchRadius": 50,
    "boundingBox": "",
    "maxResults": 100,
    "language": "en",
    "difficulty": [],
    "minRating": "0",
    "minReviews": 0,
    "activities": [],
    "routeTypes": [],
    "features": [],
    "trafficLevel": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidcode/alltrails-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": ["https://www.alltrails.com/parks/us/california/yosemite-national-park"],
    "searchType": "park",
    "park": "yosemite",
    "state": "california",
    "city": "",
    "searchRadius": 50,
    "boundingBox": "",
    "maxResults": 100,
    "language": "en",
    "difficulty": [],
    "minRating": "0",
    "minReviews": 0,
    "activities": [],
    "routeTypes": [],
    "features": [],
    "trafficLevel": [],
}

# Run the Actor and wait for it to finish
run = client.actor("solidcode/alltrails-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    "https://www.alltrails.com/parks/us/california/yosemite-national-park"
  ],
  "searchType": "park",
  "park": "yosemite",
  "state": "california",
  "city": "",
  "searchRadius": 50,
  "boundingBox": "",
  "maxResults": 100,
  "language": "en",
  "difficulty": [],
  "minRating": "0",
  "minReviews": 0,
  "activities": [],
  "routeTypes": [],
  "features": [],
  "trafficLevel": []
}' |
apify call solidcode/alltrails-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=solidcode/alltrails-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
