Introducing TrailAPI

A few months back we quietly rolled out a data service called TrailAPI, offering developers access to many parts of the Singletracks trail database. TrailAPI also integrates data from other outdoor websites in our network with thousands of campgrounds, hiking trails, and even trail running spots in the US and Canada. If you’re not a …

A few months back we quietly rolled out a data service called TrailAPI, offering developers access to many parts of the Singletracks trail database. TrailAPI also integrates data from other outdoor websites in our network with thousands of campgrounds, hiking trails, and even trail running spots in the US and Canada.

If you’re not a developer-type, here’s the takeaway: TrailAPI allows people to build cool websites and apps using the extensive trail information contained in the Singletracks trail database. Got a cool idea for using the Singletracks trail data but don’t know how to build a website? Tell us about your idea in the comments!

For those who are willing to get their hands dirty, TrailAPI serves up basic information for every trail in the catalog: name, lat/lon, description, directions, rating, photo, length (miles), city, state, and country. You can build queries based on location, activity, length, or place name and all results are returned in JSON format. Today there are more than 16,000 trails, campgrounds, and ski resorts available within the data service and we’re adding hundreds more each month.

We put together a few basic examples over on the TrailAPI website to help developers get started. In one example, we build a photo collage (below) based on outdoor photos within a state. And in another example, we place pins on a Google Map showing outdoor recreation areas within a given search radius. In each case, just a few lines of code brings the entire Singletracks trail database to your website!

Photo collage example.

We’re even using TrailAPI on singletracks to show links to campgrounds close to mountain bike trails (for example, at the bottom of this page).  And on Tripleblaze.com we’re using TrailAPI to give us links to outdoor activities like hiking and biking near campgrounds.

So if you have an idea for a website or app that uses mountain bike trail information, TrailAPI can help you get started! Once you build your site, we’d love to hear about it–hit up the comments here and we’ll feature some of the most interesting TrailAPI sites we come across this spring. Happy trails!