# AllTrails park or place with its trails API

Get AllTrails places with filtered trails via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as limit, output, raw, and retrieve structured data including source place identifier, source place kind, source trail identifier, and trail length in kilometres for place directory, and filtered discovery.

Documentation: https://openany.si/alltrails/alltrails-park-or-place-with-its-trails-api/07c95502-1a51-425a-8df6-9aa04e1d8419/
API ID: 07c95502-1a51-425a-8df6-9aa04e1d8419
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/alltrails/v1/place
Page update time: 2026-12-03T02:47:21.612Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:47:21.143Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## AllTrails Place Trails API

Pass url as a supported place path, link or park ID. Trail filters apply within that place; source place identity and nested trails.items remain distinct.

## What You Can Build

- **Place directory**: Keep the place identity with its nested trail results.
- **Filtered discovery**: Retain source filters, closure flags and units.

## Returned Data

| Field | Meaning |
| --- | --- |
| `id` | Source place identifier |
| `kind` | Source place kind |
| `trails.items[].id` | Source trail identifier |
| `trails.items[].length_km` | Trail length in kilometres |
| `trails.items[].elevation_gain_m` | Trail elevation gain in metres |
| `next_page` | Next source page when present |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "AllTrails park or place with its trails API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "Place link or path, e.g. `parks/us/california/yosemite-national-park`, `us/california/yosemite-valley`, `us/california`, `poi/us/colorado/estes-park/emerald-lake`; or a park id."
        },
        "q": {
          "type": "string",
          "description": "Keywords to narrow the place's trails."
        },
        "difficulty": {
          "type": "string",
          "description": "easy, moderate, hard, strenuous; comma separated for several."
        },
        "length_min_km": {
          "type": "number",
          "description": "Shortest trail length in kilometres."
        },
        "length_max_km": {
          "type": "number",
          "description": "Longest trail length in kilometres."
        },
        "elevation_gain_min_m": {
          "type": "number",
          "description": "Least elevation gain in metres."
        },
        "elevation_gain_max_m": {
          "type": "number",
          "description": "Most elevation gain in metres."
        },
        "route_type": {
          "type": "string",
          "description": "loop, out_and_back, point_to_point; comma separated."
        },
        "activities": {
          "type": "string",
          "description": "Any of these activities, comma separated: hiking, walking, trail-running, mountain-biking, road-biking, backpacking, camping, birding, fishing, horseback-riding, rock-climbing, skiing, cross-country-skiing, snowshoeing, scenic-driving, paddle-sports, off-road-driving, via-ferrata."
        },
        "features": {
          "type": "string",
          "description": "Features every trail must have, comma separated: dogs, dogs-leash, dogs-no, kids, ada, strollers, paved, partially-paved, views, waterfall, lake, river, beach, forest, cave, wild-flowers, wildlife, hot-springs, historic-site, rails-trails, city-walk."
        },
        "rating_min": {
          "type": "number",
          "description": "Least average rating (0-5)."
        },
        "open_only": {
          "type": "string",
          "description": "`true`: leave out closed trails.",
          "enum": [
            "true",
            "false"
          ]
        },
        "park_id": {
          "type": "integer",
          "description": "Trails in this park (id from /alltrails/v1/places or a trail's `park`)."
        },
        "page": {
          "type": "integer",
          "description": "Page (default 1). Pass `next_page` back as `page`; null on the last page. The site lists at most 1,000 results per search."
        },
        "limit": {
          "type": "integer",
          "description": "Results per page (default 24, max 100)."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      },
      "required": [
        "url"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "bounds": {
      "type": "object",
      "properties": {
        "northeast": {
          "type": "object",
          "properties": {
            "lat": {
              "type": "number"
            },
            "lng": {
              "type": "number"
            }
          }
        },
        "southwest": {
          "type": "object",
          "properties": {
            "lat": {
              "type": "number"
            },
            "lng": {
              "type": "number"
            }
          }
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "country": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "credits_used": {
      "type": "integer"
    },
    "curated_lists": {
      "type": "null"
    },
    "fetched_at": {
      "type": "string"
    },
    "guides": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ID": {
            "type": "integer"
          },
          "background_color": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "name_with_formatting": {
            "type": "string"
          },
          "objectID": {
            "type": "string"
          },
          "photo_url": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "topic": {
            "type": "string"
          },
          "trail_count": {
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        }
      }
    },
    "id": {
      "type": "integer"
    },
    "kind": {
      "type": "string"
    },
    "latitude": {
      "type": "number"
    },
    "location": {
      "type": "string"
    },
    "longitude": {
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "next_page": {
      "type": "integer"
    },
    "object_id": {
      "type": "string"
    },
    "page": {
      "type": "integer"
    },
    "park_type": {
      "type": "string"
    },
    "poi_count": {
      "type": "integer"
    },
    "popularity": {
      "type": "number"
    },
    "slug": {
      "type": "string"
    },
    "state": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "trail_activities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "trail_difficulties": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "trail_features": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "trails": {
      "type": "object",
      "properties": {
        "applied_filters": {
          "type": "object",
          "properties": {}
        },
        "count": {
          "type": "integer"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "activities": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "alert_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "city": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              },
              "closed": {
                "type": "boolean"
              },
              "collections": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "country": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "created_at": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "difficulty": {
                "type": "string"
              },
              "difficulty_rating": {
                "type": "integer"
              },
              "elevation_gain_ft": {
                "type": "integer"
              },
              "elevation_gain_m": {
                "type": "integer"
              },
              "features": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "highest_point_m": {
                "type": "integer"
              },
              "id": {
                "type": "integer"
              },
              "latitude": {
                "type": "number"
              },
              "length_km": {
                "type": "number"
              },
              "length_m": {
                "type": "integer"
              },
              "length_mi": {
                "type": "number"
              },
              "location": {
                "type": "string"
              },
              "longitude": {
                "type": "number"
              },
              "monthly_popularity": {
                "type": "object",
                "properties": {
                  "month_1": {
                    "type": "integer"
                  },
                  "month_10": {
                    "type": "integer"
                  },
                  "month_11": {
                    "type": "integer"
                  },
                  "month_12": {
                    "type": "integer"
                  },
                  "month_2": {
                    "type": "integer"
                  },
                  "month_3": {
                    "type": "integer"
                  },
                  "month_4": {
                    "type": "integer"
                  },
                  "month_5": {
                    "type": "integer"
                  },
                  "month_6": {
                    "type": "integer"
                  },
                  "month_7": {
                    "type": "integer"
                  },
                  "month_8": {
                    "type": "integer"
                  },
                  "month_9": {
                    "type": "integer"
                  }
                }
              },
              "name": {
                "type": "string"
              },
              "park": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              },
              "photo": {
                "type": "string"
              },
              "photos": {
                "type": "integer"
              },
              "popularity": {
                "type": "number"
              },
              "private_property": {
                "type": "boolean"
              },
              "rating": {
                "type": "number"
              },
              "recordings": {
                "type": "integer"
              },
              "reviews": {
                "type": "integer"
              },
              "route_type": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "state": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "text_reviews": {
                "type": "integer"
              },
              "url": {
                "type": "string"
              },
              "visitor_usage": {
                "type": "integer"
              }
            }
          }
        },
        "limit": {
          "type": "integer"
        },
        "next_page": {
          "type": "integer"
        },
        "page": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "trails_count": {
      "type": "integer"
    },
    "type_label": {
      "type": "string"
    },
    "url": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/alltrails/v1/place?limit=1&output=json&raw=0&url=parks%2Fus%2Fcalifornia%2Fyosemite-national-park' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "bounds": {
    "northeast": {
      "lat": 38.1863499,
      "lng": -119.1995075
    },
    "southwest": {
      "lat": 37.4921493,
      "lng": -119.8861599
    }
  },
  "cached": false,
  "country": {
    "id": 313,
    "name": "United States"
  },
  "credits_used": 1,
  "curated_lists": null,
  "fetched_at": "2026-11-19T12:28:30.526Z",
  "guides": [
    {
      "ID": 121,
      "background_color": "#221511",
      "name": "Top Picks in Yosemite National Park",
      "name_with_formatting": "<em>Top Picks</em> in Yosemite National Park",
      "objectID": "guide-121",
      "photo_url": "https://www.alltrails.com/api/alltrails/guides/121/profile_photo",
      "slug": "guides/us/california/top-picks-in-yosemite-national-park",
      "topic": "top_picks",
      "trail_count": 8,
      "type": "guide"
    },
    {
      "ID": 122,
      "background_color": "#161f13",
      "name": "Hidden Gems in Yosemite National Park",
      "name_with_formatting": "<em>Hidden Gems</em> in Yosemite National Park",
      "objectID": "guide-122",
      "photo_url": "https://www.alltrails.com/api/alltrails/guides/122/profile_photo",
      "slug": "guides/us/california/hidden-gems-in-yosemite-national-park",
      "topic": "hidden_gems",
      "trail_count": 5,
      "type": "guide"
    },
    {
      "ID": 119,
      "background_color": "#6D4E1E",
      "name": "Backpacking Trips in Yosemite National Park",
      "name_with_formatting": "<em>Backpacking Trips</em> in Yosemite National Park",
      "objectID": "guide-119",
      "photo_url": "https://www.alltrails.com/api/alltrails/guides/119/profile_photo",
      "slug": "guides/us/california/backpacking-trips-in-yosemite-national-park",
      "topic": "activities",
      "trail_count": 3,
      "type": "guide"
    },
    {
      "ID": 120,
      "background_color": "#2F2312",
      "name": "Family-Friendly Day Hikes from Yosemite Valley Campgrounds",
      "name_with_formatting": "<em>Family-Friendly Day Hikes</em> from Yosemite Valley Campgrounds",
      "objectID": "guide-120",
      "photo_url": "https://www.alltrails.com/api/alltrails/guides/120/profile_photo",
      "slug": "guides/us/california/family-friendly-day-hikes-from-yosemite-valley-campgrounds",
      "topic": "activities",
      "trail_count": 4,
      "type": "guide"
    }
  ],
  "id": 10106838,
  "kind": "area",
  "latitude": 37.8482617,
  "location": "California, United States",
  "longitude": -119.5568839,
  "name": "Yosemite National Park",
  "next_page": 2,
  "object_id": "area-10106838",
  "page": 1,
  "park_type": "National Park",
  "poi_count": 694,
  "popularity": 134.9988,
  "slug": "parks/us/california/yosemite-national-park",
  "state": {
    "id": 5,
    "name": "California"
  },
  "trail_activities": [
    "hiking",
    "trail-running",
    "backpacking",
    "camping",
    "horseback-riding",
    "cross-country-skiing",
    "snowshoeing",
    "rock-climbing",
    "via-ferrata",
    "walking",
    "fishing",
    "running",
    "mountain-biking",
    "road-biking",
    "birding"
  ],
  "trail_difficulties": [
    "moderate",
    "strenuous",
    "hard",
    "easy"
  ],
  "trail_features": [
    "forest",
    "kids",
    "river",
    "views",
    "wild-flowers",
    "wildlife",
    "dogs-no",
    "lake",
    "waterfall",
    "ada",
    "cave",
    "dogs-leash",
    "partially-paved",
    "strollers",
    "historic-site",
    "paved",
    "beach",
    "dogs"
  ],
  "trails": {
    "applied_filters": {},
    "count": 1,
    "items": [
      {
        "activities": [
          "hiking",
          "trail-running"
        ],
        "alert_ids": [
          171,
          20017,
          20019
        ],
        "city": {
          "id": 1036,
          "name": "Yosemite Valley",
          "url": "https://www.alltrails.com/us/california/yosemite-valley"
        },
        "closed": false,
        "collections": [
          "trending",
          "waterfalls",
          "views",
          "trees",
          "rivers",
          "wildflowers"
        ],
        "country": {
          "id": 313,
          "name": "United States"
        },
        "created_at": "2020-02-21T22:28:26.000Z",
        "description": "Hike to two breathtaking waterfalls along some of Yosemite Valley's most popular hiking trails. If you only have time for one hike while in Yosemite, look no further - the Mist Trail is the hike for you. It is no wonder that this trail is one of the most traveled in Yosemite National Park. You will hike so close to these two massive waterfalls that you may get wet from the trail. The best time to hike this trail is in Spring or early Summer, while the snow runoff is high and the falls are full of water.\n\nThe Mist Trail starts at Happy Isles Trailhead (YARTS Happy Isles shuttle stop #16, and is within walking distance of Curry Village and the parking lot). The park recommends starting early to avoid the larger crowds. After a brief stroll along the river, you climb a pretty steep initial ascent over stone steps until you reach the footbridge, which offers the first glimpse of Vernal Falls in the distance. You will also find a water fountain and restrooms. You will then continue up to Vernal Falls, past Emerald Pool, and alongside Nevada Falls until you reach the high point of this hike.\n\nYou can choose to take the alternate route down along the John Muir Trail to see great views of Nevada Falls and Liberty Cap in the distance before meeting back up with the Mist Trail near the footbridge. This route back is slightly longer, but offers a change of scenery and is easier on the knees. Before hopping back on the YARTS shuttle, treat yourself to some ice cream or a refreshing drink at the small stand, or head over to Curry Village for a wider selection.\n\nIn the 19th century, Yosemite National Park was served by Buffalo Soldiers, former Black regiments of the US Army. These men became the first Black national park rangers and backcountry rangers and were tasked with fighting fires, preventing poaching, and helping create the trails that millions of people explore each year.",
        "difficulty": "hard",
        "difficulty_rating": 5,
        "elevation_gain_ft": 2070,
        "elevation_gain_m": 631,
        "features": [
          "forest",
          "river",
          "views",
          "waterfall",
          "wild-flowers",
          "wildlife",
          "dogs-no",
          "partially-paved"
        ],
        "highest_point_m": 1827,
        "id": 10026910,
        "latitude": 37.73282,
        "length_km": 10.94,
        "length_m": 10944,
        "length_mi": 6.8,
        "location": "Yosemite National Park, California",
        "longitude": -119.55778,
        "monthly_popularity": {
          "month_1": 311,
          "month_10": 2656,
          "month_11": 1384,
          "month_12": 352,
          "month_2": 299,
          "month_3": 676,
          "month_4": 2101,
          "month_5": 4647,
          "month_6": 4465,
          "month_7": 3912,
          "month_8": 4040,
          "month_9": 3330
        },
        "name": "Vernal and Nevada Falls via Mist Trail",
        "park": {
          "id": 10106838,
          "name": "Yosemite National Park",
          "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"
        },
        "photo": "https://images.alltrails.com/eyJidWNrZXQiOiJhc3NldHMuYWxsdHJhaWxzLmNvbSIsImtleSI6InVwbG9hZHMvcGhvdG8vaW1hZ2UvMTI3MDcyMjg2LzNkNDMyZGUwYzNiMzc3NjE0OTA3NDg3NDg4YTkxODk1LmpwZyIsImVkaXRzIjp7InRvRm9ybWF0IjoianBlZyIsInJlc2l6ZSI6eyJ3aWR0aCI6MTIwMCwiaGVpZ2h0IjoxMjAwLCJmaXQiOiJpbnNpZGUifX19",
        "photos": 89518,
        "popularity": 99.9988,
        "private_property": false,
        "rating": 4.9,
        "recordings": 42807,
        "reviews": 27900,
        "route_type": "loop",
        "slug": "trail/us/california/vernal-and-nevada-falls-via-the-mist-trail",
        "state": {
          "id": 5,
          "name": "California"
        },
        "text_reviews": 6229,
        "url": "https://www.alltrails.com/trail/us/california/vernal-and-nevada-falls-via-the-mist-trail",
        "visitor_usage": 4
      }
    ],
    "limit": 1,
    "next_page": 2,
    "page": 1,
    "total": 309
  },
  "trails_count": 331,
  "type_label": "National Park",
  "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Which place forms are accepted?
Use a supported park, city, region or POI path/link, or park ID in url. Preserve the resolved place identity.

### Do activity and feature lists combine the same way?
activities matches any listed activity, while features requires every listed feature according to the contract.

### What are the search limits?
limit defaults to 24 and accepts up to 100. Follow next_page; the source lists at most 1,000 results per search.

### Does open_only grant access to a trail?
It excludes source-closed entries. Keep returned closure and alert context separately from access permissions.

### How do I bypass cached results?
Pass fresh=1. A cache bypass retrieves available source data; it does not make unpublished or restricted records available.

### Can I request CSV or NDJSON?
This OpenAny implementation serves JSON only. Omit output or set output=json.

## Available implementations
- apish: https://openany.si/alltrails/alltrails-park-or-place-with-its-trails-api/07c95502-1a51-425a-8df6-9aa04e1d8419/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
