NYC Subway Data

FREE
By mimouncadosch
Updated 5 months ago
0.9/10
Popularity Score
8104ms
Latency
100%
Success Rate

NYC Subway Data API Documentation

No description.

View API Details
GETTimes
GETArrival times
GETSubway station codes
GETSubway station data
GETTimes

This endpoint provides all subway stations where a train is stopping at the time specified

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
hourNUMBER
REQUIRED
minuteNUMBER
REQUIRED
Code Snippet
unirest.get("https://community-nyc-subway-data.p.rapidapi.com/times?hour=10&minute=25")
.header("X-RapidAPI-Host", "community-nyc-subway-data.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-nyc-subway-data.p.rapidapi.com/times
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-nyc-subway-data.p.rapidapi.com/times?hour=10&minute=25")
.header("X-RapidAPI-Host", "community-nyc-subway-data.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