Skip to main content

transitlab

Query open NYC transit data from Transit Lab on your own computer. Subway run times and slow zones, bus speeds and lanes, taxi trips, Uber and Lyft trips, service alerts. It reads our public Parquet files with DuckDB, so there is nothing to sign up for and no key.

uvx transitlab tables
uvx transitlab describe subway_stop_events
uvx transitlab sql "select route_id, count(*) as stops from subway_stop_events group by 1 order by 2 desc limit 5"
uvx transitlab sql "select * from bus_lanes limit 100" --format csv -o lanes.csv
uvx transitlab download subway_segment_times --from 2026-01 --to 2026-03 -o data

Big tables are one file a month or a day. --from and --to pick which files to read (YYYY-MM-DD or YYYY-MM). They do not trim rows inside those files; add a WHERE for that. Filtering on the year and month columns in SQL skips files the same way.

Run it on our servers

With a free key from https://transitlab.nyc/api-keys, --remote sends the query to the hosted SQL API (api.transitlab.nyc) instead of reading the files on your computer. It returns at most 10,000 rows (--limit, default 1,000) and stops after 30 seconds.

export TRANSITLAB_API_KEY=tl_live_...
uvx transitlab sql --remote "select count(*) from taxi_yellow_trips where year = 2026 and month = 8"

For AI agents

claude mcp add transitlab -- uvx transitlab mcp

transitlab mcp --config claude-desktop and --config cursor print the settings for those apps. The server has five tools: list_tables, describe_table, run_sql (read-only, 1,000 rows, 60 seconds), example_queries and send_feedback.

Tell us what is wrong

A query failed and the error did not say why? A doc or a table looks wrong? Something is missing? Send a report. It needs no key, and a person reads every one. At most 10 an hour.

uvx transitlab feedback "bus_route_speeds has no rows for the B44 after March" --kind data --page bus_route_speeds
uvx transitlab feedback "count(*) on bus_lanes returns a 500" --kind bug --sql "select count(*) from bus_lanes" --error "500 server"

Agents use the send_feedback tool instead. It is the same as POST https://api.transitlab.nyc/v1/feedback.

Docs: https://docs.transitlab.nyc/start/cli-and-mcp. Data: CC BY 4.0. Credit transitlab.nyc and the original source (MTA, NYC DOT or NYC TLC).

Metadata

Release files for transitlab 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transitlab 0.2.1
File Size Uploaded Provenance Actions
transitlab-0.2.1.tar.gz 93.8 kB Without provenance Details for transitlab-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for transitlab 0.2.1
File Interpreter ABI Platform Actions
transitlab-0.2.1-py3-none-any.whl Python 3 none any Details for transitlab-0.2.1-py3-none-any.whl

Total release size: 118.5 kB

Release files / transitlab-0.2.1.tar.gz

Download URL transitlab-0.2.1.tar.gz
Size 93.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b62d2ea1a0579083a688c2ed4e547f90e4ce46f0f8aac3e6fdd7fdf78c3e9582
BLAKE2b-256 checksum
How to use checksums
3244eeb4110500c370aca56f0fb2545ce1178f64f4661e9509d6299d29c48a12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.10

Release files / transitlab-0.2.1-py3-none-any.whl

Download URL transitlab-0.2.1-py3-none-any.whl
Size 24.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae2ed5e2717411b82aef4d8bf715324fd2c02eb3e8968a2cbe8e296026e81baa
BLAKE2b-256 checksum
How to use checksums
2b08ff1f6ee9888cb1b1d424b78c299b28a6d5610c85792cee95ffcee28ba9df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.10

Security for transitlab 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page