Reference · built on requestCommons signalTransit, roads & mobility

WMATA Metro API

Metrorail and Metrobus predictions, train positions, incidents, elevator outages, and GTFS feeds for the Washington region.

About

The Washington Metropolitan Area Transit Authority runs Metrorail and Metrobus and publishes their data through an API portal at developer.wmata.com. The portal groups methods into Real-Time Rail Predictions, Train Positions, Incidents, Rail Station Information, Bus Route and Stop Methods, Real-Time Bus Predictions, and GTFS static and realtime feeds for rail and bus. Each subscription issues two keys.

An operator reads incidents and next-train times for the stations near your sites and proposes a shuttle hold or a shift-coverage change, which you approve.

This is a reference listing. It documents what Fibric would read from WMATA Metro API and what it could propose, based on the publisher's published interfaces. Fibric builds it under a managed deployment when you request it; selecting it here installs nothing.

Inputs

  • Next train arrivals per station: StationPrediction.svc/json/GetPrediction/{StationCodes} (or All), refreshed about every 20 to 30 seconds
  • Live train positions by track circuit: TrainPositions/TrainPositions, refreshed every 7 to 10 seconds, with StandardRoutes and TrackCircuits reference
  • Rail incidents, bus incidents and elevator/escalator outages: Incidents.svc/json/Incidents, BusIncidents, ElevatorIncidents
  • Next bus times at a stop (NextBusService.svc/json/jPredictions) and bus positions by route (Bus.svc/json/jBusPositions)
  • Rail GTFS-RT 2.0 trip updates, vehicle positions and alerts; bus GTFS-RT 1.0 feeds; GTFS Metro Alert feeds in .pb and .json
  • Station reference from Rail.svc: jStations, jStationTimes (first and last trains), jStationParking, jSrcStationToDstStationInfo (fares)
  • Static GTFS: rail-gtfs-static.zip and rail-bus-gtfs-static.zip, updated daily; bus-gtfs-static.zip

Proposed actions

Read-only. This feed informs operators; it changes nothing.

Proposed actions are target capabilities. Every action runs propose-first and needs a validated deployment and the appropriate permissions.

What you can build

  • Explain late clock-ins with a rail incident

    Read Incidents.svc/json/Incidents. When LinesAffected includes a line your staff ride, the operator matches the incident window to late punches and proposes a no-show exception with the incident text attached.

    With No-Show Response, Shift Coverage

  • Hold the shuttle for the next train

    Poll GetPrediction for your station code. When the next train is minutes away, the operator proposes holding the shuttle until it arrives, showing the prediction it used.

    With Shuttle Timing

  • Station outages in the morning brief

    Each morning the operator reads ElevatorIncidents and rail incidents for your nearest stations and lists them in the brief with the DateUpdated stamp.

    With Morning Brief

Requirements

  • A developer.wmata.com account and an approved product subscription; the portal marks approval as required
  • StationCodes and StopIDs from the Rail.svc and Bus.svc reference methods
  • A protobuf reader for the .pb feeds; the portal's Try it feature does not work on them
  • Acceptance of the Developer License Agreement, which forbids implying WMATA affiliation or endorsement
Authentication
A free developer account at developer.wmata.com and a product subscription; each subscription issues two keys, sent as the api_key header or query parameter.

Limits

  • Rate limits belong to product tiers shown after sign-in; the public demo key is rate limited and can change at any time
  • Bus GTFS-RT feeds conform to GTFS-RT 1.0 only; the rail feeds are GTFS-RT 2.0
  • Route parameters take base route names only (10A, not 10Av1); DelaySeverity and EmergencyText fields are deprecated
  • WMATA may alter or stop the feeds without notice and reserves the right to charge in future

Access and pricing

Reference listing. Public feed access is separate from Fibric integration. If you request this feed, your quote covers the build, usage, and support.

Request WMATA Metro API ↗

Questions and answers

How is the key passed?
As an api_key header or an api_key query parameter; the portal lists both for every API. A subscription gives you two keys so you can rotate one while the other stays in use.
How fresh is the data?
Train positions refresh every 7 to 10 seconds. Next-train predictions and rail incidents refresh about every 20 to 30 seconds. Rail incidents are the same data as WMATA's Metrorail Service Status feed. Rail and combined static GTFS files update daily.
What does the rail GTFS-RT feed add?
Trip updates carry schedule_relationship values SCHEDULED, ADDED, CANCELED and DUPLICATED; a CANCELED trip has no StopTimeUpdate messages. Vehicle positions carry the train id, the radio label, the number of cars in license_plate, and occupancy_status thresholds.
Ask about WMATA Metro API

Ask about the capabilities and requirements in this listing.

For project-specific requirements, contact Fibric.