Subway departures
One row each time a train leaves a station, recorded live from the MTA's subway feeds since October 2026.
- Rows
- 398,192
- Size
- 7.5 MB
- Covers
- 2026-10-04 onward
- Updated
- Daily
- Source
- MTA subway GTFS-realtime feeds
- License
- CC BY 4.0
https://data.transitlab.nyc/v1/subway_stop_events/year=YYYY/month=MM/YYYY-MM-DD.parquetRows and size from catalog.json, 2026-10-06.
What a row is
Section titled “What a row is”One train leaving one station. Every 10 seconds our collector reads the MTA’s eight subway feeds. Each feed lists, for every train, the stops it has yet to make. When a stop drops off a train’s list, the train has just left it, and we write a row with departed_at set to the feed time of that snapshot.
When a whole trip vanishes from the feed, its remaining stops get rows with event = 'trip_ended' and departed_at set to when the trip was last seen. Leave those out of run-time work.
This is the source of subway segment times from October 2026 on.
Query it
Section titled “Query it”-- How long did southbound L trains take from Union Sq to 3 Av yesterday?WITH dep AS ( SELECT trip_uid, stop_id, max(departed_at) AS departed_at -- the last departure is the real one FROM transitlab.subway_stop_events WHERE event = 'departed' AND route_id = 'L' AND stop_id IN ('L03S', 'L05S') AND departed_at >= current_date - 1 AND departed_at < current_date GROUP BY trip_uid, stop_id)SELECT a.trip_uid, a.departed_at AT TIME ZONE 'UTC' AT TIME ZONE 'America/New_York' AS left_union_sq, date_diff('second', a.departed_at, b.departed_at) AS secondsFROM dep a JOIN dep b USING (trip_uid)WHERE a.stop_id = 'L03S' AND b.stop_id = 'L05S'ORDER BY left_union_sq;Columns
Section titled “Columns”row_idvarcharStable ID of the row. If a row appears twice, keep one.
observed_attimestampWhen we wrote the row (UTC).
eventvarchardeparted, or trip_ended when a whole trip dropped out of the feed.
feedvarcharWhich of the MTA's subway feeds the train came from.
trip_uidvarcharOur ID for the train trip.
trip_idvarcharMTA trip ID.
route_idvarcharSubway route.
start_datevarcharService date, YYYYMMDD.
stop_idvarcharGTFS stop ID, with direction.
arrivaltimestampThe MTA's last predicted arrival (UTC).
departuretimestampThe MTA's last predicted departure (UTC).
first_seentimestampFirst time the stop appeared in the feed (UTC).
last_seentimestampLast time it appeared (UTC).
departed_attimestampFeed time of the first snapshot without the stop: just after the train left (UTC).
Good to know
Section titled “Good to know”- Use the last departure per trip and stop. The feed sometimes drops a stop and adds it back, so about 3% of trip-stops have more than one
departedrow. The last one is right; the first can be minutes early. - Times are UTC without a zone. Write
departed_at AT TIME ZONE 'UTC'to get a proper timestamp before you turn it into New York time. - Times are within about 10 to 15 seconds. That is how often the feed refreshes. Averages over many trains are sharper than that.
- How we checked it against the older archive: Our subway collector.