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 four tools: list_tables, describe_table, run_sql (read-only, 1,000 rows, 60 seconds) and example_queries.

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.0

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.0
File Size Uploaded Provenance Actions
transitlab-0.2.0.tar.gz 90.9 kB Without provenance Details for transitlab-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 113.3 kB

Release files / transitlab-0.2.0.tar.gz

Download URL transitlab-0.2.0.tar.gz
Size 90.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5b3a7f0ef0be6dc484cf61271b4c8b4266fee904154d147bebc1d14f90482254
BLAKE2b-256 checksum
How to use checksums
d2492ddb616516cd551ff069db5507406697cb9905440466f196065f6dd25cf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.10

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

Download URL transitlab-0.2.0-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20880e26ae5b0efe92f8714fb92b1d4177b4e9aa8d8268772dcc610cd2c2918a
BLAKE2b-256 checksum
How to use checksums
7a2eb9c39beee78966a1c289f7f34c6639ed8ddb179bb8b6e36213d7b450484c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.10

Security for transitlab 0.2.0

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