České Dráhy Connections Scraper avatar

České Dráhy Connections Scraper

Pricing

from $0.50 / 1,000 search results

Go to Apify Store
České Dráhy Connections Scraper

České Dráhy Connections Scraper

Scrape train connections from České Dráhy (Czech state railways) with departure dates, prices, train types, and more.

Pricing

from $0.50 / 1,000 search results

Rating

5.0

(2)

Developer

Jindřich Bär

Jindřich Bär

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

0

Monthly active users

2 days ago

Last modified

Share

České dráhy connection scraper

Search train connections on cd.cz and get back a structured dataset of routes, times, train legs, and prices.

What it does

Given a departure station, a destination, and an optional date/time, the actor finds the next train connections offered by České dráhy and stores them in the dataset. For each connection you get:

  • Departure and arrival as ISO timestamps
  • Total travel time in minutes
  • Number of transfers
  • Per-train breakdown: name, carrier, end station, departure / arrival, distance in kilometres, expected occupancy
  • Price in CZK (when ticketing is available)

The actor automatically paginates over the cd.cz timetable and skips gaps in service so you reliably get the requested number of connections — even for routes where direct service runs only on selected days.

Inputs

FieldRequiredDefaultDescription
fromyesDeparture station name (Czech diacritics supported)
toyesDestination station name (foreign cities should include the country, e.g. "München; Německo")
datenotodayDeparture date (date picker, ISO YYYY-MM-DD)
timenonow + 2 hDeparture time (HH:MM)
maxChangesno4Maximum allowed transfers per connection
onlyDirectConnectionsnofalseOnly return connections without transfers
serviceClassnoClass2Class1, Class2, or ClassBusiness
maxResultsno20Maximum number of connections to push to the dataset
fetchPricesnotrueWhether to fetch the price for each connection

Example input

{
"from": "Praha hl.n.",
"to": "Copenhagen",
"date": "2026-05-14",
"time": "00:00",
"onlyDirectConnections": true,
"maxResults": 20,
"fetchPrices": true
}

Output

Each item in the dataset describes one connection.

Example item

{
"id": 80002583,
"handle": 27910947,
"from": "Praha hl.n.",
"to": "Koebenhavn H",
"departure": "2026-05-14T04:31:00.000Z",
"arrival": "2026-05-14T17:38:00.000Z",
"timeLengthMinutes": 787,
"changesCount": 0,
"price": 4280,
"trains": [
{
"name": "rj 384 Berliner",
"number": "384",
"carrier": "ČD",
"endStation": "Hamburg-Altona",
"from": "Praha hl.n.",
"to": "Koebenhavn H",
"departure": "2026-05-14T04:31:00.000Z",
"arrival": "2026-05-14T17:38:00.000Z",
"timeLengthMinutes": 787,
"distanceKilometres": 1124,
"delay": -1,
"waitTime": 0,
"occupancyLevel": 0,
"description": "railjet (Praha hl.n. – Hamburg-Altona)"
}
]
}

price is in CZK; null means the price could not be retrieved (sold out, no ticketing available, or fetchPrices: false). changesCount is 0 for direct connections.

Pricing

The actor uses Apify pay-per-event pricing — one search-result event is charged for every connection pushed to the dataset.

Agentic use

The actor is built for use by AI agents:

  • Structured input schema. Every input has a title, type, description, and validation rules so an agent can fill it in correctly without extra prompting.
  • Structured output schema. Each dataset item has a stable, typed shape — agents can read fields like departure, price, or changesCount without parsing prose.
  • ISO timestamps. Departures and arrivals are emitted as ISO 8601 UTC strings (2026-05-14T04:31:00.000Z), ready to be diffed, sorted, or compared.
  • Numeric quantities. timeLengthMinutes, distanceKilometres, changesCount, price are numbers, not formatted strings — no parsing of "2 hod 48 min" or "213 km" required.
  • Predictable output. Connections are returned in chronological order; duplicates are removed; gaps in the cd.cz timetable are skipped automatically up to maxResults.
  • Event-level cost control. Pay-per-event billing means an agent that sets a small maxResults pays only for what it consumes.

Typical agent prompts that map cleanly onto this actor:

  • "Find the cheapest train from Praha to Brno tomorrow morning."
  • "How long does the direct train from Praha to Berlin take, and when does the next one leave?"
  • "List all direct overnight trains from Praha to Copenhagen in the next two weeks."

The agent populates the input, runs the actor, then reads the resulting dataset items directly — no scraping, no HTML, no string parsing.