APIDataTravel

AllTrails trail API

Use the AllTrails trail API to retrieve review counts, equipment and features, difficulty levels, geographic coordinates, collection contents and record identities and titles as structured JSON from AllTrails. Supply record identifier in the query. Use these results to compare route characteristics and organize trail reference material when planning an outdoor itinerary. The documented source-page link form identifies the requested entry directly and lets you reuse an existing source-page reference. The detail page includes parameter definitions, paired request and response examples, and usage pricing for this operation.

Selected price
$0.002 / billing creditPublished pricing
Sellers / APIs
1 / 1
Requests · 30d
—Loading...
Success rate · 30d
—Loading...
USE THIS API

AllTrails trail API

Prepare your request, then continue with your agent.

Pricing

$0.002 / billing credit

Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.

Provider
Pricing
Connect your agent
On this page

Overview

Overview

AllTrails trail API

Use the AllTrails trail API to retrieve review counts, equipment and features, difficulty levels, geographic coordinates, collection contents and record identities and titles as structured JSON from AllTrails. Supply record identifier in the query. Use these results to compare route characteristics and organize trail reference material when planning an outdoor itinerary. The documented source-page link form identifies the requested entry directly and lets you reuse an existing source-page reference. The detail page includes parameter definitions, paired request and response examples, and usage pricing for this operation.

AllTrails trail API

One AllTrails trail by id or link: `id`, `name`, `url`, `location`, `park`, `city`, `state`, `country`, `latitude`, `longitude`, `rating`, `reviews`, `photos`, `difficulty`, `route_type`, `length_km`, `length_mi`, `elevation_gain_m`, `elevation_gain_ft`, `highest_point_m`, `activities`, `features`, `closed`, `description`, `photo`, `monthly_popularity` and `raw`, plus `alerts` (closures, permits, fees), `points_of_interest` along the trail, `text_reviews`, `recordings`, `visitor_usage`, `featured_photo_ids`, `primary_trailhead_id` and `created_at`.

Inputs and results

Send the listed inputs as GET query parameters. Required inputs: id. Supported values, filters and optional identifiers are listed below.

ParameterTypeRequiredMeaning
idstringRequiredTrail id (e.g. `10005585`) or its alltrails.com/trail/ link.
rawstringOptionalUse 0 to leave out the source raw blocks. This controls raw source payloads, not the normalized result records. Allowed values: 0, 1.
fieldsstringOptionalOptional comma-separated output fields; nested paths follow the source field-selection syntax. Call metadata is retained.
freshstringOptionalUse 1 to bypass the source response cache. Cache hits are also billed according to reported credits. Allowed values: 1.
outputstringOptionalResponse format for this product: json. Omit this parameter to use JSON. Allowed values: json.
recordsstringOptionalSource export selector for CSV or NDJSON. It has no effect on this JSON-only product.

Using OpenAny

Send this request to the OpenAny gateway with your OpenAny API key in the Authorization header. The query values below match the paired request example.

OpenAny request example

bash
curl "https://api.openany.si/v1/agent-apis/apish/alltrails/v1/trail?id=10005585&output=json&raw=0" \
  -H "Authorization: Bearer <OPENANY_API_KEY>"

This command illustrates the OpenAny request format. The response example below retains its stated provenance; it is not evidence that this gateway request was executed.

Response example

Recorded source response for the exact request shown above. Filters, field selectors and page choices in that request define the returned scope.

json
{
  "id": 10005585,
  "name": "Half Dome via the John Muir Trail (JMT)",
  "url": "https://www.alltrails.com/trail/us/california/half-dome-via-the-john-muir-trail-jmt",
  "slug": "trail/us/california/half-dome-via-the-john-muir-trail-jmt",
  "location": "Yosemite National Park, California",
  "park": {
    "id": 10106838,
    "name": "Yosemite National Park",
    "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"
  },
  "city": {
    "id": 1036,
    "name": "Yosemite Valley",
    "url": "https://www.alltrails.com/us/california/yosemite-valley"
  },
  "state": {
    "id": 5,
    "name": "California"
  },
  "country": {
    "id": 313,
    "name": "United States"
  },
  "latitude": 37.73282,
  "longitude": -119.55778,
  "rating": 4.9,
  "reviews": 19043,
  "text_reviews": 5175,
  "photos": 63583,
  "recordings": 29812,
  "difficulty": "strenuous",
  "difficulty_rating": 7,
  "route_type": "out_and_back",
  "length_m": 27359,
  "length_km": 27.36,
  "length_mi": 17,
  "elevation_gain_m": 1555,
  "elevation_gain_ft": 5101,
  "highest_point_m": 2691,
  "visitor_usage": 4,
  "popularity": 99.9951,
  "closed": false,
  "private_property": false,
  "activities": [
    "camping",
    "hiking",
    "rock-climbing",
    "via-ferrata"
  ],
  "features": [
    "forest",
    "river",
    "views",
    "waterfall",
    "wild-flowers",
    "wildlife",
    "dogs-no"
  ],
  "collections": [
    "waterfalls",
    "trending",
    "views",
    "trees",
    "rivers",
    "wildflowers"
  ],
  "description": "Half Dome is a serious endurance hike taking you 4,800 feet above the Yosemite Valley to spectacular views of Vernal and Nevada Falls, Liberty Cap, the Yosemite Valley, and the High Sierra. This is one of Yosemite National Park’s most iconic hikes. You must obtain a permit to hike to the summit of Half Dome. \n\nPreparation and safety are key to having a fantastic experience. This hike requires you to be in good shape. Most people take 10 to 12 hours to hike to Half Dome and back, depending on the way you choose to come down. Plan to leave around sunrise (or earlier) and then have a non-negotiable turnaround time. The trail is fairly well marked, but make sure to watch for all trail signs, as it can be easy to miss them.\n\nThe elevation gain is very strenuous, starting with a steep climb to Vernal Falls, followed by another steep climb to the top of Nevada Falls. There is about 1 mile of fairly level hiking before reaching Little Yosemite Campground, followed by steep switchbacks through the forest. At about 7 miles into your trip, you’ll reach a break in the trees with a beautiful view of Half Dome and the valley below. Some steep switchbacks carved like stairs into the rock guide the way up to the top of what is known as Sub Dome. Once you walk across the rocky surface of Sub Dome, you’ll arrive at the base of the cables with only 400 feet to go. These last 400 feet are the most challenging, but also the most rewarding (although you may not realize it until you are comfortably back on the valley floor).\n\nThe part of this journey that makes the ascent up Half Dome famous is the cable route. Two steel cables allow hikers to climb the last 400 feet to the summit without rock climbing equipment. The cables are around a 45-55 degree angle, with wooden supports every 10 to 20 feet to rest and maintain your balance. Using gloves is highly recommended to get a better grip and avoid painful blisters. Some choose to bring a harness, carabiners, and slings to secure themselves to the cables as they ascend for extra safety. Be sure to tightly secure your water bottles and cameras for the climb up because you will want them once at the top. Once you have reached the summit, take the time to rest for a while and take in the incredible panoramic views. The Half Dome cables usually go up the Friday before Memorial Day (conditions permitting) and come down the day after Columbus Day.\n\nCompared to the hike up, the return journey flies by, and before you know it, you will be back at the top of Nevada Falls. You have 2 options here: the Mist Trail, which is how you came up, is about 3.4 miles (5.5km), or the John Muir Trail for a slight change of scenery (about 0.5 miles further). The waterfalls suddenly seem much more pleasant as you hike down compared to the earlier climb, and it's hard to hold back a smile as you reach the Vernal Falls footbridge, where you can refill your water (there are also facilities here). About 30 minutes later, you are back at the trailhead, where you can catch a free shuttle to your car or anywhere else in the valley (there is a concession stand near the bus stop where you can buy cold drinks and ice cream).",
  "photo": "https://images.alltrails.com/eyJidWNrZXQiOiJhc3NldHMuYWxsdHJhaWxzLmNvbSIsImtleSI6InVwbG9hZHMvcGhvdG8vaW1hZ2UvMTMxMTA3MDI5L2NkNmU2MzNmOGI1MmEwMjgzYmM4MzA3MWNkY2NhOGZmLmpwZyIsImVkaXRzIjp7InRvRm9ybWF0IjoianBlZyIsInJlc2l6ZSI6eyJ3aWR0aCI6MTIwMCwiaGVpZ2h0IjoxMjAwLCJmaXQiOiJpbnNpZGUifX19",
  "monthly_popularity": {
    "month_1": 105,
    "month_2": 98,
    "month_3": 213,
    "month_4": 483,
    "month_5": 1855,
    "month_6": 3387,
    "month_7": 3293,
    "month_8": 3448,
    "month_9": 3642,
    "month_10": 2195,
    "month_11": 402,
    "month_12": 96
  },
  "alert_ids": [
    171,
    20017,
    20019,
    41302
  ],
  "created_at": "2020-02-13T23:08:35.000Z",
  "alerts": [
    {
      "id": 41302,
      "title": "Access information",
      "type": "info",
      "applies_to": "geo",
      "applies_to_id": 94876
    },
    {
      "id": 20019,
      "title": "Seasonal Closure",
      "type": "warning",
      "applies_to": "geo",
      "applies_to_id": 64190
    },
    {
      "id": 20017,
      "title": "Seasonal road closure",
      "type": "warning",
      "applies_to": "geo",
      "applies_to_id": 64188
    },
    {
      "id": 171,
      "title": "General fee",
      "type": "info",
      "applies_to": "area",
      "applies_to_id": 10106838
    }
  ],
  "points_of_interest": [
    {
      "id": 2817652,
      "name": "Subdome",
      "kind": "Peak",
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/subdome",
      "latitude": 37.7466921,
      "longitude": -119.5299035,
      "trails_count": 9
    },
    {
      "id": 51434,
      "name": "Half Dome",
      "kind": "Peak",
      "url": "https://www.alltrails.com/poi/us/california/half-dome",
      "latitude": 37.7460015,
      "longitude": -119.5332525,
      "trails_count": 9
    },
    {
      "id": 440415,
      "name": "Illilouette Creek",
      "kind": "River",
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/illilouette-creek",
      "latitude": 37.6676817,
      "longitude": -119.5026659,
      "trails_count": 44
    },
    {
      "id": 511712,
      "name": "Panorama Cliff",
      "kind": "Cliff",
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/panorama-cliff",
      "latitude": 37.7240288,
      "longitude": -119.5454248,
      "trails_count": 24
    },
    {
      "id": 2777669,
      "name": "Giant Staircase",
      "kind": "Valley",
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/giant-staircase",
      "latitude": 37.727009,
      "longitude": -119.5410729,
      "trails_count": 38
    },
    {
      "id": 289851,
      "name": "Little Yosemite Valley",
      "kind": "Valley",
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/little-yosemite-valley",
      "latitude": 37.7321974,
      "longitude": -119.5166499,
      "trails_count": 29
    },
    {
      "id": 41104,
      "name": "Nevada Fall",
      "kind": "Waterfall",
      "url": "https://www.alltrails.com/poi/us/california/nevada-fall",
      "latitude": 37.7249029,
      "longitude": -119.5333639,
      "trails_count": 34
    },
    {
      "id": 2098729,
      "name": "Yosemite Valley",
      "kind": "Valley",
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/yosemite-valley",
      "latitude": 37.7430033,
      "longitude": -119.5945649,
      "trails_count": 68
    },
    {
      "id": 989011,
      "name": "Clark Point",
      "kind": "Viewpoint",
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/clark-point",
      "latitude": 37.7250163,
      "longitude": -119.5450118,
      "trails_count": 15
    },
    {
      "id": 2591788,
      "name": "Little Yosemite Valley Campground",
      "kind": "Campsite",
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/little-yosemite-valley-campground",
      "latitude": 37.7329132,
      "longitude": -119.5145932,
      "trails_count": 27
    }
  ],
  "featured_photo_ids": [
    142189574,
    138049937,
    138375534,
    136478525,
    138222719,
    132845901,
    140608439,
    130420354,
    131519589,
    134980006
  ],
  "primary_trailhead_id": 10054970,
  "verified_map_id": 183577246,
  "cached": false,
  "fetched_at": "2026-11-19T12:28:32.819Z",
  "credits_used": 1
}

Usage and price

The price is USD 0.002 per actual credit reported in credits_used, with no fixed per-call fee. A response reporting zero credits has zero usage cost. Up to USD 0.002 is reserved for this request; the final price follows reported usage within the configured upper limit. A valid empty result or an unsuccessful lookup can still consume source credits. Cache hits also consume credits.

Coverage and limits

Coverage and update times follow the source. Use the documented field definitions when interpreting the selected result. Requests have a 120-second time budget and a 8 MiB response limit.

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
Trail id (e.g. `10005585`) or its alltrails.com/trail/ link.
Optional parameters (5)
0 leaves out the bulky `raw` source blocks (often 10-30x smaller).
Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.
1 skips the 24-hour cache and fetches live.
JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.
With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.

Sample response

"activities": [
  "camping",
  "hiking",
  "rock-climbing",
  "via-ferrata"
]
"alert_ids": [
  171,
  20017,
  20019,
  41302
]
"alerts": [
  {
    "applies_to": "geo",
    "applies_to_id": 94876,
    "id": 41302,
    "title": "Access information",
    "type": "info"
  },
  {
    "applies_to": "geo",
    "applies_to_id": 64190,
    "id": 20019,
    "title": "Seasonal Closure",
    "type": "warning"
  },
  {
    "applies_to": "geo",
    "applies_to_id": 64188,
    "id": 20017,
    "title": "Seasonal road closure",
    "type": "warning"
  },
  {
    "applies_to": "area",
    "applies_to_id": 10106838,
    "id": 171,
    "title": "General fee",
    "type": "info"
  }
]
"cached": false
"city": {
  "id": 1036,
  "name": "Yosemite Valley",
  "url": "https://www.alltrails.com/us/california/yosemite-valley"
}
"closed": false
"collections": [
  "waterfalls",
  "trending",
  "views",
  "trees",
  "rivers",
  "wildflowers"
]
"country": {
  "id": 313,
  "name": "United States"
}
"created_at": "2020-02-13T23:08:35.000Z"
"credits_used": 1
descriptionString · text preview
description
Half Dome is a serious endurance hike taking you 4,800 feet above the Yosemite Valley to spectacular views of Vernal and Nevada Falls, Liberty Cap, the Yosemite Valley, and the High Sierra. This is one of Yosemite National Park’s most iconic hikes. You must obtain a permit to hike to the summit of Half Dome. 

Preparation and safety are key to having a fantastic experience. This hike requires you to be in good shape. Most people take 10 to 12 hours to hike to Half Dome and back, depending on the way you choose to come down. Plan to leave around sunrise (or earlier) and then have a non-negotiable turnaround time. The trail is fairly well marked, but make sure to watch for all trail signs, as it can be easy to miss them.

The elevation gain is very strenuous, starting with a steep climb to Vernal Falls, followed by another steep climb to the top of Nevada Falls. There is about 1 mile of fairly level hiking before reaching Little Yosemite Campground, followed by steep switchbacks through the forest. At about 7 miles into your trip, you’ll reach a break in the trees with a beautiful view of Half Dome and the valley below. Some steep switchbacks carved like stairs into the rock guide the way up to the top of what is known as Sub Dome. Once you walk across the rocky surface of Sub Dome, you’ll arrive at the base of the cables with only 400 feet to go. These last 400 feet are the most challenging, but also the most rewarding (although you may not realize it until you are comfortably back on the valley floor).

The part of this journey that makes the ascent up Half Dome famous is the cable route. Two steel cables allow hikers to climb the last 400 feet to the summit without rock climbing equipment. The cables are around a 45-55 degree angle, with wooden supports every 10 to 20 feet to rest and maintain your balance. Using gloves is highly recommended to get a better grip and avoid painful blisters. Some choose to bring a harness, carabiners, and slings to secure themselves to the cables as they ascend for extra safety. Be sure to tightly secure your water bottles and cameras for the climb up because you will want them once at the top. Once you have reached the summit, take the time to rest for a while and take in the incredible panoramic views. The Half Dome cables usually go up the Friday before Memorial Day (conditions permitting) and come down the day after Columbus Day.

Compared to the hike up, the return journey flies by, and before you know it, you will be back at the top of Nevada Falls. You have 2 options here: the Mist Trail, which is how you came up, is about 3.4 miles (5.5km), or the John Muir Trail for a slight change of scenery (about 0.5 miles further). The waterfalls suddenly seem much more pleasant as you hike down compared to the earlier climb, and it's hard to hold back a smile as you reach the Vernal Falls footbridge, where you can refill your water (there are also facilities here). About 30 minutes later, you are back at the trailhead, where you can catch a free shuttle to your car or anywhere else in the valley (there is a concession stand near the bus stop where you can buy cold drinks and ice cream).
"difficulty": "strenuous"
"difficulty_rating": 7
"elevation_gain_ft": 5101
"elevation_gain_m": 1555
"featured_photo_ids": [
  142189574,
  138049937,
  138375534,
  136478525,
  138222719,
  132845901,
  140608439,
  130420354,
  131519589,
  134980006
]
"features": [
  "forest",
  "river",
  "views",
  "waterfall",
  "wild-flowers",
  "wildlife",
  "dogs-no"
]
"fetched_at": "2026-11-19T12:28:32.819Z"
"highest_point_m": 2691
"id": 10005585
"latitude": 37.73282
"length_km": 27.36
"length_m": 27359
"length_mi": 17
"location": "Yosemite National Park, California"
"longitude": -119.55778
"monthly_popularity": {
  "month_1": 105,
  "month_10": 2195,
  "month_11": 402,
  "month_12": 96,
  "month_2": 98,
  "month_3": 213,
  "month_4": 483,
  "month_5": 1855,
  "month_6": 3387,
  "month_7": 3293,
  "month_8": 3448,
  "month_9": 3642
}
"name": "Half Dome via the John Muir Trail (JMT)"
"park": {
  "id": 10106838,
  "name": "Yosemite National Park",
  "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"
}
"photo": "https://images.alltrails.com/eyJidWNrZXQiOiJhc3NldHMuYWxsdHJhaWxzLmNvbSIsImtleSI6InVwbG9hZHMvcGhvdG8vaW1hZ2UvMTMxMTA3MDI5L2NkNmU2MzNmOGI1MmEwMjgzYmM4MzA3MWNkY2NhOGZmLmpwZyIsImVkaXRzIjp7InRvRm9ybWF0IjoianBlZyIsInJlc2l6ZSI6eyJ3aWR0aCI6MTIwMCwiaGVpZ2h0IjoxMjAwLCJmaXQiOiJpbnNpZGUifX19"
"photos": 63583
"points_of_interest": [
  {
    "id": 2817652,
    "kind": "Peak",
    "latitude": 37.7466921,
    "longitude": -119.5299035,
    "name": "Subdome",
    "trails_count": 9,
    "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/subdome"
  },
  {
    "id": 51434,
    "kind": "Peak",
    "latitude": 37.7460015,
    "longitude": -119.5332525,
    "name": "Half Dome",
    "trails_count": 9,
    "url": "https://www.alltrails.com/poi/us/california/half-dome"
  },
  {
    "id": 440415,
    "kind": "River",
    "latitude": 37.6676817,
    "longitude": -119.5026659,
    "name": "Illilouette Creek",
    "trails_count": 44,
    "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/illilouette-creek"
  },
  {
    "id": 511712,
    "kind": "Cliff",
    "latitude": 37.7240288,
    "longitude": -119.5454248,
    "name": "Panorama Cliff",
    "trails_count": 24,
    "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/panorama-cliff"
  },
  {
    "id": 2777669,
    "kind": "Valley",
    "latitude": 37.727009,
    "longitude": -119.5410729,
    "name": "Giant Staircase",
    "trails_count": 38,
    "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/giant-staircase"
  },
  {
    "id": 289851,
    "kind": "Valley",
    "latitude": 37.7321974,
    "longitude": -119.5166499,
    "name": "Little Yosemite Valley",
    "trails_count": 29,
    "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/little-yosemite-valley"
  },
  {
    "id": 41104,
    "kind": "Waterfall",
    "latitude": 37.7249029,
    "longitude": -119.5333639,
    "name": "Nevada Fall",
    "trails_count": 34,
    "url": "https://www.alltrails.com/poi/us/california/nevada-fall"
  },
  {
    "id": 2098729,
    "kind": "Valley",
    "latitude": 37.7430033,
    "longitude": -119.5945649,
    "name": "Yosemite Valley",
    "trails_count": 68,
    "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/yosemite-valley"
  },
  {
    "id": 989011,
    "kind": "Viewpoint",
    "latitude": 37.7250163,
    "longitude": -119.5450118,
    "name": "Clark Point",
    "trails_count": 15,
    "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/clark-point"
  },
  {
    "id": 2591788,
    "kind": "Campsite",
    "latitude": 37.7329132,
    "longitude": -119.5145932,
    "name": "Little Yosemite Valley Campground",
    "trails_count": 27,
    "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/little-yosemite-valley-campground"
  }
]
"popularity": 99.9951
"primary_trailhead_id": 10054970
"private_property": false
"rating": 4.9
"recordings": 29812
"reviews": 19043
"route_type": "out_and_back"
"slug": "trail/us/california/half-dome-via-the-john-muir-trail-jmt"
"state": {
  "id": 5,
  "name": "California"
}
"text_reviews": 5175
"url": "https://www.alltrails.com/trail/us/california/half-dome-via-the-john-muir-trail-jmt"
"verified_map_id": 183577246
"visitor_usage": 4

Response result

Response structure

Inferred from examples
  • activitiesstring[]
  • alert_idsinteger[]
  • alertsobject[]
    • applies_tostring
    • applies_to_idinteger
    • idinteger
    • titlestring
    • typestring
  • cachedboolean
  • cityobject
    • idinteger
    • namestring
    • urlstring
  • closedboolean
  • collectionsstring[]
  • countryobject
    • idinteger
    • namestring
  • created_atstring
  • credits_usedinteger
  • descriptionstring
  • difficultystring
  • difficulty_ratinginteger
  • elevation_gain_ftinteger
  • elevation_gain_minteger
  • featured_photo_idsinteger[]
  • featuresstring[]
  • fetched_atstring
  • highest_point_minteger
  • idinteger
  • latitudenumber
  • length_kmnumber
  • length_minteger
  • length_miinteger
  • locationstring
  • longitudenumber
  • monthly_popularityobject
    • month_1integer
    • month_10integer
    • month_11integer
    • month_12integer
    • month_2integer
    • month_3integer
    • month_4integer
    • month_5integer
    • month_6integer
    • month_7integer
    • month_8integer
    • month_9integer
  • namestring
  • parkobject
    • idinteger
    • namestring
    • urlstring
  • photostring
  • photosinteger
  • points_of_interestobject[]
    • idinteger
    • kindstring
    • latitudenumber
    • longitudenumber
    • namestring
    • trails_countinteger
    • urlstring
  • popularitynumber
  • primary_trailhead_idinteger
  • private_propertyboolean
  • ratingnumber
  • recordingsinteger
  • reviewsinteger
  • route_typestring
  • slugstring
  • stateobject
    • idinteger
    • namestring
  • text_reviewsinteger
  • urlstring
  • verified_map_idinteger
  • visitor_usageinteger

Sellers

SellerPricingRequests · 30dPerformanceAccess
apishCurrent
AllTrails trail API · GET · View API reference
$0.002 / billing credit—
—successP50—
Loading...
Selected pricing · apishUSD / billing credit
Pricing
$0.002

Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.

Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 2. Price update time: not supplied.

API

Method
GET
Endpoint
https://api.openany.si/v1/agent-apis/apish/alltrails/v1/trail
Content type
application/json
Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
  'https://api.openany.si/v1/agent-apis/apish/alltrails/v1/trail?id=10005585&output=json&raw=0' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
idURL query parametersquerystringYesTrail id (e.g. `10005585`) or its alltrails.com/trail/ link.
rawURL query parametersquerystringNo0 leaves out the bulky `raw` source blocks (often 10-30x smaller).

enum: "0", "1"

fieldsURL query parametersquerystringNoComma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.
freshURL query parametersquerystringNo1 skips the 24-hour cache and fetches live.

enum: "1"

outputURL query parametersquerystringNoJSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.

enum: "json"

recordsURL query parametersquerystringNoWith output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.

Required markers inside a nested object or variant apply when that object or variant is used.

Sample response

Sample response · Documented HTTP 200 Example from the provider's documentation. Field values in your results will differ.

Official example · Live API.SH response · Minimal request
{
  "activities": [
    "camping",
    "hiking",
    "rock-climbing",
    "via-ferrata"
  ],
  "alert_ids": [
    171,
    20017,
    20019,
    41302
  ],
  "alerts": [
    {
      "applies_to": "geo",
      "applies_to_id": 94876,
      "id": 41302,
      "title": "Access information",
      "type": "info"
    },
    {
      "applies_to": "geo",
      "applies_to_id": 64190,
      "id": 20019,
      "title": "Seasonal Closure",
      "type": "warning"
    },
    {
      "applies_to": "geo",
      "applies_to_id": 64188,
      "id": 20017,
      "title": "Seasonal road closure",
      "type": "warning"
    },
    {
      "applies_to": "area",
      "applies_to_id": 10106838,
      "id": 171,
      "title": "General fee",
      "type": "info"
    }
  ],
  "cached": false,
  "city": {
    "id": 1036,
    "name": "Yosemite Valley",
    "url": "https://www.alltrails.com/us/california/yosemite-valley"
  },
  "closed": false,
  "collections": [
    "waterfalls",
    "trending",
    "views",
    "trees",
    "rivers",
    "wildflowers"
  ],
  "country": {
    "id": 313,
    "name": "United States"
  },
  "created_at": "2020-02-13T23:08:35.000Z",
  "credits_used": 1,
  "description": "Half Dome is a serious endurance hike taking you 4,800 feet above the Yosemite Valley to spectacular views of Vernal and Nevada Falls, Liberty Cap, the Yosemite Valley, and the High Sierra. This is one of Yosemite National Park’s most iconic hikes. You must obtain a permit to hike to the summit of Half Dome. \n\nPreparation and safety are key to having a fantastic experience. This hike requires you to be in good shape. Most people take 10 to 12 hours to hike to Half Dome and back, depending on the way you choose to come down. Plan to leave around sunrise (or earlier) and then have a non-negotiable turnaround time. The trail is fairly well marked, but make sure to watch for all trail signs, as it can be easy to miss them.\n\nThe elevation gain is very strenuous, starting with a steep climb to Vernal Falls, followed by another steep climb to the top of Nevada Falls. There is about 1 mile of fairly level hiking before reaching Little Yosemite Campground, followed by steep switchbacks through the forest. At about 7 miles into your trip, you’ll reach a break in the trees with a beautiful view of Half Dome and the valley below. Some steep switchbacks carved like stairs into the rock guide the way up to the top of what is known as Sub Dome. Once you walk across the rocky surface of Sub Dome, you’ll arrive at the base of the cables with only 400 feet to go. These last 400 feet are the most challenging, but also the most rewarding (although you may not realize it until you are comfortably back on the valley floor).\n\nThe part of this journey that makes the ascent up Half Dome famous is the cable route. Two steel cables allow hikers to climb the last 400 feet to the summit without rock climbing equipment. The cables are around a 45-55 degree angle, with wooden supports every 10 to 20 feet to rest and maintain your balance. Using gloves is highly recommended to get a better grip and avoid painful blisters. Some choose to bring a harness, carabiners, and slings to secure themselves to the cables as they ascend for extra safety. Be sure to tightly secure your water bottles and cameras for the climb up because you will want them once at the top. Once you have reached the summit, take the time to rest for a while and take in the incredible panoramic views. The Half Dome cables usually go up the Friday before Memorial Day (conditions permitting) and come down the day after Columbus Day.\n\nCompared to the hike up, the return journey flies by, and before you know it, you will be back at the top of Nevada Falls. You have 2 options here: the Mist Trail, which is how you came up, is about 3.4 miles (5.5km), or the John Muir Trail for a slight change of scenery (about 0.5 miles further). The waterfalls suddenly seem much more pleasant as you hike down compared to the earlier climb, and it's hard to hold back a smile as you reach the Vernal Falls footbridge, where you can refill your water (there are also facilities here). About 30 minutes later, you are back at the trailhead, where you can catch a free shuttle to your car or anywhere else in the valley (there is a concession stand near the bus stop where you can buy cold drinks and ice cream).",
  "difficulty": "strenuous",
  "difficulty_rating": 7,
  "elevation_gain_ft": 5101,
  "elevation_gain_m": 1555,
  "featured_photo_ids": [
    142189574,
    138049937,
    138375534,
    136478525,
    138222719,
    132845901,
    140608439,
    130420354,
    131519589,
    134980006
  ],
  "features": [
    "forest",
    "river",
    "views",
    "waterfall",
    "wild-flowers",
    "wildlife",
    "dogs-no"
  ],
  "fetched_at": "2026-11-19T12:28:32.819Z",
  "highest_point_m": 2691,
  "id": 10005585,
  "latitude": 37.73282,
  "length_km": 27.36,
  "length_m": 27359,
  "length_mi": 17,
  "location": "Yosemite National Park, California",
  "longitude": -119.55778,
  "monthly_popularity": {
    "month_1": 105,
    "month_10": 2195,
    "month_11": 402,
    "month_12": 96,
    "month_2": 98,
    "month_3": 213,
    "month_4": 483,
    "month_5": 1855,
    "month_6": 3387,
    "month_7": 3293,
    "month_8": 3448,
    "month_9": 3642
  },
  "name": "Half Dome via the John Muir Trail (JMT)",
  "park": {
    "id": 10106838,
    "name": "Yosemite National Park",
    "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"
  },
  "photo": "https://images.alltrails.com/eyJidWNrZXQiOiJhc3NldHMuYWxsdHJhaWxzLmNvbSIsImtleSI6InVwbG9hZHMvcGhvdG8vaW1hZ2UvMTMxMTA3MDI5L2NkNmU2MzNmOGI1MmEwMjgzYmM4MzA3MWNkY2NhOGZmLmpwZyIsImVkaXRzIjp7InRvRm9ybWF0IjoianBlZyIsInJlc2l6ZSI6eyJ3aWR0aCI6MTIwMCwiaGVpZ2h0IjoxMjAwLCJmaXQiOiJpbnNpZGUifX19",
  "photos": 63583,
  "points_of_interest": [
    {
      "id": 2817652,
      "kind": "Peak",
      "latitude": 37.7466921,
      "longitude": -119.5299035,
      "name": "Subdome",
      "trails_count": 9,
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/subdome"
    },
    {
      "id": 51434,
      "kind": "Peak",
      "latitude": 37.7460015,
      "longitude": -119.5332525,
      "name": "Half Dome",
      "trails_count": 9,
      "url": "https://www.alltrails.com/poi/us/california/half-dome"
    },
    {
      "id": 440415,
      "kind": "River",
      "latitude": 37.6676817,
      "longitude": -119.5026659,
      "name": "Illilouette Creek",
      "trails_count": 44,
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/illilouette-creek"
    },
    {
      "id": 511712,
      "kind": "Cliff",
      "latitude": 37.7240288,
      "longitude": -119.5454248,
      "name": "Panorama Cliff",
      "trails_count": 24,
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/panorama-cliff"
    },
    {
      "id": 2777669,
      "kind": "Valley",
      "latitude": 37.727009,
      "longitude": -119.5410729,
      "name": "Giant Staircase",
      "trails_count": 38,
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/giant-staircase"
    },
    {
      "id": 289851,
      "kind": "Valley",
      "latitude": 37.7321974,
      "longitude": -119.5166499,
      "name": "Little Yosemite Valley",
      "trails_count": 29,
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/little-yosemite-valley"
    },
    {
      "id": 41104,
      "kind": "Waterfall",
      "latitude": 37.7249029,
      "longitude": -119.5333639,
      "name": "Nevada Fall",
      "trails_count": 34,
      "url": "https://www.alltrails.com/poi/us/california/nevada-fall"
    },
    {
      "id": 2098729,
      "kind": "Valley",
      "latitude": 37.7430033,
      "longitude": -119.5945649,
      "name": "Yosemite Valley",
      "trails_count": 68,
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/yosemite-valley"
    },
    {
      "id": 989011,
      "kind": "Viewpoint",
      "latitude": 37.7250163,
      "longitude": -119.5450118,
      "name": "Clark Point",
      "trails_count": 15,
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/clark-point"
    },
    {
      "id": 2591788,
      "kind": "Campsite",
      "latitude": 37.7329132,
      "longitude": -119.5145932,
      "name": "Little Yosemite Valley Campground",
      "trails_count": 27,
      "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/little-yosemite-valley-campground"
    }
  ],
  "popularity": 99.9951,
  "primary_trailhead_id": 10054970,
  "private_property": false,
  "rating": 4.9,
  "recordings": 29812,
  "reviews": 19043,
  "route_type": "out_and_back",
  "slug": "trail/us/california/half-dome-via-the-john-muir-trail-jmt",
  "state": {
    "id": 5,
    "name": "California"
  },
  "text_reviews": 5175,
  "url": "https://www.alltrails.com/trail/us/california/half-dome-via-the-john-muir-trail-jmt",
  "verified_map_id": 183577246,
  "visitor_usage": 4
}

Composite rule pricing

Calculated from input parameters and actual returned quantities. Estimate the maximum cost before calling.

Base fee: $0.000000. One matching variant replaces the base fee. Matching add-ons and quantity charges are added.

Fee itemPriceMetering sourceWhenQuantity limit
Actual API.SH credits consumed$0.002000 / billing creditResponse · /credits_used · Numeric valueAlways1 billing credit · Decimal places: 0

Each quantity charge is rounded before summing: ceil. Requests exceeding this cost limit are rejected; it is not a price cap: $0.002000.

Response quantities settle after the response. Before execution, the maximum quantity determines the reservation; unused reservation is released. Missing or invalid quantities are not treated as zero.

Pricing parameters and defaults
[]

Agent integration

Copy the resource contract without sharing an API key.

View API Markdown
API Markdown
# AllTrails trail API

Use the AllTrails trail API to retrieve review counts, equipment and features, difficulty levels, geographic coordinates, collection contents and record identities and titles as structured JSON from AllTrails. Supply record identifier in the query. Use these results to compare route characteristics and organize trail reference material when planning an outdoor itinerary. The documented source-page link form identifies the requested entry directly and lets you reuse an existing source-page reference. The detail page includes parameter definitions, paired request and response examples, and usage pricing for this operation.
## Available implementations
apish · AllTrails trail API: https://openany.si/markets/apis/capabilities/alltrails-trail-api?offering=fe8fce5e-9ec3-4233-b6aa-f2544d59cb93 · $0.002 / billing credit

## Selected API contract
Documentation: https://openany.si/markets/apis/capabilities/alltrails-trail-api
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/alltrails/v1/trail
Price: $0.002 / billing credit
Provider: apish
Contract revision: 2
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.

Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.

## Prepared request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/alltrails/v1/trail?id=10005585&output=json&raw=0' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## API contract
```json
{
  "resource_type": "api",
  "name": "AllTrails trail API",
  "endpoint": "https://api.openany.si/v1/agent-apis/apish/alltrails/v1/trail",
  "method": "GET",
  "content_type": "none",
  "execution_mode": "sync",
  "authentication": {
    "type": "bearer",
    "environment_variable": "OPENANY_API_KEY"
  },
  "inputs": [
    {
      "description": "Trail id (e.g. `10005585`) or its alltrails.com/trail/ link.",
      "location": "query",
      "name": "id",
      "nullable": false,
      "required": true,
      "type": "string"
    },
    {
      "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
      "enum_values": [
        "0",
        "1"
      ],
      "location": "query",
      "name": "raw",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.",
      "location": "query",
      "name": "fields",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "1 skips the 24-hour cache and fetches live.",
      "enum_values": [
        "1"
      ],
      "location": "query",
      "name": "fresh",
      "nullable": false,
      "required": false,
      "type": "string"
    },
    {
      "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
      "enum_values": [
        "json"
      ],
      "location": "query",
      "name": "output",
      "nullable": false,
      "required": false,
      "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.",
      "location": "query",
      "name": "records",
      "nullable": false,
      "required": false,
      "type": "string"
    }
  ],
  "billing": {
    "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": []
    }
  },
  "examples": [
    {
      "http_status": 200,
      "name": "Official example · Live API.SH response · Minimal request",
      "request": {
        "body": null,
        "headers": {},
        "path": {},
        "query": {
          "id": "10005585",
          "output": "json",
          "raw": "0"
        }
      },
      "response_body": {
        "activities": [
          "camping",
          "hiking",
          "rock-climbing",
          "via-ferrata"
        ],
        "alert_ids": [
          171,
          20017,
          20019,
          41302
        ],
        "alerts": [
          {
            "applies_to": "geo",
            "applies_to_id": 94876,
            "id": 41302,
            "title": "Access information",
            "type": "info"
          },
          {
            "applies_to": "geo",
            "applies_to_id": 64190,
            "id": 20019,
            "title": "Seasonal Closure",
            "type": "warning"
          },
          {
            "applies_to": "geo",
            "applies_to_id": 64188,
            "id": 20017,
            "title": "Seasonal road closure",
            "type": "warning"
          },
          {
            "applies_to": "area",
            "applies_to_id": 10106838,
            "id": 171,
            "title": "General fee",
            "type": "info"
          }
        ],
        "cached": false,
        "city": {
          "id": 1036,
          "name": "Yosemite Valley",
          "url": "https://www.alltrails.com/us/california/yosemite-valley"
        },
        "closed": false,
        "collections": [
          "waterfalls",
          "trending",
          "views",
          "trees",
          "rivers",
          "wildflowers"
        ],
        "country": {
          "id": 313,
          "name": "United States"
        },
        "created_at": "2020-02-13T23:08:35.000Z",
        "credits_used": 1,
        "description": "Half Dome is a serious endurance hike taking you 4,800 feet above the Yosemite Valley to spectacular views of Vernal and Nevada Falls, Liberty Cap, the Yosemite Valley, and the High Sierra. This is one of Yosemite National Park’s most iconic hikes. You must obtain a permit to hike to the summit of Half Dome. \n\nPreparation and safety are key to having a fantastic experience. This hike requires you to be in good shape. Most people take 10 to 12 hours to hike to Half Dome and back, depending on the way you choose to come down. Plan to leave around sunrise (or earlier) and then have a non-negotiable turnaround time. The trail is fairly well marked, but make sure to watch for all trail signs, as it can be easy to miss them.\n\nThe elevation gain is very strenuous, starting with a steep climb to Vernal Falls, followed by another steep climb to the top of Nevada Falls. There is about 1 mile of fairly level hiking before reaching Little Yosemite Campground, followed by steep switchbacks through the forest. At about 7 miles into your trip, you’ll reach a break in the trees with a beautiful view of Half Dome and the valley below. Some steep switchbacks carved like stairs into the rock guide the way up to the top of what is known as Sub Dome. Once you walk across the rocky surface of Sub Dome, you’ll arrive at the base of the cables with only 400 feet to go. These last 400 feet are the most challenging, but also the most rewarding (although you may not realize it until you are comfortably back on the valley floor).\n\nThe part of this journey that makes the ascent up Half Dome famous is the cable route. Two steel cables allow hikers to climb the last 400 feet to the summit without rock climbing equipment. The cables are around a 45-55 degree angle, with wooden supports every 10 to 20 feet to rest and maintain your balance. Using gloves is highly recommended to get a better grip and avoid painful blisters. Some choose to bring a harness, carabiners, and slings to secure themselves to the cables as they ascend for extra safety. Be sure to tightly secure your water bottles and cameras for the climb up because you will want them once at the top. Once you have reached the summit, take the time to rest for a while and take in the incredible panoramic views. The Half Dome cables usually go up the Friday before Memorial Day (conditions permitting) and come down the day after Columbus Day.\n\nCompared to the hike up, the return journey flies by, and before you know it, you will be back at the top of Nevada Falls. You have 2 options here: the Mist Trail, which is how you came up, is about 3.4 miles (5.5km), or the John Muir Trail for a slight change of scenery (about 0.5 miles further). The waterfalls suddenly seem much more pleasant as you hike down compared to the earlier climb, and it's hard to hold back a smile as you reach the Vernal Falls footbridge, where you can refill your water (there are also facilities here). About 30 minutes later, you are back at the trailhead, where you can catch a free shuttle to your car or anywhere else in the valley (there is a concession stand near the bus stop where you can buy cold drinks and ice cream).",
        "difficulty": "strenuous",
        "difficulty_rating": 7,
        "elevation_gain_ft": 5101,
        "elevation_gain_m": 1555,
        "featured_photo_ids": [
          142189574,
          138049937,
          138375534,
          136478525,
          138222719,
          132845901,
          140608439,
          130420354,
          131519589,
          134980006
        ],
        "features": [
          "forest",
          "river",
          "views",
          "waterfall",
          "wild-flowers",
          "wildlife",
          "dogs-no"
        ],
        "fetched_at": "2026-11-19T12:28:32.819Z",
        "highest_point_m": 2691,
        "id": 10005585,
        "latitude": 37.73282,
        "length_km": 27.36,
        "length_m": 27359,
        "length_mi": 17,
        "location": "Yosemite National Park, California",
        "longitude": -119.55778,
        "monthly_popularity": {
          "month_1": 105,
          "month_10": 2195,
          "month_11": 402,
          "month_12": 96,
          "month_2": 98,
          "month_3": 213,
          "month_4": 483,
          "month_5": 1855,
          "month_6": 3387,
          "month_7": 3293,
          "month_8": 3448,
          "month_9": 3642
        },
        "name": "Half Dome via the John Muir Trail (JMT)",
        "park": {
          "id": 10106838,
          "name": "Yosemite National Park",
          "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"
        },
        "photo": "https://images.alltrails.com/eyJidWNrZXQiOiJhc3NldHMuYWxsdHJhaWxzLmNvbSIsImtleSI6InVwbG9hZHMvcGhvdG8vaW1hZ2UvMTMxMTA3MDI5L2NkNmU2MzNmOGI1MmEwMjgzYmM4MzA3MWNkY2NhOGZmLmpwZyIsImVkaXRzIjp7InRvRm9ybWF0IjoianBlZyIsInJlc2l6ZSI6eyJ3aWR0aCI6MTIwMCwiaGVpZ2h0IjoxMjAwLCJmaXQiOiJpbnNpZGUifX19",
        "photos": 63583,
        "points_of_interest": [
          {
            "id": 2817652,
            "kind": "Peak",
            "latitude": 37.7466921,
            "longitude": -119.5299035,
            "name": "Subdome",
            "trails_count": 9,
            "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/subdome"
          },
          {
            "id": 51434,
            "kind": "Peak",
            "latitude": 37.7460015,
            "longitude": -119.5332525,
            "name": "Half Dome",
            "trails_count": 9,
            "url": "https://www.alltrails.com/poi/us/california/half-dome"
          },
          {
            "id": 440415,
            "kind": "River",
            "latitude": 37.6676817,
            "longitude": -119.5026659,
            "name": "Illilouette Creek",
            "trails_count": 44,
            "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/illilouette-creek"
          },
          {
            "id": 511712,
            "kind": "Cliff",
            "latitude": 37.7240288,
            "longitude": -119.5454248,
            "name": "Panorama Cliff",
            "trails_count": 24,
            "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/panorama-cliff"
          },
          {
            "id": 2777669,
            "kind": "Valley",
            "latitude": 37.727009,
            "longitude": -119.5410729,
            "name": "Giant Staircase",
            "trails_count": 38,
            "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/giant-staircase"
          },
          {
            "id": 289851,
            "kind": "Valley",
            "latitude": 37.7321974,
            "longitude": -119.5166499,
            "name": "Little Yosemite Valley",
            "trails_count": 29,
            "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/little-yosemite-valley"
          },
          {
            "id": 41104,
            "kind": "Waterfall",
            "latitude": 37.7249029,
            "longitude": -119.5333639,
            "name": "Nevada Fall",
            "trails_count": 34,
            "url": "https://www.alltrails.com/poi/us/california/nevada-fall"
          },
          {
            "id": 2098729,
            "kind": "Valley",
            "latitude": 37.7430033,
            "longitude": -119.5945649,
            "name": "Yosemite Valley",
            "trails_count": 68,
            "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/yosemite-valley"
          },
          {
            "id": 989011,
            "kind": "Viewpoint",
            "latitude": 37.7250163,
            "longitude": -119.5450118,
            "name": "Clark Point",
            "trails_count": 15,
            "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/clark-point"
          },
          {
            "id": 2591788,
            "kind": "Campsite",
            "latitude": 37.7329132,
            "longitude": -119.5145932,
            "name": "Little Yosemite Valley Campground",
            "trails_count": 27,
            "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/little-yosemite-valley-campground"
          }
        ],
        "popularity": 99.9951,
        "primary_trailhead_id": 10054970,
        "private_property": false,
        "rating": 4.9,
        "recordings": 29812,
        "reviews": 19043,
        "route_type": "out_and_back",
        "slug": "trail/us/california/half-dome-via-the-john-muir-trail-jmt",
        "state": {
          "id": 5,
          "name": "California"
        },
        "text_reviews": 5175,
        "url": "https://www.alltrails.com/trail/us/california/half-dome-via-the-john-muir-trail-jmt",
        "verified_map_id": 183577246,
        "visitor_usage": 4
      }
    }
  ]
}
```

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect the error and usage record before retrying a paid operation.

Examples

Official example · Live API.SH response · Minimal request

Example from the provider's documentation. Field values in your results will differ.

  1. Prepare your environment

    Use a terminal with cURL installed.

    Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.

    Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.

    Terminal · macOS / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. Run the request

    Paste the complete command below into your terminal.

    Values to replace before running 6

    Review these request fields before running. Keep the published provider and request method unchanged.

    id
    Trail id (e.g. `10005585`) or its alltrails.com/trail/ link.
    raw
    0 leaves out the bulky `raw` source blocks (often 10-30x smaller).
    fields
    Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.
    fresh
    1 skips the 24-hour cache and fetches live.
    output
    JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.
    records
    With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.
    Terminal · cURL
    curl \
      'https://api.openany.si/v1/agent-apis/apish/alltrails/v1/trail?id=10005585&output=json&raw=0' \
      -X GET \
      -H "Authorization: Bearer $OPENANY_API_KEY" \
      -H 'Content-Type: application/json'
  3. Check the response

    Sample response · Documented HTTP 200

    Sample response
    {
      "activities": [
        "camping",
        "hiking",
        "rock-climbing",
        "via-ferrata"
      ],
      "alert_ids": [
        171,
        20017,
        20019,
        41302
      ],
      "alerts": [
        {
          "applies_to": "geo",
          "applies_to_id": 94876,
          "id": 41302,
          "title": "Access information",
          "type": "info"
        },
        {
          "applies_to": "geo",
          "applies_to_id": 64190,
          "id": 20019,
          "title": "Seasonal Closure",
          "type": "warning"
        },
        {
          "applies_to": "geo",
          "applies_to_id": 64188,
          "id": 20017,
          "title": "Seasonal road closure",
          "type": "warning"
        },
        {
          "applies_to": "area",
          "applies_to_id": 10106838,
          "id": 171,
          "title": "General fee",
          "type": "info"
        }
      ],
      "cached": false,
      "city": {
        "id": 1036,
        "name": "Yosemite Valley",
        "url": "https://www.alltrails.com/us/california/yosemite-valley"
      },
      "closed": false,
      "collections": [
        "waterfalls",
        "trending",
        "views",
        "trees",
        "rivers",
        "wildflowers"
      ],
      "country": {
        "id": 313,
        "name": "United States"
      },
      "created_at": "2020-02-13T23:08:35.000Z",
      "credits_used": 1,
      "description": "Half Dome is a serious endurance hike taking you 4,800 feet above the Yosemite Valley to spectacular views of Vernal and Nevada Falls, Liberty Cap, the Yosemite Valley, and the High Sierra. This is one of Yosemite National Park’s most iconic hikes. You must obtain a permit to hike to the summit of Half Dome. \n\nPreparation and safety are key to having a fantastic experience. This hike requires you to be in good shape. Most people take 10 to 12 hours to hike to Half Dome and back, depending on the way you choose to come down. Plan to leave around sunrise (or earlier) and then have a non-negotiable turnaround time. The trail is fairly well marked, but make sure to watch for all trail signs, as it can be easy to miss them.\n\nThe elevation gain is very strenuous, starting with a steep climb to Vernal Falls, followed by another steep climb to the top of Nevada Falls. There is about 1 mile of fairly level hiking before reaching Little Yosemite Campground, followed by steep switchbacks through the forest. At about 7 miles into your trip, you’ll reach a break in the trees with a beautiful view of Half Dome and the valley below. Some steep switchbacks carved like stairs into the rock guide the way up to the top of what is known as Sub Dome. Once you walk across the rocky surface of Sub Dome, you’ll arrive at the base of the cables with only 400 feet to go. These last 400 feet are the most challenging, but also the most rewarding (although you may not realize it until you are comfortably back on the valley floor).\n\nThe part of this journey that makes the ascent up Half Dome famous is the cable route. Two steel cables allow hikers to climb the last 400 feet to the summit without rock climbing equipment. The cables are around a 45-55 degree angle, with wooden supports every 10 to 20 feet to rest and maintain your balance. Using gloves is highly recommended to get a better grip and avoid painful blisters. Some choose to bring a harness, carabiners, and slings to secure themselves to the cables as they ascend for extra safety. Be sure to tightly secure your water bottles and cameras for the climb up because you will want them once at the top. Once you have reached the summit, take the time to rest for a while and take in the incredible panoramic views. The Half Dome cables usually go up the Friday before Memorial Day (conditions permitting) and come down the day after Columbus Day.\n\nCompared to the hike up, the return journey flies by, and before you know it, you will be back at the top of Nevada Falls. You have 2 options here: the Mist Trail, which is how you came up, is about 3.4 miles (5.5km), or the John Muir Trail for a slight change of scenery (about 0.5 miles further). The waterfalls suddenly seem much more pleasant as you hike down compared to the earlier climb, and it's hard to hold back a smile as you reach the Vernal Falls footbridge, where you can refill your water (there are also facilities here). About 30 minutes later, you are back at the trailhead, where you can catch a free shuttle to your car or anywhere else in the valley (there is a concession stand near the bus stop where you can buy cold drinks and ice cream).",
      "difficulty": "strenuous",
      "difficulty_rating": 7,
      "elevation_gain_ft": 5101,
      "elevation_gain_m": 1555,
      "featured_photo_ids": [
        142189574,
        138049937,
        138375534,
        136478525,
        138222719,
        132845901,
        140608439,
        130420354,
        131519589,
        134980006
      ],
      "features": [
        "forest",
        "river",
        "views",
        "waterfall",
        "wild-flowers",
        "wildlife",
        "dogs-no"
      ],
      "fetched_at": "2026-11-19T12:28:32.819Z",
      "highest_point_m": 2691,
      "id": 10005585,
      "latitude": 37.73282,
      "length_km": 27.36,
      "length_m": 27359,
      "length_mi": 17,
      "location": "Yosemite National Park, California",
      "longitude": -119.55778,
      "monthly_popularity": {
        "month_1": 105,
        "month_10": 2195,
        "month_11": 402,
        "month_12": 96,
        "month_2": 98,
        "month_3": 213,
        "month_4": 483,
        "month_5": 1855,
        "month_6": 3387,
        "month_7": 3293,
        "month_8": 3448,
        "month_9": 3642
      },
      "name": "Half Dome via the John Muir Trail (JMT)",
      "park": {
        "id": 10106838,
        "name": "Yosemite National Park",
        "url": "https://www.alltrails.com/parks/us/california/yosemite-national-park"
      },
      "photo": "https://images.alltrails.com/eyJidWNrZXQiOiJhc3NldHMuYWxsdHJhaWxzLmNvbSIsImtleSI6InVwbG9hZHMvcGhvdG8vaW1hZ2UvMTMxMTA3MDI5L2NkNmU2MzNmOGI1MmEwMjgzYmM4MzA3MWNkY2NhOGZmLmpwZyIsImVkaXRzIjp7InRvRm9ybWF0IjoianBlZyIsInJlc2l6ZSI6eyJ3aWR0aCI6MTIwMCwiaGVpZ2h0IjoxMjAwLCJmaXQiOiJpbnNpZGUifX19",
      "photos": 63583,
      "points_of_interest": [
        {
          "id": 2817652,
          "kind": "Peak",
          "latitude": 37.7466921,
          "longitude": -119.5299035,
          "name": "Subdome",
          "trails_count": 9,
          "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/subdome"
        },
        {
          "id": 51434,
          "kind": "Peak",
          "latitude": 37.7460015,
          "longitude": -119.5332525,
          "name": "Half Dome",
          "trails_count": 9,
          "url": "https://www.alltrails.com/poi/us/california/half-dome"
        },
        {
          "id": 440415,
          "kind": "River",
          "latitude": 37.6676817,
          "longitude": -119.5026659,
          "name": "Illilouette Creek",
          "trails_count": 44,
          "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/illilouette-creek"
        },
        {
          "id": 511712,
          "kind": "Cliff",
          "latitude": 37.7240288,
          "longitude": -119.5454248,
          "name": "Panorama Cliff",
          "trails_count": 24,
          "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/panorama-cliff"
        },
        {
          "id": 2777669,
          "kind": "Valley",
          "latitude": 37.727009,
          "longitude": -119.5410729,
          "name": "Giant Staircase",
          "trails_count": 38,
          "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/giant-staircase"
        },
        {
          "id": 289851,
          "kind": "Valley",
          "latitude": 37.7321974,
          "longitude": -119.5166499,
          "name": "Little Yosemite Valley",
          "trails_count": 29,
          "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/little-yosemite-valley"
        },
        {
          "id": 41104,
          "kind": "Waterfall",
          "latitude": 37.7249029,
          "longitude": -119.5333639,
          "name": "Nevada Fall",
          "trails_count": 34,
          "url": "https://www.alltrails.com/poi/us/california/nevada-fall"
        },
        {
          "id": 2098729,
          "kind": "Valley",
          "latitude": 37.7430033,
          "longitude": -119.5945649,
          "name": "Yosemite Valley",
          "trails_count": 68,
          "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/yosemite-valley"
        },
        {
          "id": 989011,
          "kind": "Viewpoint",
          "latitude": 37.7250163,
          "longitude": -119.5450118,
          "name": "Clark Point",
          "trails_count": 15,
          "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/clark-point"
        },
        {
          "id": 2591788,
          "kind": "Campsite",
          "latitude": 37.7329132,
          "longitude": -119.5145932,
          "name": "Little Yosemite Valley Campground",
          "trails_count": 27,
          "url": "https://www.alltrails.com/poi/us/california/yosemite-valley/little-yosemite-valley-campground"
        }
      ],
      "popularity": 99.9951,
      "primary_trailhead_id": 10054970,
      "private_property": false,
      "rating": 4.9,
      "recordings": 29812,
      "reviews": 19043,
      "route_type": "out_and_back",
      "slug": "trail/us/california/half-dome-via-the-john-muir-trail-jmt",
      "state": {
        "id": 5,
        "name": "California"
      },
      "text_reviews": 5175,
      "url": "https://www.alltrails.com/trail/us/california/half-dome-via-the-john-muir-trail-jmt",
      "verified_map_id": 183577246,
      "visitor_usage": 4
    }

Common questions

Do I need a separate key for every provider?

Use your OpenAny API key for standard API access. Read it from OPENANY_API_KEY in your environment and keep it out of prompts, source code and logs.

Are these providers interchangeable?

No. Each offering has its own inputs, pricing and response contract. Selecting a catalog offering does not establish automatic routing or fallback. Confirm the service contract before calling.

How is this API billed?

API-key calls use your shared balance at the selected implementation's published rate. Check the billing unit and request-specific pricing rules before making a paid call. Recorded usage determines the final charge under that contract.

Where do the price and contract come from?

The selected implementation publishes its provider, request contract, revision and billing rules through OpenAny's public API catalog. A revision number identifies a contract version, not a price update date. A price update timestamp is not supplied; do not treat a page date as one.

How do OpenAny Balance and x402 differ?

OpenAny Balance uses an API key and one shared balance. Card, USDC and x402 top-ups, card auto top-up and USDC subscriptions fund that balance; available routes appear on the Credits page. Direct x402 is a separate pay-per-request flow, available only on listings that show it and requiring an authorized payment client.

Does Playground send a paid request?

Yes. After you sign in, Run sends a real API request using an active OpenAny API key. Charges follow the published API contract and use your shared balance. Selecting an implementation, editing inputs and viewing sample responses do not send requests.

Use AllTrails trail API with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.