

NYC Subway Data REST API - mpcadosch
http://nycpulse.herokuapp.com/api

======
rkuykendall-com
App request: Android app, I enter "my" subway stops and the direction I take
them ( Ex: The 1 train, uptown, from 116th ), the App simply shows me how many
minutes until the next train.

I want something I can quickly open and glance at to know when I should leave,
or if I should be sprinting to the station to save myself 20m late at night.

1 minute mock up:

[http://rkuykendall.com/uploads/subway-app-mock-
up.jpg](http://rkuykendall.com/uploads/subway-app-mock-up.jpg)

~~~
aerialfish
The arrival times listed on the website are likely just timetable times. Until
the MTA releases real time data, I wouldn't depend too heavily on scheduled
train times (especially during rush hour).

~~~
jansanchez
The MTA already provides real time data for the numbered lines [1] and some
buses [2].

[1] [http://datamine.mta.info/](http://datamine.mta.info/) [2]
[http://bustime.mta.info/wiki/Developers/Index](http://bustime.mta.info/wiki/Developers/Index)

~~~
mpcadosch
They do, but it's GTFS format...

~~~
beggi
What's so horrifying about the GTFS format?

------
artursapek
What would really be interesting to play with is the real-time location of
each train. The MTA must have it. I wish they would publish it somehow.

I'd love to build a city-wide visualization of the train traffic that shows
where it's backing up, where it's flowing smoothly, etc. It probably wouldn't
be very useful for me as an NYC commuter, but purely as a visualization it
would really be something.

~~~
kchoudhu
They do have real time information for the A-division (numbered trains). The
B-division trains are, however, a dogs breakfast with no central monitoring or
dispatch. There are plans afoot to spend a couple of billion dollars to
perform a dispatch upgrade for BDiv -- but given the generally strapped nature
of the MTA, I wouldn't hold my breath for the information to be made available
anytime soon.

~~~
jrockway
Sort of. The 7 is A division and has no data, and the L is B division and has
data.

Plus, who needs realtime train position data when you can just listen for
those helpful manual announcements like "An uptown express train is
approaching W 4th St."

------
Ryel
I've tried almost every NYC subway/bus app and I've finally given up. They're
all fairly useless IMO. I'd rather just wait 5 minutes for the next train than
bother with any of the current apps.

That being said, I wish Google would take on the challenge and include subway
info.

\- If somebody made a NYC transit app that I actually felt comfortable relying
on... I would love push notifications ASAP of when my frequented trains/buses
are down. I always forget to check the night before so please just tell me and
make it relevant.

-Also I really want a detailed map of NYC that I can view offline but it needs to be lightning fast.

After all the frustration dealing with those apps, a couple months ago I
finally decided to buy a paper map of NYC and start memorizing all that I can.
I feel a bit more liberated and a little more like a NYC aficionado (snob).

------
mpcadosch
Hi guys, my initial project was to build a visualization like the one
@artursapek describes, and ended up making this API because the MTA doesn't
have one.

Totally agree that it would be really cool.

I made this nycpulse.herokuapp.com, but it could be so much cooler.

~~~
parm289
Any plans to open source the code?

~~~
mpcadosch
[https://github.com/mimouncadosch/MTA-
API](https://github.com/mimouncadosch/MTA-API)

~~~
parm289
Awesome, thanks.

------
JulianWasTaken
Nice work.

I'm not sure how I interpret that arrivals say that a train arrives at my
station at 8:42:30 and 8:43:00 (within 30 seconds of each other. Also I've
never seen a train arrive at either of those times :). So I wonder how
accurate the arrival times are in general.

(P.S. It'd be nice if arrivals was sorted in the response, not sure if that's
an artifact of the way this is parsed from the data source or not).

~~~
mpcadosch
Thanks :) Which station are you?

I couldn't find one with a 30 second interval.

~~~
JulianWasTaken
[http://mtaapi.herokuapp.com/api?id=D38S](http://mtaapi.herokuapp.com/api?id=D38S)

------
parm289
For those of you on iOS looking for a polished transit app with support for
multiple cities, I highly recommend Transit.[0] It allows you to quickly map
trips as well as easily save data for offline access.

[0]: [http://thetransitapp.com](http://thetransitapp.com)

------
mpcadosch
"The arrival times listed on the website are likely just timetable times.
Until the MTA releases real time data"

@aerialfish you are correct, this data is taken from timetables, as the MTA
does not release real-time data. But it is probably very close

~~~
jansanchez
They do for the numbered lines:
[http://datamine.mta.info/](http://datamine.mta.info/)

------
Buetol
App request too: I would like an application that wake me up 5 minutes before
my stop.

~~~
jarjar500
currently working on this. :)

------
mpcadosch
As promised, open source: [https://github.com/mimouncadosch/MTA-
API](https://github.com/mimouncadosch/MTA-API)

Feel free to make it better :)

------
mpweiher
How is GTFs "..not particularly useful for developers"? I played around with
it a little and found it to be perfectly usable/useful comma-separated values.

~~~
dalek2point3
+! GTFS is super awesome and most apps I know rely on it. Its consistent
format that is adopted by transit systems across the globe. couldnt get more
developer friendly than that. If you developed with this RESTful API, it would
be hard to adapt your app to use the feed for a different city.

------
fsk
It has everything but what I was looking for, a notification of when a line is
delayed.

------
kbar13
is this open source?

~~~
mpcadosch
It's not yet, but will be soon :)

