The folks at Singletracks.com have exposed their trail data via a public JSON API so you can create your own trail data mashups. I wish I had some time to play with this and describe its usage, but I don’t so I’ll just repeat part of the announcement for now:
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.
The TrailAPI announcement has a couple of examples. They provide a temporary developer’s key, or you can sign up and get your own key. The API is currently read only. Although Jeff @ Singletracks says they’re working on adding a trail submission capability, there’s not yet a way to add a trail so you cannot, for example, grab your Strava data and dump them to Singletracks. Singletracks’ database also does not contain detailed GPS cooridnates for the entire trail; it just gives you approximate lat / long coordinates for the trailhead.
The sample apps demonstrate API usage. If you know JSON, the examples are very straightforward. I can picture a mashup where you combine, say, the TrailAPI with the Google Earth API to pull up a 3D preview of the trailhead, and then combine that with one of the map direction API’s from Google, Yahoo, or MapQuest to generate directions to the trailhead.
TrailAPI.com right here, so go have a ball.