# Metro Transit

> Twin Cities public transit from Metro Transit: realtime NexTrip departures for any stop, service alerts, live vehicle positions, timetables, trip planning and park and rides for the buses, METRO lines and Northstar in Minneapolis and Saint Paul. No account or API key required.

App · 18 actions. Web page: https://docs.lodol.com/docs/integrations/metro-transit

## Actions

### Find park and rides

Find the park and ride lots nearest a place, with their address, distance, number of spaces, shelter and the routes that serve them.

**Inputs**

- Place (`place`, text, required): An address, intersection or landmark in the Twin Cities.

**Outputs**

- `count` (number): How many park_and_rides came back.
- `park_and_rides` (list): The lots, nearest first.
- `place` (text): The place, as Metro Transit's trip planner found it.

**Example output**

```json
{
  "count": 1,
  "park_and_rides": [
    {
      "address": "8101 Winstead Way, Bloomington",
      "capacity": 1585,
      "covered_parking": true,
      "distance_miles": 0.4,
      "has_bike_locker": true,
      "has_shelter": true,
      "id": 14955,
      "name": "30th Ave Station",
      "routes": [
        "54",
        "345",
        "Blue Line"
      ]
    }
  ],
  "place": "Mall of America Station, Bloomington"
}
```

### Find service nearby

Find the stops within walking distance of a place, nearest first, with the routes that stop at each.

**Inputs**

- Place (`place`, text, required): An address, intersection or landmark in the Twin Cities.
- Walk at most (miles) (`max_walk_miles`, number): The farthest to walk to a stop, in miles. Defaults to 0.25. From 0.1 to 5.0. Default: `0.25`.

**Outputs**

- `count` (number): How many stops came back.
- `max_walk_miles` (number): The walking distance searched, in miles.
- `place` (text): The place, as Metro Transit's trip planner found it.
- `stops` (list): The stops, nearest first.

**Example output**

```json
{
  "count": 1,
  "max_walk_miles": 0.25,
  "place": "Target Field, Minneapolis",
  "stops": [
    {
      "heading": "Westbound",
      "name": "7th St N & Twins Way",
      "routes": [
        {
          "direction": "Northbound",
          "headsign": "22C N Lyndale / Brklyn Ctr Tc / Via Bryant",
          "route": "22"
        },
        {
          "direction": "Northbound",
          "headsign": "5M Fremont Ave / Brklyn Ctr Tc",
          "route": "5"
        }
      ],
      "stop_id": 2875,
      "walk_direction": "S",
      "walk_miles": 0.1
    }
  ]
}
```

### Find stops by street

Find stops whose name includes a street, with each stop's number for Get departures by stop number.

**Inputs**

- Street (`street`, text, required): A street name, or part of one, e.g. Hennepin.

**Outputs**

- `count` (number): How many stops came back.
- `stops` (list): The stops, by name.
- `street` (text): The street searched for.

**Example output**

```json
{
  "count": 1,
  "stops": [
    {
      "name": "Hennepin & 10th St Station",
      "stop_id": 17944
    }
  ],
  "street": "Hennepin"
}
```

### Get departures

Get the next departures of a route from a stop, as Metro Transit's NexTrip shows them: 'Due' or minutes away when the vehicle is tracked live, otherwise the scheduled time, with the destination and any alerts for the stop.

**Inputs**

- Route (`route`, text, required): The route, e.g. METRO Blue Line or Route 18.
- Direction (`direction`, text, required): Which way along the route, e.g. Northbound.
- Stop (`stop`, text, required): The stop on that route and direction, e.g. Mall of America Station.

**Outputs**

- `alerts` (list): Alerts NexTrip shows for this stop.
- `count` (number): How many departures came back.
- `departures` (list): The next departures, soonest first.
- `stops` (list): The stop or stops the departures leave from.

**Example output**

```json
{
  "alerts": [
    {
      "stop_closed": false,
      "text": "Both elevators at Franklin Ave Station unavailable until further notice due to mechanical issues"
    }
  ],
  "count": 1,
  "departures": [
    {
      "agency_id": 0,
      "departure_text": "Due",
      "departure_time": "2026-10-23T11:52:00-05:00",
      "destination": "Downtown Mpls",
      "direction": "Northbound",
      "direction_id": 0,
      "gate": null,
      "is_realtime": true,
      "minutes_away": 1,
      "route_id": "901",
      "route_short_name": "Blue",
      "schedule_relationship": "Scheduled",
      "stop_id": 51405,
      "terminal": null,
      "trip_id": "877498"
    }
  ],
  "stops": [
    {
      "latitude": 44.854277,
      "longitude": -93.238877,
      "name": "Mall of America Station",
      "stop_id": 51405
    }
  ]
}
```

### Get departures by stop number

Get the next departures of every route from one stop by its stop number (posted at the stop, e.g. 17944), soonest first, with any alerts for the stop.

**Inputs**

- Stop number (`stop_number`, text, required): The number posted at the stop. Find Stops by street finds it from a street name.

**Outputs**

- `alerts` (list): Alerts NexTrip shows for this stop.
- `count` (number): How many departures came back.
- `departures` (list): The next departures, soonest first.
- `stops` (list): The stop or stops the departures leave from.

**Example output**

```json
{
  "alerts": [],
  "count": 1,
  "departures": [
    {
      "agency_id": 0,
      "departure_text": "6 Min",
      "departure_time": "2026-10-23T11:56:17-05:00",
      "destination": "Westgate Station",
      "direction": "Northbound",
      "direction_id": 0,
      "gate": null,
      "is_realtime": true,
      "minutes_away": 5,
      "route_id": "925",
      "route_short_name": "E Line",
      "schedule_relationship": "Scheduled",
      "stop_id": 17944,
      "terminal": null,
      "trip_id": "1167405"
    }
  ],
  "stops": [
    {
      "latitude": 44.975655,
      "longitude": -93.278104,
      "name": "Hennepin & 10th St Station",
      "stop_id": 17944
    }
  ]
}
```

### Get route details

Get a route's details (its kind of service, agency, colors and web page) and the timetables Metro Transit publishes for it, one per day type and direction.

**Inputs**

- Route (`route`, text, required): The route, e.g. METRO Blue Line or Route 18.

**Outputs**

- `agency_id` (number): The id of the agency that runs it.
- `agency_name` (text): The agency's name.
- `color` (text): The route's color as a hex code, e.g. '#00539F'.
- `comment` (text): A note Metro Transit adds to the route, when there is one.
- `description` (text): Where it runs.
- `id` (text): The route id.
- `kind` (text): The kind of service, e.g. 'Light Rail' or 'Local Bus'.
- `name` (text): What riders call it, e.g. 'METRO Blue Line'.
- `schedules` (list): The timetables published for the route.
- `short_name` (text): The short name, e.g. 'Blue'.
- `text_color` (text): The text color to use on the route color.
- `url` (text): The route's page on metrotransit.org.

**Example output**

```json
{
  "agency_id": 0,
  "agency_name": "Metro Transit",
  "color": "#00539F",
  "comment": null,
  "description": "Blue Line - Mpls - Airport - MOA",
  "id": "901",
  "kind": "Light Rail",
  "name": "METRO Blue Line",
  "schedules": [
    {
      "day": "Weekday",
      "direction": "Northbound",
      "direction_id": 0,
      "schedule": 1,
      "service_period": "aug26"
    },
    {
      "day": "Weekday",
      "direction": "Southbound",
      "direction_id": 1,
      "schedule": 2,
      "service_period": "aug26"
    }
  ],
  "short_name": "Blue",
  "text_color": "#FFFFFF",
  "url": "https://www.metrotransit.org/route/blue"
}
```

### Get service alert

Get one Metro Transit service alert by its id: what it says, its effect and cause, when it applies, and the routes and stops it affects.

**Inputs**

- Alert id (`alert_id`, text, required): The alert's id, from List service alerts or a planned trip.

**Outputs**

- `active_periods` (list): When the alert applies; an empty end means until further notice.
- `cause` (text): Why, e.g. 'Construction' or 'Unknown cause'.
- `description` (text): The full text: which stops to use instead, dates and so on.
- `effect` (text): What it does to service, e.g. 'Detour' or 'No service'.
- `effect_code` (text): The effect as a code, e.g. 'DETOUR', as the Effects filter takes it.
- `effect_detail` (text): Metro Transit's finer kind, e.g. 'Stop closure' or 'Service advisory'.
- `ends_at` (text): When the last period ends, ISO 8601; empty until further notice.
- `header` (text): The alert's headline.
- `id` (text): The alert's id, as Get service alert takes it.
- `image_url` (text): A map or picture of the change, when there is one.
- `lifecycle` (text): 'New', 'Ongoing' or 'Upcoming'.
- `routes` (list): The routes affected.
- `starts_at` (text): When the first period starts, ISO 8601.
- `stop_ids` (list): The stop numbers affected, as text.
- `updated_at` (text): When Metro Transit last changed the alert, ISO 8601.
- `url` (text): A page on metrotransit.org with more, when there is one.

**Example output**

```json
{
  "active_periods": [
    {
      "end": "2026-10-25T17:00:00-05:00",
      "start": "2026-10-25T09:00:00-05:00"
    }
  ],
  "cause": "Other cause",
  "description": "Due to street closures around U.S. Bank Stadium Station during the Vikings game, please transfer between the METRO Blue and Green lines at Government Plaza Station instead.",
  "effect": "Other effect",
  "effect_code": "OTHER_EFFECT",
  "effect_detail": "Service advisory",
  "ends_at": "2026-10-25T17:00:00-05:00",
  "header": "METRO Blue Line and Green Line service advisory: Transfer between trains at Government Plaza Station during the Vikings game on 10/25 from 9am - 5pm",
  "id": "52269",
  "image_url": null,
  "lifecycle": "Upcoming",
  "routes": [
    {
      "route_id": "901",
      "route_label": "METRO Blue Line"
    },
    {
      "route_id": "902",
      "route_label": "METRO Green Line"
    }
  ],
  "starts_at": "2026-10-25T09:00:00-05:00",
  "stop_ids": [
    "56330",
    "56338"
  ],
  "updated_at": "2026-10-23T09:00:01-05:00",
  "url": null
}
```

### Get timetable

Get a route's published timetable for one day type and direction: every trip with its times at each timepoint, and footnotes such as school days only.

**Inputs**

- Route (`route`, text, required): The route, e.g. METRO Blue Line or Route 18.
- Timetable (`schedule`, text, required): Which of the route's timetables: the days and direction it covers.

**Outputs**

- `count` (number): How many trips came back.
- `description` (text): Where the timetable's trips go, e.g. 'from Mall of America to downtown Minneapolis'.
- `route` (text): The route id, e.g. '901' (METRO Blue Line) or '18'.
- `schedule` (number): The timetable's number.
- `timepoints` (list): The timetable's timepoints, in route order.
- `trips` (list): Every trip on the timetable, earliest first.

**Example output**

```json
{
  "count": 1,
  "description": "from Mall of America to downtown Minneapolis",
  "route": "901",
  "schedule": 1,
  "timepoints": [
    "Cedar-Riverside Station",
    "Target Field Station Platform 2"
  ],
  "trips": [
    {
      "arrives": "04:33",
      "arrives_at": "Target Field Station Platform 2",
      "departs": "04:22",
      "departs_from": "Cedar-Riverside Station",
      "note": null,
      "route_label": "Blue",
      "times": [
        {
          "time": "04:22",
          "timepoint": "Cedar-Riverside Station"
        },
        {
          "time": "04:33",
          "timepoint": "Target Field Station Platform 2"
        }
      ]
    }
  ]
}
```

### Get trips between two stops

Get every scheduled trip on a route's timetable from one stop to a later one: when it leaves, when it arrives and how long the ride takes.

**Inputs**

- Route (`route`, text, required): The route, e.g. METRO Blue Line or Route 18.
- Timetable (`schedule`, text, required): Which of the route's timetables: the days and direction it covers.
- Get on at (`board_stop`, text, required): The stop to get on at.
- Get off at (`exit_stop`, text, required): The stop to get off at, later on the route.

**Outputs**

- `board_stop` (number): The stop to get on at.
- `count` (number): How many trips came back.
- `exit_stop` (number): The stop to get off at.
- `route` (text): The route id, e.g. '901' (METRO Blue Line) or '18'.
- `schedule` (number): The timetable's number.
- `trips` (list): The trips, earliest first.

**Example output**

```json
{
  "board_stop": 51405,
  "count": 1,
  "exit_stop": 51424,
  "route": "901",
  "schedule": 1,
  "trips": [
    {
      "board_time": "04:13",
      "exit_time": "04:47",
      "minutes": 34,
      "note": null,
      "route_label": "Blue"
    }
  ]
}
```

### List agencies

List the transit agencies whose service Metro Transit's NexTrip covers, such as Metro Transit, Minnesota Valley and SouthWest Transit, with the id List routes filters by.

**Inputs**: None.

**Outputs**

- `agencies` (list): The agencies.
- `count` (number): How many agencies came back.

**Example output**

```json
{
  "agencies": [
    {
      "id": 0,
      "name": "Metro Transit"
    },
    {
      "id": 3,
      "name": "Minnesota Valley"
    }
  ],
  "count": 2
}
```

### List directions

List the two directions a route runs in today, such as Northbound and Southbound, with the number (0 or 1) the other steps take.

**Inputs**

- Route (`route`, text, required): The route, e.g. METRO Blue Line or Route 18.

**Outputs**

- `count` (number): How many directions came back.
- `directions` (list): The route's directions.
- `route` (text): The route id, e.g. '901' (METRO Blue Line) or '18'.

**Example output**

```json
{
  "count": 2,
  "directions": [
    {
      "id": 0,
      "name": "Northbound"
    },
    {
      "id": 1,
      "name": "Southbound"
    }
  ],
  "route": "901"
}
```

### List routes

List every Twin Cities transit route Metro Transit publishes (buses, METRO lines and Northstar) with its id, name, where it runs and its page on metrotransit.org. Optionally only one agency's routes.

**Inputs**

- Agency (`agency`, text): Only this agency's routes. Leave empty for all of them.

**Outputs**

- `count` (number): How many routes came back.
- `routes` (list): The routes, in Metro Transit's own order.

**Example output**

```json
{
  "count": 1,
  "routes": [
    {
      "agency_id": 0,
      "description": "Blue Line - Mpls - Airport - MOA",
      "id": "901",
      "name": "METRO Blue Line",
      "short_name": "Blue",
      "url": "https://www.metrotransit.org/route/blue"
    }
  ]
}
```

### List service alerts

List Metro Transit's current and upcoming service alerts (detours, stop closures, cancellations and advisories), newest first, with the routes and stops each affects. Optionally one route's alerts, or only some effects.

**Inputs**

- Route (`route`, text): Only this route's alerts. Leave empty for every route.
- Effects (`effects`, list): Only alerts with these effects. Leave empty for all of them. One or more of: `NO_SERVICE` (No service (closures and cancellations)), `REDUCED_SERVICE` (Reduced service), `SIGNIFICANT_DELAYS` (Significant delays), `DETOUR`, `ADDITIONAL_SERVICE` (Additional service), `MODIFIED_SERVICE` (Modified service), `STOP_MOVED` (Stop moved), `ACCESSIBILITY_ISSUE` (Accessibility issue (such as an elevator)), `OTHER_EFFECT` (Other (service advisories)).

**Outputs**

- `alerts` (list): The alerts, newest first.
- `count` (number): How many alerts came back.

**Example output**

```json
{
  "alerts": [
    {
      "active_periods": [
        {
          "end": "2026-10-25T17:00:00-05:00",
          "start": "2026-10-25T09:00:00-05:00"
        }
      ],
      "cause": "Other cause",
      "description": "Due to street closures around U.S. Bank Stadium Station during the Vikings game, please transfer between the METRO Blue and Green lines at Government Plaza Station instead.",
      "effect": "Other effect",
      "effect_code": "OTHER_EFFECT",
      "effect_detail": "Service advisory",
      "ends_at": "2026-10-25T17:00:00-05:00",
      "header": "METRO Blue Line and Green Line service advisory: Transfer between trains at Government Plaza Station during the Vikings game on 10/25 from 9am - 5pm",
      "id": "52269",
      "image_url": null,
      "lifecycle": "Upcoming",
      "routes": [
        {
          "route_id": "901",
          "route_label": "METRO Blue Line"
        },
        {
          "route_id": "902",
          "route_label": "METRO Green Line"
        }
      ],
      "starts_at": "2026-10-25T09:00:00-05:00",
      "stop_ids": [
        "56330",
        "56338"
      ],
      "updated_at": "2026-10-23T09:00:01-05:00",
      "url": null
    }
  ],
  "count": 1
}
```

### List stops on a route

List the stops NexTrip shows for a route in one direction, in route order, with the stop code Get departures takes (e.g. MAAM for Mall of America Station).

**Inputs**

- Route (`route`, text, required): The route, e.g. METRO Blue Line or Route 18.
- Direction (`direction`, text, required): Which way along the route, e.g. Northbound.

**Outputs**

- `count` (number): How many stops came back.
- `direction` (number): The direction, 0 or 1.
- `route` (text): The route id, e.g. '901' (METRO Blue Line) or '18'.
- `stops` (list): The stops, in route order.

**Example output**

```json
{
  "count": 2,
  "direction": 0,
  "route": "901",
  "stops": [
    {
      "code": "MAAM",
      "name": "Mall of America Station"
    },
    {
      "code": "30AV",
      "name": "30th Ave Station"
    }
  ]
}
```

### List timetable stops

List every stop on one of a route's timetables, in route order, with its stop number and whether it is a timepoint (a stop the printed timetable gives times for).

**Inputs**

- Route (`route`, text, required): The route, e.g. METRO Blue Line or Route 18.
- Timetable (`schedule`, text, required): Which of the route's timetables: the days and direction it covers.

**Outputs**

- `count` (number): How many stops came back.
- `route` (text): The route id, e.g. '901' (METRO Blue Line) or '18'.
- `schedule` (number): The timetable's number.
- `stops` (list): The stops, in route order.

**Example output**

```json
{
  "count": 2,
  "route": "901",
  "schedule": 1,
  "stops": [
    {
      "is_timepoint": true,
      "name": "Mall of America Station",
      "stop_id": 51405
    },
    {
      "is_timepoint": true,
      "name": "30th Ave Station",
      "stop_id": 51437
    }
  ]
}
```

### List vehicles

See where every bus or train running a route is right now: its trip, direction, position and heading, and when it last reported.

**Inputs**

- Route (`route`, text, required): The route, e.g. METRO Blue Line or Route 18.

**Outputs**

- `count` (number): How many vehicles came back.
- `route` (text): The route id, e.g. '901' (METRO Blue Line) or '18'.
- `vehicles` (list): The vehicles running the route.

**Example output**

```json
{
  "count": 1,
  "route": "901",
  "vehicles": [
    {
      "bearing": 0.0,
      "direction": "Northbound",
      "direction_id": 0,
      "latitude": 44.854572,
      "longitude": -93.238716,
      "route_id": "901",
      "terminal": null,
      "trip_id": "1005815",
      "updated_at": "2026-10-23T11:50:24-05:00"
    }
  ]
}
```

### Plan a trip

Plan a transit trip between two places in the Twin Cities with Metro Transit's trip planner: up to three options, each with its routes, where to get on and off, times, walking and fare.

**Inputs**

- From (`origin`, text, required): Where the trip starts: an address, intersection or landmark.
- To (`destination`, text, required): Where the trip ends: an address, intersection or landmark.
- When (`when`, date and time): When to leave (or arrive by). Defaults to now.
- Arrive by (`arrive_by`, true/false): On: trips that arrive by that time. Off: trips that leave after it. Default: `false`.
- Prefer (`preference`, text): How to choose between trips. One of: `fastest` (Fastest trip), `fewest_transfers` (Fewest transfers), `least_walking` (Least walking). Default: `fastest`.
- Walk at most (miles) (`max_walk_miles`, number): The farthest to walk to, from or between stops, in miles. Defaults to 0.5. From 0.1 to 5.0. Default: `0.5`.
- Step-free access (`accessible`, true/false): On: only trips usable in a wheelchair. Default: `false`.

**Outputs**

- `arrive_by` (true/false): True when the trips arrive by that time, false when they leave after it.
- `count` (number): How many itineraries came back.
- `destination` (text): The place the trip ends at, as Metro Transit found it.
- `itineraries` (list): Up to three ways to make the trip.
- `origin` (text): The place the trip starts from, as Metro Transit found it.
- `walkable` (true/false): True when Metro Transit says the trip is short enough to walk.
- `when` (text): The time planned for, Twin Cities time, ISO 8601.

**Example output**

```json
{
  "arrive_by": false,
  "count": 1,
  "destination": "Mall of America Station, Bloomington",
  "itineraries": [
    {
      "arrives": "12:50",
      "departs": "12:13",
      "fare": 2.0,
      "final_walk": null,
      "legs": [
        {
          "alert_ids": [
            "42192"
          ],
          "board_stop": "Warehouse District Hennepin Ave Station",
          "board_stop_id": 56336,
          "board_time": "12:13",
          "direction": "Southbound",
          "exit_stop": "Mall of America Station",
          "exit_stop_id": 51405,
          "exit_time": "12:50",
          "headsign": "Blue Mall of America",
          "is_realtime": false,
          "route": "Blue Line",
          "route_id": "901",
          "walk": "Walk 0.5 miles E",
          "walk_miles": 0.5
        }
      ],
      "minutes": 37,
      "reduced_fare": 1.0,
      "summary": "Blue Line",
      "walk_miles": 0.5
    }
  ],
  "origin": "Target Field, Minneapolis",
  "walkable": false,
  "when": "2026-10-23T11:51-05:00"
}
```

### Search places

Search the places Metro Transit's trip planner knows (addresses, intersections, stations and landmarks) and list the matches, best first. The first match is the one the other trip planner steps use.

**Inputs**

- Search for (`text`, text, required): An address, intersection or landmark, or part of one.

**Outputs**

- `count` (number): How many places came back.
- `places` (list): The matches, best first.
- `text` (text): The text searched for.

**Example output**

```json
{
  "count": 2,
  "places": [
    {
      "name": "Target Field, Minneapolis"
    },
    {
      "name": "Target Field Station, Minneapolis"
    }
  ],
  "text": "Target Field"
}
```
