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" --context "table bus_route_speeds"
uvx transitlab feedback "count(*) on bus_lanes returns a 500, not a number" --context "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.2

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.2
File Size Uploaded Provenance Actions
transitlab-0.2.2.tar.gz 93.1 kB Without provenance Details for transitlab-0.2.2.tar.gz

Built distribution (wheel)

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

Total release size: 117.1 kB

Release files / transitlab-0.2.2.tar.gz

Download URL transitlab-0.2.2.tar.gz
Size 93.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e2ad411d7799c44d6aa2d4b5ba25f713896b8a162b839c546362a46f2b3b01da
BLAKE2b-256 checksum
How to use checksums
e4a06e5ce645d5d4086b77e895ca3b6ebf2c22be1fba5f4980e1ee562bd18fdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.10

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

Download URL transitlab-0.2.2-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f22bebdf39766b552a482b722464bf4d0c2cced1f7960209b4ce976bb68cdacf
BLAKE2b-256 checksum
How to use checksums
39709cc52f2a30f061ef4e704c3e563226c2f11314375e6066b21185cc74f32d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.10

Security for transitlab 0.2.2

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