VOOZH about

URL: https://apify.com/studio-amba/deutsche-bahn-scraper

⇱ Deutsche Bahn Scraper API - German Train Schedules · Apify


👁 Deutsche Bahn Scraper - Train Schedules & Prices avatar

Deutsche Bahn Scraper - Train Schedules & Prices

Pricing

from $8.00 / 1,000 result scrapeds

Go to Apify Store

Deutsche Bahn Scraper - Train Schedules & Prices

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.

Pricing

from $8.00 / 1,000 result scrapeds

Rating

0.0

(0)

Developer

👁 Studio Amba

Studio Amba

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Categories

Share

Deutsche Bahn Scraper

Scrape train connections, schedules, and prices from Deutsche Bahn (bahn.de), Germany's national railway operator with over 50 million monthly visitors. Extract ICE, IC, RE, RB, and S-Bahn routes with departure/arrival times, durations, transfer counts, platform numbers, carrier information, and live ticket fares.

No login or cookies required. The actor handles bahn.de's complex SPA and anti-bot protections automatically using residential proxies and a headless browser.

How to scrape Deutsche Bahn data

  1. Go to Deutsche Bahn Scraper on the Apify Store.
  2. Click Try for free to open the actor in Apify Console.
  3. Enter your origin and destination stations (e.g., "Berlin Hbf" to "München Hbf").
  4. Optionally set a departure date and time.
  5. Click Start and wait for the results.
  6. Download your data in JSON, CSV, Excel, or connect it directly to your workflow via API.

Why use this actor?

  • Comprehensive data — Get full connection details including train types, prices, platforms, transfer counts, and individual journey legs in a single run.
  • No login needed — Extracts publicly available schedule and pricing data without any Deutsche Bahn account.
  • Handles the SPA — bahn.de is a complex single-page application. This actor uses Playwright to properly render the page and extract data that simple HTTP scrapers miss.
  • Scheduled runs — Set up daily or hourly schedules to monitor price changes on your preferred routes.
  • API access — Integrate train data directly into your applications, dashboards, or business workflows using the Apify API.

Input

ParameterTypeDefaultDescription
originstringBerlin HbfDeparture station name. Partial names are resolved automatically.
destinationstringMünchen HbfArrival station name. Partial names are resolved automatically.
departureDatestringTomorrowSearch date in YYYY-MM-DD format.
departureTimestring08:00Earliest departure time in HH:MM format (24h).
travelClassstring2Travel class: 1 (First) or 2 (Second).
maxResultsinteger20Maximum number of connections to return (1-200).
proxyConfigurationobjectResidential DEProxy settings. Residential proxies with a German exit node are recommended.

Example input

{
"origin":"Berlin Hbf",
"destination":"München Hbf",
"departureDate":"2026-06-15",
"departureTime":"08:00",
"travelClass":"2",
"maxResults":20,
"proxyConfiguration":{
"useApifyProxy":true,
"apifyProxyGroups":["RESIDENTIAL"],
"apifyProxyCountry":"DE"
}
}

Output

The actor produces a dataset with one item per train connection. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

Example output

{
"origin":"Berlin Hbf",
"destination":"München Hbf",
"departureTime":"2026-06-15T08:15:00+02:00",
"arrivalTime":"2026-06-15T12:10:00+02:00",
"duration":"3h 55min",
"durationMinutes":235,
"trainType":"ICE",
"trainNumber":"ICE 1001",
"price":29.90,
"currency":"EUR",
"travelClass":"2",
"transfers":0,
"legs":[
{
"origin":"Berlin Hbf",
"destination":"München Hbf",
"departureTime":"2026-06-15T08:15:00+02:00",
"arrivalTime":"2026-06-15T12:10:00+02:00",
"trainType":"ICE",
"trainNumber":"ICE 1001",
"carrier":"DB Fernverkehr",
"departurePlatform":"6",
"arrivalPlatform":"12"
}
],
"carrier":"DB Fernverkehr",
"departurePlatform":"6",
"arrivalPlatform":"12",
"url":"https://int.bahn.de/en/buchung/fahrplanauskunft?...",
"scrapedAt":"2026-06-09T14:30:00.000Z"
}

Data fields

FieldTypeDescription
originstringDeparture station name
destinationstringArrival station name
departureTimestringISO 8601 departure timestamp
arrivalTimestringISO 8601 arrival timestamp
durationstringHuman-readable duration (e.g., "3h 55min")
durationMinutesnumberDuration in minutes for easy sorting/filtering
trainTypestringPrimary train category: ICE, IC/EC, RE/RB, S-Bahn, TGV, etc.
trainNumberstringFull train identifier (e.g., "ICE 1001")
pricenumberTicket price in EUR (0 if not available)
currencystringAlways "EUR"
travelClassstringTravel class searched (1 or 2)
transfersnumberNumber of transfers/changes
legsarrayIndividual trip segments with per-leg train details
carrierstringOperating railway company (e.g., "DB Fernverkehr")
departurePlatformstringDeparture platform/track number
arrivalPlatformstringArrival platform/track number
urlstringDirect link to this connection on bahn.de
scrapedAtstringISO 8601 timestamp of when the data was collected

How much does it cost to scrape Deutsche Bahn?

The actor uses Playwright with residential proxies, which consumes approximately 0.2-0.5 compute units per run for a typical search of 20 connections. That translates to roughly $0.05-$0.12 per run at standard Apify pricing. Running daily monitoring on a single route would cost approximately $1.50-$3.60 per month.

For high-volume usage, increase maxResults and use the pagination feature to get more connections per run rather than running multiple separate searches.

Tips

  • Use German station names for best results. "München Hbf" works better than "Munich Central".
  • Prices may not always be available — Deutsche Bahn shows prices dynamically and some connections may return a price of 0. This typically means the fare is not yet released or sold out.
  • Schedule runs during off-peak hours for the most reliable results.
  • Residential proxies with a German exit node (DE) are strongly recommended. bahn.de has Akamai protection that blocks datacenter IPs.
  • Search ahead — Deutsche Bahn releases tickets 6 months in advance. Earlier searches tend to show lower "Sparpreis" fares.

FAQ

Is it legal to scrape Deutsche Bahn?

This actor extracts publicly available train schedule and pricing data from bahn.de. The data is accessible to any visitor without login. Always review Deutsche Bahn's Terms of Service and ensure your use case complies with applicable laws and regulations.

Why are some prices showing as 0?

Deutsche Bahn loads prices dynamically and some fare classes may not be available for all connections. A price of 0 means the fare was not displayed on the search results page. Try searching for a closer departure date when prices are more likely to be published.

The actor returned no results — what should I do?

  • Make sure your station names are valid German station names (e.g., "Frankfurt (Main) Hbf" not "Frankfurt Airport").
  • Check that your departure date is in the future.
  • Ensure you are using residential proxies with a German exit node.
  • Try a popular route like "Berlin Hbf" to "München Hbf" to verify the actor is working.

Can I scrape international routes?

Yes, Deutsche Bahn covers international connections to Austria, Switzerland, France, Netherlands, Belgium, Czech Republic, Poland, Denmark, and more. Enter the destination as it appears on bahn.de (e.g., "Wien Hbf", "Zürich HB", "Paris Est").

Support

If you encounter any issues or have feature requests, please open an issue in the Issues tab. For custom solutions or bulk data needs, reach out via the Apify platform.

You might also like

Deutsche Bahn Timetable Scraper - Schedules & Real-Time Delays

jungle_synthesizer/deutsche-bahn-timetable-scraper

Scrape Deutsche Bahn (bahn.de) journey plans, train schedules, platforms, transfers, real-time delays, and occupancy forecasts. Supports ICE, IC/EC, RE, RB, S-Bahn across Germany plus international DB routes (AT, CH, FR, NL, BE, PL, DK).

👁 User avatar

BowTiedRaccoon

7

Deutsche Bahn Train Tickets & Connections Scraper

jindrich.bar/deutsche-bahn-ticket-scraper

Scrape live Deutsche Bahn train connections, schedules, ticket prices, transfers, delays, and fares across Germany and Europe. Extract structured DB timetable data for travel apps, price monitoring, analytics, and AI agents.

👁 User avatar

Jindřich Bär

13

5.0

SBB Scraper — Swiss Train Timetable & Connections

studio-amba/sbb-scraper

Scrape Swiss Federal Railways (SBB) train connections, timetables, and schedules. Search by station name and date. Returns departure times, arrival times, duration, train types, platforms, and transfer details. No login or cookies required.

👁 User avatar

Studio Amba

2

ÖBB Train Ticket and Connection Scraper

jindrich.bar/oebb-ticket-scraper

Scrape live Austrian Federal Railways train connections, schedules, ticket prices, transfers, delays, and fares across Austria and Europe. Extract structured ÖBB timetable data for travel apps, price monitoring, analytics, and AI agents.

👁 User avatar

Jindřich Bär

3

5.0

FlixBus Scraper — Bus & Train Schedules, Fares (40+ Countries)

jungle_synthesizer/flixbus-multi-country-scraper

Scrape FlixBus group schedules, fares, and availability across 40+ countries. Returns departure/arrival times, duration, transfers, price, seat availability, Wi-Fi/power/bike/wheelchair info. For travel aggregators, fare comparison tools, and mobility planners.

👁 User avatar

BowTiedRaccoon

11

Irish Rail Scraper - Train Fares & Schedules

studio-amba/irish-rail-scraper

Scrape train schedules, fares, and real-time data from Irish Rail (irishrail.ie). Extract Intercity, DART, Commuter, and Enterprise routes across Ireland. No login required.

👁 User avatar

Studio Amba

2

SNCF Train Ticket and Connection Scraper

jindrich.bar/sncf-train-ticket-scraper

Scrape live SNCF train connections, schedules, ticket prices, transfers, delays, and fares across France and Europe. Extract structured SNCF timetable data for travel apps, price monitoring, analytics, and AI agents.

👁 User avatar

Jindřich Bär

4

5.0

Trenitalia Train Ticket and Connection Scraper

jindrich.bar/trenitalia-ticket-scraper

Scrape live Trenitalia train connections, schedules, ticket prices, transfers, delays, and fares across Italy and Europe. Extract structured Trenitalia timetable data for travel apps, price monitoring, analytics, and AI agents.

👁 User avatar

Jindřich Bär

5

5.0

FlixBus Route & Price Scraper

parseforge/flixbus-scraper

Scrape FlixBus routes, schedules, and prices across Europe, North America, and beyond. Get departure and arrival times, duration, transfers, seat availability, and multi-leg journey details. Search by origin and destination city.

11

SNCF Scraper - French Train Schedules & Prices

studio-amba/sncf-scraper

Scrape train schedules, prices, and availability from SNCF Connect (sncf-connect.com). Extract TGV, TER, and Intercites routes across France and Europe. No login required.

👁 User avatar

Studio Amba

2