> ## Documentation Index
> Fetch the complete documentation index at: https://mtaapi.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# More transit agencies

> Use mta-js 2.7.0 to query 20 additional US transit systems.

The API provides the same stops, routes, departures, route stops, vehicle, and alert methods for 20 additional transit systems.

## Agency slugs and SDK clients

| Agency | API system slug | mta-js client |
| - | - | - |
| MBTA (Boston) | `mbta` | `mta.mbta` |
| King County Metro (Seattle) | `king-county-metro` | `mta.kingCountyMetro` |
| CapMetro (Austin) | `capmetro` | `mta.capMetro` |
| BART | `bart` | `mta.bart` |
| Tri-Rail | `tri-rail` | `mta.triRail` |
| Brightline | `brightline` | `mta.brightline` |
| Pace (Chicago suburbs) | `pace` | `mta.pace` |
| Denver RTD | `rtd` | `mta.rtd` |
| Metro Transit (Minneapolis–St. Paul) | `metro-transit` | `mta.metroTransit` |
| Pittsburgh Regional Transit (Pittsburgh) | `prt` | `mta.prt` |
| MARTA (Atlanta) | `marta` | `mta.marta` |
| VIA Metropolitan Transit (San Antonio) | `via` | `mta.via` |
| GCRTA (Cleveland) | `gcrta` | `mta.gcrta` |
| CATS (Charlotte) | `cats` | `mta.cats` |
| SacRT (Sacramento) | `sacrt` | `mta.sacrt` |
| MARC (Baltimore–Washington) | `marc` | `mta.marc` |
| UTA (Salt Lake City) | `uta` | `mta.uta` |
| JTA (Jacksonville) | `jta` | `mta.jta` |
| Muni (San Francisco) | `muni` | `mta.muni` |
| Caltrain (San Francisco Bay Area) | `caltrain` | `mta.caltrain` |

Each property is a `CommuterRailClient`, with the same methods as `mta.lirr` and `mta.metroNorth`.

## Look up stops and routes

Install `mta-js` 2.7.0 or later and set `MTA_API_KEY` in your environment:

```typescript theme={null}
import { MTA } from "mta-js"

const mta = new MTA({ apiKey: process.env.MTA_API_KEY })
const mbtaStops = await mta.mbta.stops({ name: "South Station" })
const capMetroRoutes = await mta.capMetro.routes()
```

`stops()` accepts an optional name filter. `routes()` lists the agency's routes, and `routeStops()` returns the stops served by a route:

```typescript theme={null}
const redLineStops = await mta.mbta.routeStops({ route: "Red" })
const kingCountyRouteStops = await mta.kingCountyMetro.routeStops({ route: "1" })

console.log(redLineStops.stops.map((stop) => stop.name))
console.log(kingCountyRouteStops.stops.map((stop) => stop.name))
```

Muni and Caltrain data is provided by [511 SF Bay open data](https://511.org/open-data). 511's terms require crediting the data source.

Bus routes such as King County Metro and Pace can be looked up by their public route number. In `mta-js`, `CommuterRailRoute` exposes that value as the optional `shortName` property.

## Get departures

The `stop` parameter accepts a stop or station ID, stop code, or exact name:

```typescript theme={null}
const mbtaDepartures = await mta.mbta.departures({
  stop: "place-sstat",
  limit: 5,
})

const kingCountyDepartures = await mta.kingCountyMetro.departures({
  stop: "3rd Ave & Pike St",
  limit: 5,
})

for (const departure of mbtaDepartures) {
  console.log(
    `${departure.route.name} — ${departure.destination ?? departure.direction} — ${departure.minutes} min`,
  )
}
```

The same `departures()` method is available on `capMetro`, `bart`, `triRail`, `brightline`, and `pace`.

## Check vehicles and alerts

```typescript theme={null}
const triRailVehicles = await mta.triRail.vehicles()
const paceVehicles = await mta.pace.vehicles({ route: "1" })
const mbtaAlerts = await mta.mbta.alerts()
const kingCountyAlerts = await mta.kingCountyMetro.alerts()
```

## Feed limitations

* **BART:** BART publishes no vehicle positions, so `mta.bart.vehicles()` has no positions to return.
* **Tri-Rail:** Departures are usually empty because its live feed has no stop IDs or event times. Vehicle positions work.
* **Brightline:** There is no alerts feed, so `mta.brightline.alerts()` returns an empty list.
* **UTA:** Departures are always empty because its trip updates have no stop IDs.
* **JTA:** Departures are usually empty because realtime stop IDs do not match its static GTFS.
* **PRT:** Realtime covers buses only, not light rail, and there is no alerts feed.
* **MARTA:** Realtime covers buses only.
* **VIA:** Its feeds are served over HTTP.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.