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

Scrape AllTrails.com trails from a trail link or a state, city, or park page. Each row has the name, place, difficulty, length, elevation, duration, rating, reviews, features, and the trail link. A location page returns the trails listed there. One trail is its own row. JSON or CSV out.

- **URL**: https://apify.com/memo23/alltrails-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Travel
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 trails

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## AllTrails Scraper

Get public AllTrails trails: name, place, difficulty, length, elevation, duration, rating, and the trail link. Paste one trail, or a state, city, or park page.

#### How it works

![How the AllTrails scraper works](https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-alltrails.png)

Paste a trail link, or a page such as California or a national park. You get one row per trail, ready to export as JSON or CSV.

#### ✨ Why use this scraper?

- Trail name, city, region, country, and the park it sits in
- Difficulty in words and as a number, plus the route type
- Length and elevation gain in meters, and the printed duration
- Rating, review count, photo count, and how many people marked it complete
- Activities and features, such as hiking, waterfalls, or dogs on leash
- Overview, description, parking note, and a link back to the trail

#### 🎯 Use cases

| Who | What they do with it |
| --- | --- |
| Trip planners | Build a short list of trails around a park |
| Content sites | Fill trail guides with length, difficulty, and rating |
| Outdoor apps | Offer a trail card next to a map pin |
| Researchers | Compare popularity and review volume across a region |

#### 📥 Supported inputs

| Input | Example | What you get |
| --- | --- | --- |
| Trail URL | `https://www.alltrails.com/trail/us/california/lands-end-trail` | That trail |
| State page | `https://www.alltrails.com/us/california` | The trails linked on that page |
| Park page | `https://www.alltrails.com/parks/us/california/yosemite-national-park` | The trails linked on that page |

A location page returns the trails printed on that page, up to `maxItems`. It does not walk every trail in the state. The row does not include a GPS track file or the day-by-day condition calendar. Saved routes behind an AllTrails account are out of scope.

#### 🔄 How it works

1. Paste trail links, or a state, city, or park link.
2. Set a maximum number of trails.
3. Run the actor.
4. Each trail is saved as its own row.
5. Export the dataset as JSON, CSV, or Excel.

#### ⚙️ Input parameters

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `startUrls` | string list | Lands End Trail | Trail links, or state, city, and park links. |
| `maxItems` | integer | 20 | Hard cap on trail rows. |
| `maxConcurrency` | integer | 3 | How many trail pages open at the same time. Lower it if runs slow down or fail. |

#### 📊 Output overview

One row is one trail. Length and elevation are meters. `difficulty` is the site's number (1 easy, 3 moderate, 5 hard, 7 strenuous) and `difficultyName` is the label on the page. `seasonStart` and `seasonEnd` are month numbers, 1 for January through 12 for December. `durationText` is empty when the page does not print a time.

#### 📦 Output sample

This row is from a California page, the Mist Trail in Yosemite.

```json
{
  "url": "https://www.alltrails.com/trail/us/california/vernal-and-nevada-falls-via-the-mist-trail",
  "name": "Vernal and Nevada Falls via Mist Trail",
  "trailId": 10026910,
  "city": "Yosemite Valley",
  "regionName": "California",
  "countryName": "United States",
  "latitude": 37.73282,
  "longitude": -119.55778,
  "difficulty": 5,
  "difficultyName": "Hard",
  "routeType": "Loop",
  "lengthMeters": 10944,
  "elevationGainMeters": 631,
  "durationMinutes": 248,
  "durationText": "4 h 8 min",
  "rating": 4.9,
  "reviewCount": 27894,
  "photoCount": 89440,
  "areaName": "Yosemite National Park",
  "activities": ["Hiking", "Trail running"],
  "features": ["No dogs", "Forests", "Rivers", "Waterfalls"]
}
```

#### 🗂 Key output fields

| Field | Meaning |
| --- | --- |
| `name`, `url`, `trailId` | Trail name, its public link, and the id on that link |
| `city`, `regionName`, `countryName` | Where the trail is |
| `latitude`, `longitude` | The point shown for the trail |
| `difficulty`, `difficultyName` | Number and the label, such as Hard |
| `routeType` | Loop, Out & Back, or Point to Point |
| `lengthMeters`, `elevationGainMeters` | Length and climbing, in meters |
| `durationText`, `durationMinutes` | Time as printed, and the same time in minutes |
| `rating`, `reviewCount` | Average score and how many reviews it comes from |
| `areaName`, `areaUrl` | Park or area, when the page names one |
| `activities`, `features` | What the page lists, such as hiking or waterfalls |
| `overview`, `description` | The short blurb and the longer write-up |
| `gettingThere`, `parking` | Directions and the parking note |
| `photoUrl` | One photo from the page |

#### ❓ FAQ

**Does a state page return every trail in that state?**
No. It returns the trail links printed on that page, and then stops at `maxItems`. Paste park or trail links when you want a specific set.

**Are length and elevation in miles?**
No. Both are meters. 10944 meters is the 10.9 km the Mist Trail page shows.

**Do I get the GPS line or live trail conditions?**
No. The row has the summary on the trail page: length, elevation, difficulty, rating, features, and the description. It does not include the track file or the condition calendar.

**Can I scrape saved lists from an account?**
No. This actor reads public trail and location pages only.

**Why is duration empty on some rows?**
The page did not print a time. Half Dome via the John Muir Trail came back with length and elevation, and an empty duration.

#### 💬 Support

Open an issue on the actor page and include the trail link plus the run ID: https://console.apify.com/actors/Dw1fye5CmceDnfWpX#/issues

#### 🛠 Additional services

Need a fixed list of parks on a schedule, or the same trails joined to weather? Say what the export should look like.

#### 🔎 Explore more scrapers

- [Rome2Rio Scraper](https://apify.com/memo23/rome2rio-scraper)
- [HotelTonight Scraper](https://apify.com/memo23/hoteltonight-scraper)
- [TripIt Scraper](https://apify.com/memo23/tripit-scraper)
- [Perk Scraper](https://apify.com/memo23/perk-scraper)

#### 🤖 For AI Agents & LLM Apps

Purpose: one public AllTrails trail per row, from a trail link or a state, city, or park page.

Minimal input:

```json
{ "startUrls": ["https://www.alltrails.com/us/california"], "maxItems": 5 }
```

Flat fields: `name`, `url`, `city`, `regionName`, `countryName`, `latitude`, `longitude`, `difficulty`, `difficultyName`, `routeType`, `lengthMeters`, `elevationGainMeters`, `durationText`, `durationMinutes`, `rating`, `reviewCount`, `areaName`, `activities`, `features`, `overview`.

A location page returns only the trails linked on that page. Length is meters. No GPS track and no condition calendar. No login.

***

### ⚠️ Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by AllTrails, LLC or any of its subsidiaries or affiliates. All trademarks mentioned are the property of their respective owners.

The scraper accesses only publicly available trail and location pages. No login, no saved lists, and no content behind an AllTrails account. Users are responsible for ensuring their use complies with AllTrails' Terms of Service, applicable data-protection law (GDPR, CCPA, and others), and any contractual obligations of their own organisation.

***

### SEO Keywords

AllTrails scraper, scrape AllTrails, AllTrails API, Apify AllTrails, AllTrails trails, hiking trail data, trail length and elevation, trail difficulty scraper, national park trails, Yosemite trails, trail rating and reviews, hiking guide data, outdoor content automation, trail features and activities, state park trail list, city trail scraper, loop and out-and-back trails, hiking trip planner data, trail description export, public trail pages

# Actor input Schema

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

AllTrails links. A trail URL such as https://www.alltrails.com/trail/us/california/lands-end-trail returns that trail. A state, city, or park URL returns the trail links printed on that page.

## `maxItems` (type: `integer`):

Hard cap on trail rows saved. Each trail is one row.

## `maxConcurrency` (type: `integer`):

How many trail pages to open at the same time. Lower it if runs slow down or fail.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.alltrails.com/trail/us/california/lands-end-trail"
  ],
  "maxItems": 20,
  "maxConcurrency": 3
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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/trail/us/california/lands-end-trail"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/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/trail/us/california/lands-end-trail"] }

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

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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/trail/us/california/lands-end-trail"
  ]
}' |
apify call memo23/alltrails-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,memo23/alltrails-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Dw1fye5CmceDnfWpX/builds/Ds8OJOR0NQvoAkAqx/openapi.json
