canonical: https://jentic.com/apis/mta.info/mta

# MTA Developer API

The Metropolitan Transportation Authority developer API provides static GTFS schedule data for New York City's subway, Long Island Rail Road, Metro-North, and bus services. Developers download the published GTFS archives - gtfs_subway.zip, gtfslirr.zip, gtfsmnr.zip, and the borough-specific bus archives - to feed routing engines, schedule lookups, and accessibility tools. The API is a thin distribution layer over the MTA's authoritative schedule files, kept current with the latest service changes.

## For AI agents

Download the MTA's published GTFS schedule archives for NYC subway, LIRR, Metro-North, and per-borough bus services to power transit routing and schedule apps.

## Scope

Does not handle real-time arrivals, fare payment, or service alerts - use for downloading static MTA GTFS schedule archives only.

## Capabilities

- Download the latest NYC subway GTFS schedule via GET /gtfs_subway.zip
- Pull the supplemented subway feed reflecting near-term service changes via GET /gtfs_supplemented.zip
- Retrieve the Long Island Rail Road schedule via GET /gtfslirr.zip
- Retrieve the Metro-North Railroad schedule via GET /gtfsmnr.zip
- Download borough-specific bus schedules - Bronx, Brooklyn, Manhattan, Queens, Staten Island - via GET /gtfs_bx.zip and siblings
- Pull the MTA Bus Company (express and select bus) schedule via GET /gtfs_busco.zip

## Use cases

### Power a NYC Transit Routing App

Trip planning apps consume the MTA's GTFS archives to compute station-to-station itineraries with realistic transfer times and operating hours. Pulling /gtfs_subway.zip and the borough bus zips builds a multi-modal graph that covers subway plus the surface bus network. Apps refresh nightly so service changes propagate without manual data entry.

Example prompt: Download GET /gtfs_subway.zip and the five borough bus zips, unzip each into a working directory, and load the stops.txt and stop_times.txt into the routing graph.

### Schedule Lookup for an Internal Tool

Operations teams in NYC need to surface the next train at a specific station for staff or visitor wayfinding. Loading /gtfs_subway.zip produces a stop-times dataset that answers 'next 6 train at Bleecker Street' lookups locally without per-query API calls. The supplemented feed adds short-term service changes from /gtfs_supplemented.zip.

Example prompt: Pull GET /gtfs_subway.zip and GET /gtfs_supplemented.zip, merge the stop_times tables, and answer 'next train at stop X' from the merged dataset.

### LIRR and Metro-North Commuter Tools

Commuter tools serving the Long Island and Hudson Valley markets ingest /gtfslirr.zip and /gtfsmnr.zip to surface train times, track assignments where exposed, and service patterns. The static feeds supply the schedule baseline while real-time GTFS-RT alert feeds - published separately by the MTA - overlay disruptions on top.

Example prompt: Download GET /gtfslirr.zip and GET /gtfsmnr.zip, unzip both, and surface the next northbound departure from Stamford or the next eastbound from Penn Station.

### Agent-Driven Daily GTFS Refresh

An AI agent maintains a transit dataset by refreshing every MTA archive nightly. Through Jentic the agent searches for 'download nyc subway gtfs', loads the schema, and iterates through each GTFS zip URL the API exposes. The unauthenticated surface means no credential handling - only download orchestration and validation that the archives parse cleanly.

Example prompt: Search Jentic for 'download nyc subway gtfs', execute each MTA archive endpoint, and validate that stops.txt and trips.txt parse with no errors before swapping the new dataset into production.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /gtfs_subway.zip | Download static NYC subway GTFS |
| GET | /gtfs_supplemented.zip | Download subway GTFS with near-term service changes |
| GET | /gtfslirr.zip | Download Long Island Rail Road GTFS |
| GET | /gtfsmnr.zip | Download Metro-North Railroad GTFS |
| GET | /gtfs_bx.zip | Download Bronx bus GTFS |
| GET | /gtfs_busco.zip | Download MTA Bus Company GTFS |

## Key resources

- **Subway GTFS** — Static schedule for the NYC subway system
- **Supplemented Subway** — Subway feed including near-term service changes
- **LIRR GTFS** — Long Island Rail Road schedule
- **Metro-North GTFS** — Metro-North Railroad schedule
- **Borough Buses** — Per-borough bus GTFS archives - Bronx, Brooklyn, Manhattan, Queens, Staten Island
- **MTA Bus Company** — Express and select bus schedule archive

## Why Jentic

- **Setup:** Wiring the MTA Developer API by hand means pointing at the right host, since some GTFS archives sit on api.mta.info and others on an S3 bucket, then handling the raw zip downloads yourself. Through Jentic you install once, import the MTA Developer API from the API Directory, and your agent calls it, with no credential to manage because the static feeds are unauthenticated.
- **Permission scoping:** These endpoints only download static GTFS zip archives, so limit the agent to the read-only operations it needs, such as fetching the subway or Long Island Rail Road feed. You choose which archive operations are in scope, and nothing beyond those downloads is reachable.
- **Credential handling:** The MTA static GTFS feeds need no credential, so there is nothing to store, and your agent reaches only the download operations you allow. No secret ever enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'download nyc subway gtfs' or 'get metro-north schedule feed', and Jentic returns the matching MTA archive operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **TransitFeeds** — TransitFeeds aggregates GTFS archives from hundreds of transit agencies including the MTA
- **Transport for London API** — TfL exposes the equivalent transit schedule and journey planner data for London
- **BART API** — BART exposes Bay Area transit data using a similar agency-feed pattern

## FAQ

### What authentication does the MTA Developer API use?

The static GTFS download endpoints exposed in this spec are unauthenticated - they serve public schedule archives. Through Jentic the agent calls them with no credential setup at all, which makes orchestrating a multi-archive refresh trivial.

### Can I get realtime arrival data through these endpoints?

No. The endpoints in this spec return static GTFS archive zips for schedule planning. The MTA publishes separate GTFS-Realtime feeds for live arrivals and alerts, which are not exposed here - combine those feeds with these schedules for full real-time routing.

### What are the rate limits for the MTA Developer API?

The MTA hosts the GTFS archives on a CDN-fronted bucket and does not publish a strict per-IP rate limit, but courtesy use means a daily refresh rather than per-request polling. Each archive is large - pull each zip once per day and reuse the local copy.

### How do I refresh all GTFS data through Jentic?

Search Jentic for 'download nyc subway gtfs', execute each archive endpoint listed in the spec, and persist the zips to local storage. The agent runs the calls without credentials and validates the archives parse before swapping them into production.

### Is the MTA Developer API free?

Yes. The MTA publishes the schedule archives as public open data and there is no per-call charge or quota for downloading the GTFS zips.

### Can I limit what my agent is allowed to do with the MTA Developer API?

Yes. Because you run Jentic One yourself, your own rules decide which of the MTA GTFS download operations your agent may call, so you can scope it to just the subway feed (GET /gtfs_subway.zip) or the Long Island Rail Road feed (GET /gtfslirr.zip) and leave every other archive out of reach. These endpoints only download static, read-only GTFS zip archives, so an agent limited to the feeds you allow cannot touch anything beyond those downloads. The feeds are unauthenticated, so there is no credential to store and nothing for the agent to misuse.
