BART Real-Time Departures Scraper
parseforge/bart-realtime-departures-scraper
Developer toolsAutomationOther
Scrapes real-time BART departures by station abbreviation. Returns each departure as a flat row with destination, platform, delay, and train length.
- Total users
- 2
- Monthly active
- 1
- Total runs
- 45
- Bookmarked
- 0
- Rating
- Not rated yet
- Last modified
- 9 days ago
Overview
BART Real-Time Departures Scraper
Get real-time BART departures for any station, up to a million per run. Each departure includes destination, platform, delay, and train length. No login or API key required. Export to CSV, JSON, Excel, or XML.
BART's official API requires a key and rate-limits you. This reads the public real-time departure feeds directly, filtered by station and maximum departures, and returns each match in one fixed schema.
| Who uses it | What they scrape BART for |
|---|---|
| Commuters | Check when the next train leaves their station |
| Transit app developers | Feed live departure data into their apps |
| Data analysts | Study BART service patterns and delays |
| Researchers | Analyze public transit performance over time |
What it does
This Actor collects real-time BART departures by station abbreviation and returns each one as a flat row.
- ๐ Station selection: choose one or more station abbreviations, or use ALL for every station.
- ๐ข Departure limit: set the maximum number of departures to return, from 1 to 1,000,000.
- ๐ Optional API key: use your own BART API key for higher limits, or rely on the public key for light usage.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with BART data
๐ Build a departure board.
A developer runs the Actor every minute for station MONT and displays the next trains on a screen.
๐ Analyze service delays.
A transit analyst collects departures for all stations over a week and computes average delay per line.
๐ Send commute alerts.
A hobbyist schedules the Actor for station EMBR and gets a notification when the next train is delayed.
๐ Track platform usage.
A researcher gathers departures for station POWL to see which platforms are most active at rush hour.
Why choose this scraper
| What you get | |
|---|---|
| Real-time data | Departures are fetched live from BART's public feed |
| Flexible stations | Query one station, several, or all 50 BART stations |
| Scalable output | Return up to a million departures per run for paid users |
| Simple schema | Each departure is a flat row with destination, platform, delay, and more |
How it compares
No other Store actor targets BART the same way, so the honest comparison is with the alternatives teams actually weigh.
| BART Real-Time Departures Scraper | Build it in-house | By hand | |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When BART changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |
Configure the run
Drive the Actor from station abbreviations and a maximum departure count, and filters run as each departure is read so only matches reach your dataset. The Input tab lists every parameter.
A first run with the defaults:
{
"stations": [
"12TH"
],
"maxItems": 10
}
A larger pull:
{
"stations": [
"12TH"
],
"maxItems": 200
}
Pricing
Pay-per-result: $0.0085 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $0.85 |
| 1,000 results | $8.50 |
| 10,000 results | $85.00 |
New Apify accounts start with $5 in free credit.
Free users
Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.
Run it
- Create a free Apify account with $5 in credit.
- Open the BART Real-Time Departures Scraper.
- Set your inputs and any filters, then click Start.
- Export the results as CSV, Excel, JSON, or XML from the Dataset tab.
Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.
Use with AI agents (MCP)
Give an AI agent live access to BART through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/bart-realtime-departures-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting no results?
Check that your station abbreviations are correct. Use the list in the input schema or try ALL to see all stations.
Why am I limited to 10 departures?
Free Apify users are limited to 10 departures per run. Upgrade to a paid plan to increase the limit.
Why do I get an error about the API key?
The public key may be rate-limited. Provide your own BART API key in the input to avoid this.
Why is the data not updating?
BART's feed updates every few seconds. If you run the Actor repeatedly, you should see new departures. If not, check your station selection.
FAQ
| Question | Answer |
|---|---|
| Do I need a BART API key? | No, the Actor includes a public key that works for light usage. You can provide your own key for higher limits. |
| How do I specify stations? | Use the station abbreviations like 12TH, MONT, or EMBR. You can select multiple stations or use ALL for every station. |
| What is the maximum number of departures I can get? | Free users are limited to 10 departures per run. Paid users can request up to 1,000,000 departures. |
| How fresh is the data? | The Actor fetches departures in real time from BART's public feed, so the data is as current as BART provides. |
| Can I export the results? | Yes, you can export to CSV, JSON, Excel, or XML from the Apify platform. |
| What does each departure record include? | Each record includes destination, platform, delay, train length, and other fields from BART's feed. |
| Is this Actor affiliated with BART? | No, this is an independent scraper that uses BART's public data. It is not endorsed by BART. |
| Can I schedule this Actor to run automatically? | Yes, you can set up a schedule in Apify to run it every minute, hour, or day. |
Related actors
Browse the full ParseForge collection for more scrapers.
๐ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.
โ ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by San Francisco Bay Area Rapid Transit District. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.
Input
| Field | Type | What it does | Default |
|---|---|---|---|
| stations | array | BART station abbreviations to query (e.g. 12TH, MONT, EMBR, ALL). Use ALL for all stations. | ["12TH"] |
| maxItems | integer | Free users limited to 10 departures (preview). Paid users optional, up to 1,000,000. | 10 |
| apiKey | string | Optional BART API key. Public key MW9S-E7SL-26DU-VV8V works for light usage. | not set |
Pricing
from $7.50 per 1,000 results
| Charged for | What it is | Price each |
|---|---|---|
| result | Single result in the default dataset. | $0.0075 to $0.0085 |
Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.
API
One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.
curl -X POST "https://api.apify.com/v2/acts/parseforge~bart-realtime-departures-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"helloWorld": 123
}' Examples
Input that runs as-is.
{
"helloWorld": 123
} Reviews
No reviews yet. Be the first.
Issues
We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.
Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.
