RapidAPI logo

Sign Up

Log In

TrailAPI

FREEMIUM
By trailapi
Updated 3 months ago
Travel
8.5/10
Popularity Score
271ms
Latency
99%
Success Rate

TrailAPI API Documentation

Information and photos for tens of thousands of outdoor recreation locations including hiking and mountain biking trails, campgrounds, ski resorts, ATV trails, and more.

View API Details
Bike Trails
GETFind Bike Trails
GETBike Trail Info
GETTrail Map List
GETMap GPX
General
GETOutdoors (Legacy)
GET
Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Request Snippet
unirest.("https://trailapi-trailapi.p.rapidapi.com")
.header("X-RapidAPI-Host", "trailapi-trailapi.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.("https://trailapi-trailapi.p.rapidapi.com")
.header("X-RapidAPI-Host", "trailapi-trailapi.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication