Deutsche Bahn Train Times, Fares & Routes Scraper avatar

Deutsche Bahn Train Times, Fares & Routes Scraper

Pricing

from $2.00 / 1,000 results

Go to Apify Store
Deutsche Bahn Train Times, Fares & Routes Scraper

Deutsche Bahn Train Times, Fares & Routes Scraper

Scrape German and European train connections from bahn.de: departure and arrival times, duration, transfers, ICE/IC/RE train types and cheapest fares across 5500+ stations. Export to JSON, CSV or Excel.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

Scrapers Lat

Scrapers Lat

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

Deutsche Bahn Train Times, Fares & Routes Scraper

Deutsche Bahn Train Times, Fares & Routes Scraper

Extract German and European train connections from bahn.de: live departure and arrival times, duration, transfers, ICE/IC/RE train types and ticket prices across 5500+ stations.

📥 Input · 📤 Output · 💰 Pricing · ▶️ Examples

Apify Coverage Maintained Output

22 fields
per record
Germany + Europe
coverage
JSON / CSV / Excel
output formats

What you get

Each record is one train connection between two stations on a chosen date and time, with its full leg breakdown, train types and cheapest available fare. Use it to monitor prices, feed a travel planner, compare routes or build a timetable dataset.

  • from: origin station name
  • to: destination station name
  • departure: departure datetime of the connection
  • arrival: arrival datetime of the connection
  • durationMinutes: total travel time in minutes
  • transfers: number of transfers (changes) on the connection
  • trainTypes: distinct train categories used, such as ICE, EC_IC, IR, REGIONAL or SBAHN
  • trains: the individual trains in order, such as ICE 505
  • price: cheapest standard fare for the selected class, when bahn.de offers a through ticket
  • currency: currency of the price, usually EUR
  • priceClass: travel class the price refers to
  • legs: per-leg breakdown with from, to, departure, arrival, train, train type, direction and number of stops
  • notices: service notices such as construction work or expected delays on the route
  • fromExtId: numeric station id of the origin
  • toExtId: numeric station id of the destination
  • tripId: bahn.de identifier of the connection
  • searchDate: the travel date the connection was searched for
  • fares*: full fare breakdown with each offer name (Flexpreis, Sparpreis, Super Sparpreis, BahnCard offers), class and price
  • cheapestFareName*: name of the cheapest fare found across all offers
  • cheapestFarePrice*: price of the cheapest fare found
  • observedAt: when this connection was last seen by the scraper

*These fields only appear when withDetails is set to true.

Who is it for

Use caseWho benefits
Monitor ticket prices on a route over timeTravel deal sites and price trackers
Feed a multimodal trip planner with live timetablesMobility and travel app developers
Compare routes, durations and transfers between citiesCorporate travel and expense teams
Build a historical dataset of train schedules and faresData analysts and researchers
Alert on delays or construction notices for a routeCommuter tools and operations teams

Frequently Asked Questions

Which countries and stations does this cover?
It covers the full Deutsche Bahn network across Germany plus cross-border European connections that bahn.de sells, including hubs like Wien Hbf, Zurich HB, Amsterdam Centraal and Paris. You can search any of the 5500+ stations and cities in the bahn.de timetable by name.

How many connections can I get per run?
Set Max Items to control the count. The scraper works forward in time from your chosen departure and keeps going until it reaches your limit, so you can collect dozens of connections for a single route and date.

Can I search by arrival time instead of departure?
Yes. Set Time refers to "Arrive by" and the scraper returns connections that arrive at or before the time you set, instead of departing from it. You can also pick first or second class and cap the number of transfers.

Why is the price sometimes empty?
Some cross-border or regional connections do not have a single through ticket on bahn.de, so no combined price is returned and the price is left empty while the times, legs and train types are still captured. Enable fare details to also pull every individual fare offer where available.

Do I need to configure a proxy?
No. A German residential proxy is enabled by default, so you do not need to configure anything to retrieve live connections and prices reliably. Station search works without it.

Example use cases

Ready-to-run example tasks, each preconfigured for a common scenario. Open one and press run, or use it as a template:

Export, API and AI agents (x402 + MCP)

Export the scraped data to JSON, CSV or Excel, pull it as a dataset through the Apify API, or wire it into your app with no code. This web scraper and data extractor also works for bulk data extraction and scheduled runs.

For AI agents: this Actor is available on x402, Apify's agentic payment standard built with Coinbase. An AI agent can discover, pay for and run it on its own with a funded wallet and a single HTTP request: no account, no subscription, no API key and no human in the loop. It also runs as an MCP tool inside Claude, Cursor and other AI clients out of the box. Learn more about x402 agentic payments on Apify.

Need data from the same space? Here are other scrapers we build and maintain:

More scrapers at scrapers.lat

This actor is built and maintained by scrapers.lat, where we publish scrapers for Latin American and US public platforms: real estate, jobs, e-commerce, company registries and government data. Browse the full catalog, see live sample output for each one, or ask us for a custom scraper at scrapers.lat.


This actor is an independent tool and has no affiliation with Deutsche Bahn. It only accesses data that is publicly available on the platform. Use it in accordance with Deutsche Bahn's terms of service.