# AllTrails Scraper - Hiking Trail Data (`bovi/alltrails-scraper`) Actor

Scrape AllTrails hiking trails by park, state, city, map box, keyword or URL: difficulty, length, elevation gain, rating, review count, route type, activities, features, GPS and photo. Filters for difficulty, rating, length and features. No login.

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

## Pricing

from $4.00 / 1,000 alltrails scraper - hiking trail data

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 - Hiking Trail Data

Collect hiking, running and biking trails from [AllTrails](https://www.alltrails.com) by park, state or region, city, map bounding box, keyword or AllTrails URLs. Every trail comes back as one flat row with its difficulty, length, elevation gain, rating, review count, route type, activities, features, GPS position and main photo. No login, no API key.

> Independent tool, not affiliated with or endorsed by AllTrails, LLC.

### What it collects

| Field | Example |
|---|---|
| `name`, `url`, `trailId` | Angels Landing Trail, `https://www.alltrails.com/trail/us/utah/angels-landing-trail` |
| `areaName`, `areaPage`, `city`, `state`, `country` | Zion National Park, Springdale, Utah, United States |
| `latitude`, `longitude` | 37.2591, -112.95122 |
| `lengthKm`, `lengthMiles` | 7.72, 4.8 |
| `elevationGainM`, `elevationGainFt`, `highestPointM` | 517.9, 1699, 1765 |
| `difficulty`, `difficultyRating` | strenuous, 7 |
| `routeType` | Out & Back |
| `avgRating`, `reviewCount`, `textReviewCount` | 4.9, 42218, 13253 |
| `recordingCount`, `photoCount`, `popularity`, `visitorUsage` | 50858, 74896, 99.99, 4 |
| `estimatedTime`, `durationMinutes` | "0.5–1 hr", 15 |
| `activities`, `features` | \["hiking"], \["views", "river", "dogs-no"] |
| `description`, `photoUrl`, `isClosed`, `isPrivateProperty` | listing description excerpt, direct image URL |

Turn on **Include trail page details** to also get `overview` (full overview text), `completedCount`, `trackCount`, `obstacles` (e.g. Fee, Rocky, No shade), `seasonStartMonth` / `seasonEndMonth`, `lowCellService` and `createdAt`. This opens each trail's page, so it is slower.

### Input

- **Search by**: `park` (e.g. "Yosemite National Park"), `state` (e.g. "Colorado", "British Columbia"), `city` (+ optional state to tell same-named cities apart), `coordinates` (north / south / east / west box) or `keyword`.
- **Start URLs** (optional, overrides Search by): trail pages `/trail/...`, park pages `/parks/...`, city or state pages such as `/us/colorado/denver`, and explore map URLs with `b_tl_lat`, `b_tl_lng`, `b_br_lat`, `b_br_lng`.
- **Filters**: difficulty, minimum rating, minimum reviews, route type, activities (any of), features (all of), visitor traffic level, length range (km), elevation gain range (m), include closed trails.
- **Language**: names and descriptions in English, German, French, Spanish, Italian, Dutch, Norwegian, Polish, Portuguese, Swedish or Danish where AllTrails has them.
- **Max results** (`maxResults`, default 50).
- **Proxy configuration**: optional.

```json
{
  "searchType": "park",
  "park": "Zion National Park",
  "difficulty": ["moderate", "hard"],
  "minRating": 4.5,
  "maxResults": 50
}
```

Results come in AllTrails' own ranking (most popular first). For pulls above 1,000 trails from one location, the Actor walks the area in trail-length slices, so large runs are ordered from shorter to longer trails.

### Example output

```json
{
  "trailId": 10006571,
  "name": "Angels Landing Trail",
  "url": "https://www.alltrails.com/trail/us/utah/angels-landing-trail",
  "areaName": "Zion National Park",
  "state": "Utah",
  "lengthKm": 7.72,
  "elevationGainM": 517.9,
  "difficulty": "strenuous",
  "routeType": "Out & Back",
  "avgRating": 4.9,
  "reviewCount": 42218,
  "activities": ["hiking"],
  "features": ["river", "views", "wild-flowers", "wildlife", "dogs-no", "partially-paved"],
  "scrapedAt": "2026-10-16T06:09:11+00:00"
}
```

### Price

Pay per result: you are charged only for the trails saved to the dataset, at the per-result price shown on the Actor's Pricing tab. There is no extra charge for filters, languages or trail page details.

### Tips

- No results? Loosen the filters (rating, reviews, features) and check the park or city spelling as AllTrails lists it.
- Features are combined with AND (a trail must have all of them); activities, difficulty, route type and traffic level with OR.

# Actor input Schema

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

How to find trails. Ignored when Start URLs are given.

## `park` (type: `string`):

Name of a park or protected area as AllTrails lists it, e.g. "Yosemite National Park" or "Banff National Park". Used when Search by = Park.

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

US state or another country's region, e.g. "Colorado", "British Columbia". Used when Search by = State.

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

City name, e.g. "Denver". Used when Search by = City.

## `cityState` (type: `string`):

Optional, to tell same-named cities apart, e.g. "Colorado" for Denver, CO.

## `north` (type: `number`):

Bounding box north edge. Used when Search by = Coordinates.

## `south` (type: `number`):

Bounding box south edge.

## `east` (type: `number`):

Bounding box east edge (western hemisphere is negative).

## `west` (type: `number`):

Bounding box west edge.

## `keyword` (type: `string`):

Free-text trail search, e.g. "waterfall loop". Used when Search by = Keyword.

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

Optional AllTrails URLs: trail pages (/trail/...), park pages (/parks/...), city or state pages (/us/colorado/denver) or explore map URLs with b_tl_lat/b_tl_lng/b_br_lat/b_br_lng. When set, Search by is ignored.

## `maxResults` (type: `integer`):

Maximum number of trails to save.

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

Keep only these AllTrails difficulty levels.

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

Minimum average star rating (0-5).

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

Minimum number of reviews.

## `routeType` (type: `array`):

Keep only these route shapes.

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

Keep trails that list at least one of these activities.

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

Keep trails that have all of these features.

## `visitorUsage` (type: `array`):

AllTrails visitor usage level, 1 = lightest traffic, 4 = busiest.

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

Minimum trail length in kilometres.

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

Maximum trail length in kilometres.

## `minElevationGainM` (type: `number`):

Minimum elevation gain in metres.

## `maxElevationGainM` (type: `number`):

Maximum elevation gain in metres.

## `includeClosed` (type: `boolean`):

Also return trails AllTrails marks as closed.

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

Language of trail names and descriptions.

## `includeDetails` (type: `boolean`):

Open each trail's page for its full overview, completion and recording counts, obstacles, best season and cell-service flag. Slower.

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

Optional proxy. The trail search works without one; Apify Proxy helps when fetching trail pages at volume.

## Actor input object example

```json
{
  "searchType": "park",
  "park": "Zion National Park",
  "state": "Colorado",
  "city": "Denver",
  "cityState": "Colorado",
  "north": 40,
  "south": 39.6,
  "east": -104.7,
  "west": -105.3,
  "keyword": "waterfall",
  "maxResults": 50,
  "includeClosed": false,
  "language": "en-US",
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset with the scraped trails.

# 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 = {
    "searchType": "park",
    "park": "Zion National Park",
    "state": "Colorado",
    "city": "Denver",
    "cityState": "Colorado",
    "north": 40,
    "south": 39.6,
    "east": -104.7,
    "west": -105.3,
    "keyword": "waterfall",
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bovi/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 = {
    "searchType": "park",
    "park": "Zion National Park",
    "state": "Colorado",
    "city": "Denver",
    "cityState": "Colorado",
    "north": 40,
    "south": 39.6,
    "east": -104.7,
    "west": -105.3,
    "keyword": "waterfall",
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("bovi/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 '{
  "searchType": "park",
  "park": "Zion National Park",
  "state": "Colorado",
  "city": "Denver",
  "cityState": "Colorado",
  "north": 40,
  "south": 39.6,
  "east": -104.7,
  "west": -105.3,
  "keyword": "waterfall",
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call bovi/alltrails-scraper --silent --output-dataset

```

## MCP server setup

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