Deutsche Bahn Scraper - Train Schedules & Prices
studio-amba/deutsche-bahn-scraper
Scrape train connections, schedules, and prices from Deutsche Bahn (bahn.de). Extract ICE, IC, RE, and S-Bahn routes with departure/arrival times, duration, transfers, carriers, and live fares across Germany and Europe.
What data can you extract?
- Pricing
- Schedules
- Data export
- JSON output
Output fields
Each result is a JSON object with these fields.
- origin
- destination
- departureTime
- arrivalTime
- duration
- durationMinutes
- trainType
- trainNumber
- price
- currency
- travelClass
- transfers
- legs
- carrier
- departurePlatform
- arrivalPlatform
- url
- scrapedAt
How to use
- Go to the actor page on Apify
- Click "Try for free" to open the actor in Apify Console
- Configure your input (search terms, URLs, or categories)
- Run the actor and download your data as JSON, CSV, or Excel
Input example
Paste this into the actor input on Apify Console, or send it as the body of an API run call.
{
"origin": "Berlin Hbf",
"destination": "München Hbf",
"departureDate": "",
"departureTime": "08:00",
"maxResults": 20,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": [
"RESIDENTIAL"
],
"apifyProxyCountry": "DE"
}
} Use via API
curl "https://api.apify.com/v2/acts/studio-amba~deutsche-bahn-scraper/runs" \
-X POST \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"origin":"Berlin Hbf","destination":"München Hbf","departureDate":"","departureTime":"08:00","maxResults":20,"proxyConfiguration":{"useApifyProxy":true,"apifyProxyGroups":["RESIDENTIAL"],"apifyProxyCountry":"DE"}}' Need this data delivered on a schedule?
We run Deutsche-bahn extraction as a managed service: scheduled runs, deduplication, delta detection, and delivery straight to your inbox, Google Sheets, or API. No setup on your side, maintenance included. We can also build a custom version of this scraper for your exact fields and filters.