Programmatic access
Individual files can be downloaded on the browse the data page. If you're interested in downloading the whole dataset you'll want to do so using a script.
All of the files are hosted on a Cloudflare R2 bucket and downloads come directly from Cloudflare. Any problems with downloading files in bulk will likely be because of Cloudflare rate limiting or abuse prevention.
The CSV files for the date YYYY-MM-DD can be downloaded at the URL:
https://subwaydata.nyc/data/subwaydatanyc_YYYY-MM-DD_csv.tar.xz
The GTFS realtime files are at the URL:
https://subwaydata.nyc/data/subwaydatanyc_YYYY-MM-DD_gtfsrt.tar.xz
For example, the data for 2023-09-15 is at
https://subwaydata.nyc/data/subwaydatanyc_2023-09-15_csv.tar.xz https://subwaydata.nyc/data/subwaydatanyc_2023-09-15_gtfsrt.tar.xz
Note that month and day numbers always have two digits.
To download all CSV data for September 2023, you can run a Python script like this:
import requests
for i in range(1, 31):
file_name = f"subwaydatanyc_2023-09-{i:02}_csv.tar.xz"
url = f"https://subwaydata.nyc/data/{file_name}"
response = requests.get(url)
with open(file_name, "wb") as f:
f.write(response.content)