> ## 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.

# mta.routes.list() — list subway and bus routes

> Reference for GET /api/v1/routes. List the catalog of subway and bus routes, with names, colors, and transit mode.

Returns the catalog of routes in the hosted stops snapshot. Pass a comma-separated `modes` filter (for example `subway,bus`) to scope the list, or omit it for every mode.

Each entry is a `Route` plus a `mode`: `{ id, shortName?, longName?, color?, textColor?, type?, mode }`. Use it to populate a route picker or hydrate route metadata client-side.

### SDK

```typescript theme={null}
const routes = await mta.routes.list({ modes: ['subway', 'bus'] })

for (const route of routes) {
  console.log(route.shortName ?? route.id, route.mode)
}
```

See the [Routes & Stations guide](/guides/routes-and-stations).


## OpenAPI

````yaml GET /api/v1/routes
openapi: 3.0.3
info:
  title: MTA API
  description: Managed, API-key protected access to MTA realtime and static data.
  version: 0.1.0
servers:
  - url: https://www.mtaapi.dev
    description: Production
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: subway
    description: Subway realtime data
  - name: bus
    description: BusTime realtime data
  - name: alerts
    description: Service alerts
  - name: stops
    description: Route-aware static GTFS stop lookup
  - name: system
    description: Health and database status
paths:
  /api/v1/routes:
    get:
      tags:
        - stops
      summary: List static routes
      description: List subway and bus routes available in the stops snapshot.
      operationId: getApiV1Routes
      parameters:
        - name: modes
          in: query
          required: false
          schema:
            description: Comma-separated transit modes to include, such as subway,bus.
            type: string
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                    - id
                    - mode
                  properties:
                    id:
                      type: string
                    shortName:
                      type: string
                    longName:
                      type: string
                    type:
                      type: number
                    color:
                      type: string
                    textColor:
                      type: string
                    mode:
                      enum:
                        - subway
                        - bus
                      type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````