Date researched: 2026-05-05
Source: WMATA Developer Portal (developer.wmata.com), community libraries, Open Data Hub
- Primary: https://developer.wmata.com/
- Developer Resources: https://www.wmata.com/about/developers/
- Open Data Hub: https://www.wmata.com/initiatives/open-data-hub/
- Hosted on Microsoft Azure API Management with interactive API console
- Support: api-support@wmata.com | GTFS: gtfs-support@wmata.com
| Tier | Rate Limit | Daily Limit |
|---|---|---|
| Default (Free) | 10 calls/second | 50,000 calls/day |
| Demo Key | Limited | Subject to change |
- Register at developer.wmata.com to get two API keys per subscription
- TLS 1.2 required (no older protocols)
- Recommendation: target ≤9 calls/sec in code to avoid hitting the limit
| Endpoint | Description | Real-time? |
|---|---|---|
StationPrediction.svc/json/GetPrediction/{stationCode} |
Train arrival predictions | Yes |
StationPrediction.svc/json/GetPrediction/All |
All stations predictions | Yes |
TrainPosition.svc/json/GetTrainPositions |
Real-time train locations | Yes |
StationList.svc/json/GetStations |
Station metadata + coordinates | Static |
Lines.svc/json/jLines |
Metro line metadata (RD/BL/YL/OR/GR/SV) | Static |
| Station Routes/Sequences | Ordered stations per line | Static |
| Travel Information | Time and fare between stations | Static |
| Station Hours | First/last train, opening times | Static |
| Rail Incidents/Alerts | Service disruptions | Yes |
| Elevator/Escalator Incidents | Infrastructure outage status | Yes |
| Endpoint | Description | Real-time? |
|---|---|---|
NextBusService.svc/json/JPredictions?StopID={id} |
Bus arrival predictions | Yes |
| Bus Routes | All routes and metadata | Static |
| Bus Incidents/Alerts | Route delays and disruptions | Yes |
| Bus Stops | Stop locations and metadata | Static |
| Feed | Format | Frequency |
|---|---|---|
| GTFS Static (Rail) | .zip (CSV tables) | Daily |
| GTFS Static (Bus — Better Bus version) | .zip (CSV tables) | Daily |
| GTFS-RT Vehicle Positions | Protocol Buffer (.pb) | Real-time |
| GTFS-RT Stop Time Updates | Protocol Buffer (.pb) | Real-time |
| GTFS-RT Service Alerts | Protocol Buffer (.pb) | Real-time |
GTFS-RT Vehicle Positions URL: https://api.wmata.com/gtfs/rail-gtfsrt-vehiclepositions.pb
Critical: Min is a STRING, not always an integer. Possible values:
- Numeric string:
"3","12" "ARR"— arriving"BRD"— boarding"---"— no data- Empty string
Always type-check before numeric operations. This is the #1 bug source in WMATA apps.
- Circuit IDs available but not fully reliable
- Trains may appear to move backwards (premature circuit triggers)
- Some trains skip circuits in tracking data
- Stop names can differ between API, signage, and in-vehicle displays
- Do not rely on name matching — use stop IDs
- Route IDs completely changed (new letter-prefix naming convention)
- 123 new routes replaced old numbering system
- Limited-stop routes use "X" suffix
- Historical data comparisons require old→new route ID mapping
- Apps built before June 2025 need migration
- Bus and Rail crowding information now available in feeds
- New field; availability and format may still evolve
Real-time (< 30 second latency):
- Train positions and arrival predictions
- Bus arrival predictions
- Service alerts, incidents
- Elevator/escalator status
Static (Daily or slower):
- GTFS schedule files
- Station metadata
- Route information
- Fare tables
| Library | Language | Notes |
|---|---|---|
| pyWMATA | Python | PyPI: wmata |
| metro / wmata | R | CRAN: metro |
| wmata-api-node | Node.js | JS wrapper |
| Home Assistant integration | Python | DC Metro status tile |
| ms-metro | Various | Rail line orchestration |
Deprecated: MetroHero (shut down July 1, 2023) — migrate to official WMATA APIs
- OpenData DC: https://opendata.dc.gov/
- Data.gov WMATA datasets: https://catalog.data.gov/dataset/?tags=wmata
- ArcGIS Hub: Various WMATA GIS collections
- WMATA publishes: ridership dashboards, crime statistics, line performance reports, Pedshed/Bikeshed Atlas
- For research data not in API: ResearchCouncil@wmata.com