Download a small table as one Parquet file
The whole of a small table in a single Parquet file.
GET
https://data.transitlab.nyc/v1/{table}.parquet No keyThe catalog lists the same URL in the table’s files. Supports HTTP Range requests, so a client such as DuckDB can read only the parts it needs.
Request
Section titled “Request”curl https://data.transitlab.nyc/v1/subway_slow_zones.parquet \ -o subway_slow_zones.parquetimport requests
r = requests.get( "https://data.transitlab.nyc/v1/subway_slow_zones.parquet", stream=True, timeout=60,)r.raise_for_status()with open("subway_slow_zones.parquet", "wb") as f: for chunk in r.iter_content(1 << 20): f.write(chunk)const res = await fetch("https://data.transitlab.nyc/v1/subway_slow_zones.parquet")if (!res.ok) throw new Error(`HTTP ${res.status}`)const bytes = new Uint8Array(await res.arrayBuffer())Authorization
Section titled “Authorization”No key needed.
Parameters
Section titled “Parameters”-
tablestring requiredTable name. One of
subway_slow_zones,subway_slow_zones_weekly,bus_route_speeds,bus_lanes,bus_lane_streets,subway_trains_delayed,subway_terminal_on_time,subway_wait_assessment,mta_daily_ridership.
Responses
Section titled “Responses”200 OK
Section titled “200 OK”The Parquet file.
Headers:
-
Accept-Rangesstring -
ETagstring
Body:
application/vnd.apache.parquet: The file.application/octet-stream: The file.
Errors
Section titled “Errors”| Status | When |
|---|---|
404 | Not found. No such table. |