@pipeworx/bts-ontime
Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/bts-ontime’s. Install: one-click buttons
Connect to just the @pipeworx/bts-ontime pack
https://gateway.pipeworx.io/bts-ontime/mcp — only @pipeworx/bts-ontime’s own tools, nothing else in the catalog.
No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.
Tools: 5
US domestic airline on-time performance and delay causes: monthly on-time %, average arrival delay, cancellations, diversions, and delay minutes broken down by cause (carrier, weather, air-traffic-control/NAS, security, late aircraft) — by route, by carrier, and by arrival airport. Fleet #2953.
Tools
route_ontime(origin, dest, carrier?, months?)— monthly on-time performance for one origin->destination route, optionally scoped to one carrier. Each month carries flights, completed flights, on-time arrivals and on-time %, average arrival delay, cancellations, diversions, and delay minutes by cause.carrier_ontime(carrier, airport?, months?)— the same monthly shape, aggregated across one airline’s whole network (or just the flights touching one airport).bts_airport_delays(airport, year?, month?, limit?, offset?)— delay-cause breakdown by carrier for flights ARRIVING at one airport, optionally scoped to a year and/or month.limitdefaults to 50 (max 200); a response with more matching rows than returned carriestruncated: trueandtotal_matchingrather than silently dropping them.delay_causes(year, carrier?, airport?, limit?, offset?)— the same delay-cause rows, organized by year first, for scanning a whole year across carriers or airports. Samelimit/truncated/total_matchingpagination asbts_airport_delays.list_coverage()— the earliest/latest month actually loaded, and when. Call this first if you’re not sure a given period is covered.
Carrier accepts either the 2-letter reporting-carrier code ("DL") or a
common airline name ("Delta"). Airport codes are validated against what is
actually loaded (not a static list) — an unrecognized code is refused with a
clear error, never an empty success.
Auth
Keyless. The tools answer only through the Pipeworx gateway, which holds the
data; a standalone npm install has no data to read, and every tool throws
a clear “not bound in this runtime” error there instead of returning an
empty list.
Data sources
- US DOT Bureau of Transportation Statistics (BTS), TranStats — “Reporting
Carrier On-Time Performance” monthly bulk data. US federal government
work: public domain (17 U.S.C. §105). The agency publishes bulk files
only (no live query API for this dataset), so this pack builds a copy
(
scripts/bts-ontime/load-data.mjs) rather than proxying — raw flight-level rows (~600k/month) are never stored; the loader aggregates each month down to two small tables and discards the raw file before moving to the next one.
What delay_cause is, and is not
BTS separately publishes its own “Airline Delay Cause” product, which
apportions each delayed flight’s minutes into fractional per-cause counts
via a methodology this pack does not reimplement. The delay_cause table
here is derived from the same underlying per-flight delay-minute fields
(carrier/weather/NAS/security/late-aircraft) as route_month, rolled up by
carrier x arrival-airport x month, and reported as minute sums, not
fractional counts. It will be consistent with BTS’s own published cause
breakdown but is not guaranteed to match it row-for-row — this is one
pipeline over one raw source, not a second download of BTS’s own aggregate.
Known gaps — read before extending this pack
Coverage is the most recent months as of the load, not full history.
BTS’s bulk-file server throttles hard per connection — one file download
measured ~170 seconds regardless of a modest concurrency increase helping
(3 concurrent downloads of this upstream finished in about the same wall
time as 1 serial one, measured 2026-10-12), so pulling the full 1987-present
archive (400+ monthly files) in one sitting is a multi-hour job, not a
pack-build step. This first load covers the most recent 12 months as of
2026-10-12 (call list_coverage for the exact range) for BOTH tables —
there is no separate 2003-onward backfill for delay_cause in this
commit; it is derived from the same months as route_month.
Extending coverage is mechanical, not research — see “Refreshing or
extending the data” below. Re-running the loader with a larger --months
(and a --concurrency tuned to be polite to the upstream) pulls further
back; nothing about the schema or the tools changes.
Refreshing or extending the data
node scripts/bts-ontime/load-data.mjs --months 12 # default: most recent 12 months
node scripts/bts-ontime/load-data.mjs --months 36 --concurrency 4 # extend further back
node scripts/bts-ontime/load-data.mjs --through 2026-7 # pin the "latest" month instead of probing
Needs wrangler logged in to the Pipeworx Cloudflare account. Each run
replaces route_month, delay_cause and bts_ontime_meta (DROP +
reload) rather than appending — BTS’s own monthly files are themselves
revised occasionally, so a clean reload is the only way to be sure stale
rows from a withdrawn/corrected file don’t linger. A monthly refresh (BTS
publishes with a roughly 2-month lag) should re-run this with a --months
large enough to cover the gap since the last load, not just 12, or the
oldest previously-loaded months will quietly drop off the window.
Tools
- route_ontime — Monthly on-time %, average delay and delay causes for one origin->destination route.
- carrier_ontime — Monthly on-time %, average delay and delay causes for one airline, system-wide or at one airport.
- bts_airport_delays — Delay-cause breakdown by carrier for arrivals at one airport.
- delay_causes — Year-scoped delay-cause rows, optionally filtered by carrier and/or airport.
- list_coverage — Earliest/latest BTS month loaded, and when.
Tools
bts_airport_delays— Delay-cause breakdown by carrier for arrivals at one airport.carrier_ontime— Monthly on-time %, average delay and delay causes for one airline, system-wide or at one airport.delay_causes— Year-scoped delay-cause rows, optionally filtered by carrier and/or airport.list_coverage— Earliest/latest BTS month loaded, and when.route_ontime— Monthly on-time %, average delay and delay causes for one origin->destination route.