/ trailapi

Discussions

19
All
Questions
Answers
Newest
A
1
It doesn't look like you are sending the required 'x-rapidapi-key' header. Be sure to check out the RapidAPI examples like this one: const settings = { "async": true, "crossDomain": true, "url": "https://trailapi-trailapi.p.rapidapi.com/trails/map/%7Bid%7D/gpx/", "method": "GET", "headers": { "x-rapidapi-key": "YOUR_API_KEY", "x-rapidapi-host": "trailapi-trailapi.p.rapidapi.com" } }; $.ajax(settings).done(function (response) { console.log(response); });
Wed 1:05 7/7/21
A
1
Unfortunately that's not currently possible but it's something we may consider adding in the future.
Wed 1:00 7/7/21
A
1
For bike trails, you'll want to first use the 'find' endpoint to get a list of trail IDs based on a location. The results of that query will include trail IDs along with some basic info about the trail. For more detailed info about a trail, you can send the ID from the 'find' query to the 'info' endpoint. You should not be scraping a range of trail IDs.
Wed 12:58 7/7/21
A
2
Check to make sure you are using the correct key, and that you are sending it properly via your script.
Mon 12:56 10/5/21
A
4
Not that we know of. What is the url you're using to query?
Fri 7:05 30/4/21
A
4
The trailhead coordinates are included in the response, when available at the "place" level. Here is a sample response. In this example, you'll note the mountain bike activity info includes an attribute called "length" plus a thumbnail image, and a rating (on a scale of 1-5, 1 being bad, 5 being great.) Depending on the activity type, there are different attributes included. { places: [ { city: "Avon", state: "Colorado", country: "United States", name: "Beaver Creek Ski Resort", parent_id: null, unique_id: 721, directions: "From Denver, take I-70 West to exit 167, Avon. Follow the signs to the Beaver Creek Ski resort. There is no parking once you're up the mountain so be sure to make arrangements.", lat: 39.63121, lon: -106.52535, description: null, date_created: null, children: [ ], activities: [ { name: "Beaver Creek Ski Resort", unique_id: "1-711", place_id: 721, activity_type_id: 5, activity_type_name: "mountain biking", url: "http://www.singletracks.com/bike-trails/beaver-creek-ski-resort.html", attribs: {"length": ""5""}, description: "There are tons of trails here but only a few are serviced by the summer lift. If you are in great shape (or too cheap to buy a ticket), skip the lift and ride up the mountain (all 2000 vertical feet). The "Blue" trails are the singletrack options and they can be pretty challenging for most riders. The singletrack was mostly washed out and very rooty and steep in sections. If you choose the "Green" trails, be prepared to take the road all the way to the bottom. Overall, not one of the best lift serviced downhills available. Go to Keystone instead (although the scenery is tough to beat).", length: 5, activity_type: { created_at: "2012-08-15T16:12:35Z", id: 5, name: "mountain biking", updated_at: "2012-08-15T16:12:35Z" }, thumbnail: "http://www.singletracks.com/images/uploads/2011/07/IMG_0416-0-thumb.jpg", rank: null, rating: 3.8 }, { ... }, { ... }, { ... }, { ... } ] }, { ... } ] }
Fri 5:52 21/7/17