# AllTrails Scraper — Hiking, Biking & Running Trails (`confidential_gnat/alltrails-scraper`) Actor

Scrapes hiking, biking and running trails from AllTrails by park, city, state, country, coordinates or keyword, with difficulty, length, elevation gain, rating, reviews, location and cover photo. Optionally adds full descriptions, recent reviews and surface types.

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

## Pricing

from $0.70 / 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/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 — Hiking, Biking & Running Trail Data by Park, City or Coordinates

**Scrape trail data from AllTrails (alltrails.com)** for any national park, city, state, country, map point or keyword. Each trail comes back with its **difficulty, length, elevation gain, rating, review count, location, activities, features and cover photo**, exported as **JSON, CSV or Excel** and callable as an **API**. Paste a park or city URL, press Start. Switch on **extra details** to also get the full description, recent reviews and surface types.

![AllTrails Scraper](https://i.postimg.cc/d3BPX6tJ/featureimage.png)

**Target website:** [alltrails.com](https://www.alltrails.com)

### ✨ Features of this AllTrails trail scraper

- **Trail data extraction** — about 35 fields per trail, including difficulty, length (km and miles), elevation gain, route type, rating and popularity
- **Search by park, city, state or country** — paste any AllTrails park, city, state or country page
- **Search by coordinates or keyword** — find trails within a radius of a map point, or by name, for example "waterfall"
- **Powerful filters** — difficulty, route type, activities, required features (dogs on leash, waterfall, kid friendly…), minimum rating and reviews, length and elevation gain
- **Single trail lookup** — paste a trail URL to get just that trail
- **Cover photo URL** — a full-size image link for every trail
- **Optional extra details** — full description, recent reviews, AI review summary, surface types and top sights (see below)
- **No browser or proxy needed** — the standard scrape is fast and cheap

### 🚀 How to scrape AllTrails trails in 5 steps

1. [Sign up](https://apify.com/sign-up) for a free Apify account — includes **$5 monthly credit**.
2. Open the actor page and click **Try for free**.
3. Add an AllTrails park, city, state or trail URL, a keyword, or coordinates, and set any filters.
4. Click **Start** and wait for the run to complete.
5. Download results from the **Output** tab in JSON, CSV, or Excel format.

You can also run this actor via the [Apify API](https://docs.apify.com/api/v2) or integrate it directly into your workflows using [Zapier](https://zapier.com/apps/apify), [Make](https://www.make.com/), or [n8n](https://n8n.io/).

### 💰 Pricing

This actor uses **pay-per-event** billing.

- **Trail** — one charge for each trail saved to the dataset.
- **Trail extra details** — one extra charge for each trail whose extra details were added. It is only charged when you turn on **Include extra details** and the details were actually returned.
- New Apify accounts include **$5 of free monthly credit**.
- Leaving extra details off keeps runs fastest and cheapest.

### 🔧 Input configuration

![AllTrails Scraper input](https://i.postimg.cc/Lsyj2YN4/image.png)

| Field                                                     | Type    | Required | Default                | Description                                                                     |
| --------------------------------------------------------- | ------- | -------- | ---------------------- | ------------------------------------------------------------------------------- |
| AllTrails URLs (`startUrls`)                              | array   | —        | Yosemite National Park | A park, city, state, country or single trail page.                              |
| Search keyword (`searchQuery`)                            | string  | —        | —                      | Search trails by name or place.                                                 |
| Latitude / Longitude (`latitude`, `longitude`)            | number  | —        | —                      | Search around a map point.                                                      |
| Search radius (`radiusKm`)                                | integer | —        | 25                     | Radius around the coordinates, 1–500 km.                                        |
| Difficulty (`difficulty`)                                 | array   | —        | all                    | `easy`, `moderate`, `hard`.                                                     |
| Route type (`routeTypes`)                                 | array   | —        | all                    | `loop`, `out_and_back`, `point_to_point`.                                       |
| Activities (`activities`)                                 | array   | —        | all                    | Trails suited to any selected activity, for example hiking or mountain biking.  |
| Required features (`features`)                            | array   | —        | none                   | Trails with **all** selected features, for example dogs on leash and waterfall. |
| Min rating / reviews (`minRating`, `minReviews`)          | number  | —        | —                      | Quality filters.                                                                |
| Length (`minLengthKm`, `maxLengthKm`)                     | number  | —        | —                      | Length range in km.                                                             |
| Elevation gain (`minElevationGainM`, `maxElevationGainM`) | integer | —        | —                      | Elevation gain range in metres.                                                 |
| Max trails per URL or search (`maxItems`)                 | integer | —        | 5                      | Up to 1,000 per start URL and for the keyword/coordinates search.               |
| Include extra details (`includeExtraDetails`)             | boolean | —        | off                    | Adds the extra data listed below.                                               |
| Proxy configuration (`proxyConfiguration`)                | object  | —        | no proxy               | Optional.                                                                       |

**Supported URL types:**

- Parks: `https://www.alltrails.com/parks/us/california/yosemite-national-park`
- Cities, states and countries: `https://www.alltrails.com/us/california/fremont`, `https://www.alltrails.com/us/utah`, `https://www.alltrails.com/us`
- Single trails: `https://www.alltrails.com/trail/us/california/mission-peak-via-peak-meadow-trail`

#### What does "Include extra details" add?

Turn it on to load each trail's own page and add these fields. It is **one switch** and it adds all of them:

| Extra field     | What you get                                                                                                                        |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `description`   | The **full** trail description. Without extra details it is the standard listing text, which is cut at 500 characters.              |
| `reviews`       | The **5 most recent reviews**: author, date, star rating, activity, review text, tags, and conditions / parking / difficulty notes. |
| `reviewSummary` | The AI-written summary of what trailgoers say (highlights, challenges, tips).                                                       |
| `surfaceTypes`  | The surface breakdown, for example 53% natural, 42% unknown, 5% gravel, with miles.                                                 |
| `topSights`     | The top sights and points of interest on the trail, with type and link.                                                             |

Extra details are slower (several seconds per trail) and add a per-trail charge, so they are off by default. If extra details are temporarily unavailable, the run still returns the standard trail data and logs a warning.

### 📦 AllTrails scraper output data

The output is a dataset with one record per trail. Standard fields: `trailId`, `name`, `url`, `slug`, `description`, `difficulty`, `difficultyScore`, `routeType`, `lengthKm`, `lengthMiles`, `elevationGainM`, `elevationGainFt`, `highestPointM`, `estimatedTime`, `durationMinutes`, `avgRating`, `reviewCount`, `textReviewCount`, `photoCount`, `completedCount`, `popularity`, `visitorUsage`, `activities`, `features`, `collections`, `latitude`, `longitude`, `areaName`, `areaUrl`, `city`, `state`, `country`, `isClosed`, `isPrivateProperty` and `coverPhotoUrl`. With extra details on, `reviewSummary`, `reviews`, `surfaceTypes` and `topSights` are added and `description` becomes the full text. The dataset has 1 view, **Overview**, a compact table of trail, difficulty, length, elevation gain, rating, reviews, city, state and URL.

Example **Overview** table (Yosemite National Park, 5 trails):

| Trail | Difficulty | Length (km) | Elev. gain (m) | Rating | Reviews | City | State |
|---|---|---|---|---|---|---|---|
| [Vernal and Nevada Falls via Mist Trail](https://www.alltrails.com/trail/us/california/vernal-and-nevada-falls-via-the-mist-trail) | hard | 10.94 | 631 | 4.9 | 27,332 | Yosemite Valley | California |
| [Upper Yosemite Falls Trail](https://www.alltrails.com/trail/us/california/upper-yosemite-falls-trail) | hard | 11.27 | 966 | 4.8 | 20,951 | Yosemite Valley | California |
| [Half Dome via the John Muir Trail (JMT)](https://www.alltrails.com/trail/us/california/half-dome-via-the-john-muir-trail-jmt) | strenuous | 27.36 | 1555 | 4.9 | 18,700 | Yosemite Valley | California |
| [Vernal Falls](https://www.alltrails.com/trail/us/california/vernal-falls) | hard | 5.47 | 340 | 4.8 | 15,497 | Yosemite Valley | California |
| [Lower Yosemite Falls Trail](https://www.alltrails.com/trail/us/california/lower-yosemite-falls-trail) | easy | 1.93 | 18 | 4.7 | 22,290 | Yosemite Valley | California |

**Sample output** (with extra details on, trimmed):

```json
{
    "trailId": 10261073,
    "name": "Mission Peak from Ohlone College",
    "url": "https://www.alltrails.com/trail/us/california/mission-peak-from-ohlone-college",
    "slug": "trail/us/california/mission-peak-from-ohlone-college",
    "description": "Mission Peak gets throngs of hikers but only savvy trekkers take this route to the summit -- an eight-mile out-and-back that stretches out the 2,000-foot ascent to the summit (the most-popular route ascends a similar height in a 5…",
    "difficulty": "hard",
    "difficultyScore": 5,
    "routeType": "out_and_back",
    "lengthKm": 13.2,
    "lengthMiles": 8.2,
    "elevationGainM": 671,
    "elevationGainFt": 2201,
    "highestPointM": 767,
    "estimatedTime": {
        "value": "5–5.5",
        "unit": "hr"
    },
    "durationMinutes": 280,
    "avgRating": 4.7,
    "reviewCount": 12822,
    "textReviewCount": 1415,
    "photoCount": 21959,
    "completedCount": 19368,
    "popularity": 99.95,
    "visitorUsage": 4,
    "activities": ["camping", "hiking", "trail-running", "backpacking"],
    "features": ["dogs", "lake", "views", "wild-flowers", "wildlife"],
    "collections": ["trending", "views", "wildflowers"],
    "latitude": 37.52788,
    "longitude": -121.91307,
    "areaName": "Mission Peak Regional Preserve",
    "areaUrl": "https://www.alltrails.com/parks/us/california/mission-peak-regional-preserve",
    "city": "Fremont",
    "state": "California",
    "country": "United States",
    "isClosed": false,
    "isPrivateProperty": false,
    "coverPhotoUrl": "https://images.alltrails.com/eyJidWNrZXQiOiJhc3NldHMuYWxsdHJ…",
    "reviewSummary": "Stunning views and a rewarding summit are highlights. Reviewers note steep inclines and limited shade as challenges. Starting early and bringing plent…",
    "reviews": [
        {
            "author": "Jonah Pirnejad",
            "authorUrl": "https://www.alltrails.com/members/jonah-pirnejad",
            "rating": 4,
            "date": "Mar 31, 2026",
            "activity": "Walking",
            "text": "Fairly easy trail little windy at the top lots of cows…",
            "tags": ["Good conditions", "Not crowded"],
            "attributes": {
                "Parking": "Paid, Large lot"
            }
        }
    ],
    "surfaceTypes": [
        {
            "type": "Unknown",
            "percent": 48,
            "miles": 4
        },
        {
            "type": "Natural",
            "percent": 25,
            "miles": 2.1
        },
        {
            "type": "Gravel",
            "percent": 20,
            "miles": 1.6
        },
        {
            "type": "Paved",
            "percent": 7,
            "miles": 0.5
        }
    ],
    "topSights": [
        {
            "name": "Mission Peak",
            "type": "Peak",
            "url": "https://www.alltrails.com/poi/us/california/mission-peak"
        },
        {
            "name": "Mission Reservoir",
            "type": "Reservoir",
            "url": "https://www.alltrails.com/poi/us/california/fremont/mission-reservoir"
        }
    ]
}
```

### 🐍 How to scrape AllTrails with Python, JavaScript or the API

Run the actor programmatically with the official Apify clients. Replace `<YOUR_API_TOKEN>` with the token from your [Apify Console](https://console.apify.com/account/integrations).

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run = client.actor("<username>/alltrails-scraper").call(run_input={
    "startUrls": [{"url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"}],
    "difficulty": ["hard"],
    "minRating": 4.5,
    "maxItems": 20,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["name"], item["lengthKm"], item["avgRating"])
```

**JavaScript** (`npm install apify-client`):

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

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });

const run = await client.actor('<username>/alltrails-scraper').call({
    startUrls: [{ url: 'https://www.alltrails.com/parks/us/california/yosemite-national-park' }],
    difficulty: ['hard'],
    minRating: 4.5,
    maxItems: 20,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**cURL** — start a run and wait for the dataset:

```bash
curl -X POST "https://api.apify.com/v2/acts/<username>~alltrails-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": [{"url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"}], "maxItems": 20}'
```

### 💡 What you can use AllTrails trail data for

- Building hiking and outdoor recommendation apps with structured difficulty, length and elevation data
- Planning trips and comparing the best-rated trails in a park, city or region
- Outdoor gear and travel brands finding the most-reviewed trails for campaigns
- Tourism boards and real estate teams measuring trail access and popularity by area
- Researching what hikers say about conditions, parking and crowds through reviews

Typical users are app developers, travel and outdoor brands, tourism and mapping teams, and researchers.

### ⚠️ Limitations & known issues

- **Up to 1,000 trails per URL or search** — for larger areas, search by smaller areas (cities or parks) or use filters.
- **5 reviews per trail** — extra details return the 5 most recent reviews shown on the trail page, not every review.
- **No photo galleries** — only the cover photo URL is returned.
- **Search results come in AllTrails' own popularity order** — most popular trails first.
- **Unsupported pages** — only trail, park, city, state and country pages are supported. Other pages are skipped with a warning.

### ❓ Frequently asked questions

#### Can I scrape AllTrails legally?

The actor only collects data that is already publicly visible on alltrails.com — no login, paywall, or private content is accessed. Scraping publicly available data is generally considered lawful (see *hiQ Labs v. LinkedIn*), but you are responsible for complying with AllTrails' Terms of Service and applicable laws, and for how you use the data.

#### What data does the AllTrails scraper return?

Each trail has its name, URL, difficulty, length, elevation gain, route type, rating, review count, popularity, activities, features, coordinates, location and cover photo. Turn on extra details to add the full description, recent reviews, review summary, surface types and top sights.

#### How do I scrape all trails in a national park or city?

Paste the park or city page URL, for example the Yosemite National Park page, and set **Max trails per URL**. Use filters to narrow it down by difficulty, rating, length or features.

#### How many trails can I scrape in one run?

Up to 1,000 per start URL, plus up to 1,000 for the keyword/coordinates search. Add several URLs to cover more areas.

#### Do I need a proxy to scrape AllTrails?

No. The actor works without a proxy by default.

#### Can I get reviews from AllTrails?

Yes. Turn on **Include extra details** to get the 5 most recent reviews of each trail, with author, date, rating, activity, text and condition notes.

#### How do I scrape AllTrails with Python?

Use the Apify client shown above: call the actor with your URLs or filters and iterate over the dataset items.

#### Can I run this AllTrails scraper on a schedule?

Yes. Use Apify Schedules to re-run it daily or weekly, then compare ratings, review counts and popularity over time.

#### What output formats are supported?

JSON, CSV, Excel, XML and RSS, either from the **Output** tab or through the Apify API.

### 🔗 Other actors you may find useful

| Actor                                                                                                       | Description                                                                                |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| [✈️ Kiwi Flight Scraper](https://apify.com/confidential_gnat/kiwi-flight-scraper)                           | Scrapes flight search results from Kiwi.com with prices, airlines, stops and durations.    |
| [⭐ Google Play Store Reviews Scraper](https://apify.com/confidential_gnat/google-play-reviews-scraper)     | Scrapes user reviews from Google Play apps, including review text, star rating and author. |
| [🏠 HousingAnywhere Property Scraper](https://apify.com/confidential_gnat/housinganywhere-property-scraper) | Scrapes rental listings from HousingAnywhere across cities and room types.                 |
| [🗞️ Google News AI Scraper](https://apify.com/confidential_gnat/google-news-ai-scraper)                     | Searches Google News by keyword with optional full article text and AI summaries.          |

### 💬 Support & contact

If you encounter any issues or have questions, please [open an issue](https://apify.com/confidential_gnat/alltrails-scraper/issues/open) or reach out via the [Apify Community Forum](https://community.apify.com/).

You can also find more of our actors on the [Actor Flow](https://apify.com/confidential_gnat) page.

# Actor input Schema

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

AllTrails pages to scrape trails from: a park (e.g. https://www.alltrails.com/parks/us/california/yosemite-national-park), a city, state or country page (e.g. https://www.alltrails.com/us/california/fremont) or a single trail page. Combine with the filters below.

## `searchQuery` (type: `string`):

Optional. Search trails by name or place, for example "waterfall" or "Mount Rainier". Can be combined with the coordinates below.

## `latitude` (type: `number`):

Optional. Latitude of a point to search around, for example 37.5. Use together with Longitude.

## `longitude` (type: `number`):

Optional. Longitude of a point to search around, for example -121.9.

## `radiusKm` (type: `integer`):

How far around the coordinates to look.

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

Only return trails with these difficulties. Leave empty for all.

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

Only return trails with these route types. Leave empty for all.

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

Return trails suited to any of these activities. Leave empty for all.

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

Return only trails that have ALL of these features, for example dogs on leash and waterfall.

## `minRating` (type: `number`):

Only trails rated at least this high (0–5).

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

Only trails with at least this many reviews.

## `minLengthKm` (type: `number`):

Only trails at least this long.

## `maxLengthKm` (type: `number`):

Only trails no longer than this.

## `minElevationGainM` (type: `integer`):

Only trails climbing at least this many metres.

## `maxElevationGainM` (type: `integer`):

Only trails climbing no more than this many metres.

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

Maximum number of trails to return for each start URL and for the keyword/coordinates search (up to 1,000).

## `includeExtraDetails` (type: `boolean`):

Loads each trail's own page to add: the FULL trail description (the standard listing is cut at 500 characters), the 5 most recent reviews (author, date, rating, activity, text, conditions and parking notes), the AI summary of what trailgoers say, the surface-type breakdown (e.g. 53% natural, 5% gravel) and the top sights. Adds a per-trail charge and takes several seconds per trail. Off by default.

## `proxyConfiguration` (type: `object`):

Optional. The scraper works without a proxy.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"
    }
  ],
  "radiusKm": 25,
  "maxItems": 3,
  "includeExtraDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (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": [
        {
            "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"
        }
    ],
    "radiusKm": 25,
    "maxItems": 3,
    "includeExtraDetails": false,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("confidential_gnat/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": [{ "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park" }],
    "radiusKm": 25,
    "maxItems": 3,
    "includeExtraDetails": False,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("confidential_gnat/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": [
    {
      "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"
    }
  ],
  "radiusKm": 25,
  "maxItems": 3,
  "includeExtraDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call confidential_gnat/alltrails-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,confidential_gnat/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/zBXPKtJ919fPgmeHy/builds/SMyAPNjqkbEj3FpzG/openapi.json
