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 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!

Related posts:

  1. Introducing the Singletracks Co-op: Earn Free Topo Map Access
  2. Introducing Bob_the_Builder… Trail Builder
  3. Introducing POC Helmets & Body Armor
  4. Introducing Joyride 150 Indoor Bike Park: Opening Dec 14, 2009
  5. Introducing our Senior Bike Editor

6 thoughts on “Introducing TrailAPI

  1. Pretty cool stuff, but your photo example gives an error and the other example crashes Firefox and Chrome because of too much recursion errors.

    Photo error: ReferenceError: preventDefault is not defined.

    Try e.preventDefault() in conjunction with $(‘#loc_link’).click(function(e) instead.

  2. Super cool, I didn’t even know that this existed.

    Is there any further documentation on how to use TrailAPI? I would love to see if I can’t implement it with TexasMountainBikeTrails.com to help cover some of the trails I haven’t been able to leave reviews on yet.

Leave a Reply