DCX Data API
Programmatic access to the DCX reliability warehouse — scorecards, segment traversals, actual arrivals, prediction outcomes, and WMATA rail station headways. JSON and CSV.
Authentication
All requests require an API key passed as a Bearer token:
Request access via the form at the bottom of this page.
Rate limits
1,000 requests per hour per key. Responses include no rate-limit headers; contact us if you need higher limits.
Base URL
Endpoints
GET /v1/scorecards
Route reliability scorecard aggregated over recent days.
| Param | Type | Default | Description |
|---|---|---|---|
route_id | string | — | Filter to a single route |
agency_id | string | — | Filter by agency |
days | int (1–90) | 7 | Lookback window in days |
limit | int (1–1000) | 100 | Max rows returned |
format | csv|json | json | Response format |
Returns an array of scorecard objects (JSON) or a CSV with a header row.
GET /v1/segments
Individual segment traversals from stop to next stop.
| Param | Type | Default | Description |
|---|---|---|---|
route_id | string | — | Filter to a single route |
agency_id | string | — | Filter by agency |
from_stop_seq | int | — | Filter by stop sequence |
date_from | date (YYYY-MM-DD) | — | Start of date range |
date_to | date (YYYY-MM-DD) | — | End of date range |
limit | int (1–1000) | 100 | Max rows returned |
format | csv|json | json | Response format |
GET /v1/arrivals
Actual bus arrivals at stops.
| Param | Type | Default | Description |
|---|---|---|---|
route_id | string | — | Filter to a single route |
stop_id | string | — | Filter to a single stop |
date_from | date (YYYY-MM-DD) | — | Start of date range |
date_to | date (YYYY-MM-DD) | — | End of date range |
limit | int (1–1000) | 100 | Max rows returned |
format | csv|json | json | Response format |
GET /v1/predictions
WMATA Next Bus prediction outcome audit.
| Param | Type | Default | Description |
|---|---|---|---|
route_id | string | — | Filter to a single route |
horizon_bin | string | — | Prediction horizon bucket (e.g. "0-5min") |
date_from | date (YYYY-MM-DD) | — | Start of date range |
date_to | date (YYYY-MM-DD) | — | End of date range |
limit | int (1–1000) | 100 | Max rows returned |
format | csv|json | json | Response format |
GET /v1/rail/stations
WMATA rail station headway and dwell data.
| Param | Type | Default | Description |
|---|---|---|---|
route_id | string | — | Filter to a single line |
direction_id | int | — | Filter by direction (0 or 1) |
days | int (1–90) | 7 | Lookback window in days |
limit | int (1–1000) | 100 | Max rows returned |
format | csv|json | json | Response format |
Schema reference
scorecards
- service_datedate — calendar day of service
- route_idstring — GTFS route identifier
- direction_idint (0 or 1) — trip direction per GTFS
- agency_idstring — operating agency
- gradestring (A–F) — reliability letter grade
- on_time_pctfloat (0–1) — share of arrivals within the on-time window
- n_arrivalsint — total observed arrivals scored
- mean_headway_sfloat — average time between vehicles, seconds
- headway_cvfloat — coefficient of variation of headways; higher means more bunching
- expected_wait_sfloat — random-incidence expected wait, seconds
- median_sched_dev_sfloat — median schedule deviation, seconds (positive = late)
- detour_pctfloat (0–1) — share of trips that left scheduled path
- wmata_accuracyfloat (0–1) — WMATA Next Bus prediction accuracy for this route
- ours_accuracyfloat (0–1) — DCX prediction accuracy for this route
segments
- ts_exitISO datetime — timestamp the vehicle exited the segment
- route_idstring — GTFS route identifier
- direction_idint (0 or 1) — trip direction
- trip_idstring — GTFS trip identifier
- vehicle_idstring — vehicle identifier
- from_stop_seqint — stop sequence at the start of the segment
- travel_sfloat — travel time through the segment, seconds
- dwell_sfloat — dwell time at the entry stop, seconds
- dist_mfloat — segment distance, meters
- sched_dev_sfloat — schedule deviation at exit, seconds
- had_detourbool — whether the vehicle was off-route during this segment
- agency_idstring — operating agency
arrivals
- ts_arrivalISO datetime — derived moment of arrival at the stop
- agency_idstring — operating agency
- trip_idstring — GTFS trip identifier
- route_idstring — GTFS route identifier
- direction_idint (0 or 1) — trip direction
- vehicle_idstring — vehicle identifier
- stop_idstring — GTFS stop identifier
- stop_sequenceint — stop sequence within the trip
- service_datedate — calendar day of service
- ts_departureISO datetime — observed departure timestamp
- methodstring — how the arrival was derived (e.g. "map_match")
- during_detourbool — whether the vehicle was off-route at arrival time
predictions
- ts_generatedISO datetime — when the prediction was generated
- sourcestring — prediction source (wmata or dcx)
- route_idstring — GTFS route identifier
- direction_idint (0 or 1) — trip direction
- stop_idstring — GTFS stop identifier
- horizon_binstring — prediction horizon bucket (e.g. "0-5min", "5-10min")
- error_sfloat — prediction error vs actual arrival, seconds
- accuratebool — whether the prediction was within the accuracy threshold
- stratumstring — stratification label used for scoring analysis
rail_stations
- service_datedate — calendar day of service
- route_idstring — Metrorail line identifier
- direction_idint (0 or 1) — trip direction
- from_stop_seqint — stop sequence at this station
- stop_idstring — GTFS stop identifier
- stop_namestring — station name
- mean_headway_sfloat — average headway at this station, seconds
- p85_headway_sfloat — 85th-percentile headway, seconds
- mean_travel_sfloat — average travel time from previous station, seconds
- median_travel_sfloat — median travel time from previous station, seconds
- n_obsint — number of train observations scored
Request access
The API is in limited access. Tell us what you're building and we'll send you a key.
Independent · derived from GTFS-Realtime & GBFS · not affiliated with WMATA or Capital Bikeshare.