alltrails.com APIalltrails.com ↗
Search hiking trails, retrieve detailed trail stats, AI review summaries, and paginated user reviews from AllTrails via a simple REST API.
curl -X GET 'https://api.parse.bot/scraper/00ff888e-47b1-497a-9be0-4e715bb70de8/search_trails?lat=37.74&lng=-119.6&limit=5&query=Yosemite+Falls' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for hiking trails by keyword. Returns trail summaries including name, location, rating, difficulty, and length. Results may be geo-biased by proxy location unless latitude and longitude are provided to center the search.
| Param | Type | Description |
|---|---|---|
| lat | number | Latitude to center the search and avoid geo-bias from proxy IP location |
| lng | number | Longitude to center the search and avoid geo-bias from proxy IP location |
| limit | integer | Maximum number of results to return |
| queryrequired | string | Search keyword (e.g., 'Yosemite Falls', 'Half Dome') |
{
"type": "object",
"fields": {
"count": "integer, number of results returned",
"query": "string, the search keyword used",
"results": "array of trail summary objects with id, name, slug, location, rating, reviews_count, difficulty, length, elevation_gain, route_type"
},
"sample": {
"data": {
"count": 2,
"query": "Yosemite Falls",
"results": [
{
"id": 10005895,
"name": "Upper Yosemite Falls Trail",
"slug": "trail/us/california/upper-yosemite-falls-trail",
"length": "6.7 mi",
"rating": 4.8,
"location": {
"city": "Yosemite Valley",
"state": "California",
"country": "United States"
},
"difficulty": "5",
"route_type": "O",
"reviews_count": 19558,
"elevation_gain": 984.8088
},
{
"id": 10011926,
"name": "Lower Yosemite Falls Trail",
"slug": "trail/us/california/lower-yosemite-falls-trail",
"length": "1.2 mi",
"rating": 4.7,
"location": {
"city": "Yosemite Valley",
"state": "California",
"country": "United States"
},
"difficulty": "1",
"route_type": "L",
"reviews_count": 20479,
"elevation_gain": 17.9832
}
]
},
"status": "success"
}
}About the alltrails.com API
The AllTrails API gives developers access to 3 endpoints covering trail search, detailed trail profiles, and user reviews. Use search_trails to query trails by keyword and optional coordinates, then pull full trail data — including elevation stats, route type, activity attributes, and an AI-generated review summary — with get_trail_details. Each response surfaces concrete fields like elevationGain, avgRating, difficulty, and trailCounts for filtering and display.
Trail Search
The search_trails endpoint accepts a required query string (e.g., 'Half Dome' or 'PCT Section J') and returns an array of trail summary objects. Each result includes the trail's id, slug, name, location, rating, reviews_count, difficulty, length, elevation_gain, and route_type. Without coordinates, results may reflect the proxy server's geographic location; pass lat and lng to anchor the search to a specific area. A limit parameter caps the result count.
Trail Details
get_trail_details accepts either a numeric trail_id or a slug (e.g., 'us/california/upper-yosemite-falls-trail') and returns a full trail profile. Key response fields include overview (descriptive text), avgRating, routeType, trailGeoStats (length, elevation start/gain/max, estimated duration in minutes), attributes (activities, features, and obstacles arrays), and trailCounts (review, photo, track, and completed counts). The response also includes an AI-generated review summary derived from user-submitted content.
User Reviews
get_trail_reviews returns paginated user reviews for a trail, identified by trail_id or slug. Each page delivers up to 100 review objects containing comment, date, rating, difficulty, user info, and ratingAttributes / difficultyAttributes for structured condition data. The pageInfo field carries pagination cursor information for sequential traversal; meta reports the item count and response timestamp.
- Build a trail recommendation engine filtered by
difficulty,length, andelevation_gainfromsearch_trailsresults. - Populate a hiking app's trail profile pages using
overview,trailGeoStats, andattributesfromget_trail_details. - Aggregate user sentiment by collecting
ratingandcommentfields across paginated review pages fromget_trail_reviews. - Display AI-generated review summaries alongside structured stats for quick trail evaluation.
- Monitor trail condition reports by parsing
ratingAttributesanddifficultyAttributesin recent reviews. - Compare elevation profiles across a region by extracting
elevationGainandelevationMaxfrom multiple trail detail calls. - Geocode trail starting points using
latitudeandlongitudefrom thelocationobject in trail detail responses.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does AllTrails have an official developer API?+
What does `get_trail_details` return that `search_trails` does not?+
search_trails returns lightweight summaries — name, location, rating, difficulty, length, and elevation gain. get_trail_details adds the full overview text, the trailGeoStats object (including elevationStart, elevationMax, and durationMinutes), structured attributes arrays for activities, features, and obstacles, trailCounts for reviews and photos, and an AI-generated summary of user reviews.How does pagination work for trail reviews?+
get_trail_reviews returns up to 100 reviews per page. The pageInfo field in the response carries cursor information you use to request subsequent pages via the page parameter. The meta object reports the item count per response so you can determine when you've reached the last page.Does the API return trail photos or GPX/track files?+
photoCount and trackCount within trailCounts in get_trail_details, but does not return photo URLs or downloadable track data. You can fork this API on Parse and revise it to add endpoints that retrieve those assets.Are results from `search_trails` always globally unbiased?+
lat and lng parameters, search results may be geo-biased toward the proxy server's location. Pass explicit coordinates to center results on the region you care about — for example, latitude and longitude for a national park — and the results will reflect that geography.