TransitFeeds

FREE
By hendx
Updated 5 months ago
Data
1.4/10
Popularity Score
711ms
Latency
100%
Success Rate

TransitFeeds API Documentation

An extensive collection of official public transit data from around the world, including GTFS, GTFS-RealTime and more.

View API Details
GETgetFeedVersions
GETgetLatestFeedVersion
GETgetFeedVersions

Retrieve a list of feed versions. This list can be filtered by a number of input parameters

Authorization:

description

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
keyQUERY
REQUIREDYou can generate your key here http://transitfeeds.com/api/keys
Optional Parameters
feedSTRING
OPTIONALRestrict results to to the given feed ID
pageSTRING
OPTIONALThe page of results to return
Code Snippet
unirest.get("https://community-transitfeeds.p.rapidapi.com/getFeedVersions?feed=sfmta%2F60")
.header("X-RapidAPI-Host", "community-transitfeeds.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://community-transitfeeds.p.rapidapi.com/getFeedVersions
Request Method: GET
Response Headers
Response Body

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.get("https://community-transitfeeds.p.rapidapi.com/getFeedVersions?feed=sfmta%2F60")
.header("X-RapidAPI-Host", "community-transitfeeds.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication