DSB Scraper - Danish Train Fares & Schedules avatar

DSB Scraper - Danish Train Fares & Schedules

Pricing

Pay per usage

Go to Apify Store
DSB Scraper - Danish Train Fares & Schedules

DSB Scraper - Danish Train Fares & Schedules

Scrape DSB Danish Railways train connections, fares, and timetables. Search by station, date, and time for routes across Denmark. Returns departure times, arrival times, duration, train types, prices in DKK, and transfer details. No login or cookies required.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Studio Amba

Studio Amba

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

DSB Scraper

Scrape DSB (Danske Statsbaner) train connections, fares, and timetables across Denmark. Search by station name, date, and time to get departure information, prices in DKK, train types, and transfer details for any route on the Danish rail network.

This actor uses Playwright to interact with the DSB booking interface and extract structured journey data. No login, cookies, or API keys required.

How to scrape DSB data

  1. Go to the DSB Scraper page on Apify Store.
  2. Click Try for free to open the actor in Apify Console.
  3. Enter your departure station (e.g. "Kobenhavn H") and arrival station (e.g. "Aarhus H").
  4. Optionally set a travel date and departure time.
  5. Click Start and wait for the run to finish.
  6. Download your data in JSON, CSV, Excel, or any other supported format.

Input parameters

ParameterTypeDefaultDescription
originstringKobenhavn HDeparture station name
destinationstringAarhus HArrival station name
departureDatestringtomorrowTravel date in YYYY-MM-DD format
departureTimestring08:00Departure time in HH:MM format
passengersinteger1Number of adult passengers (1-9)
maxResultsinteger20Maximum connections to return (1-100)
proxyConfigurationobjectApify Residential DKProxy settings

Input example

{
"origin": "Kobenhavn H",
"destination": "Aarhus H",
"departureDate": "2026-06-15",
"departureTime": "08:00",
"passengers": 1,
"maxResults": 20
}

Output example

Each connection in the dataset contains the following fields:

{
"trainNumber": "IC 123",
"trainType": "IC",
"departureStation": "Kobenhavn H",
"arrivalStation": "Aarhus H",
"departureTime": "2026-06-15T08:25:00",
"arrivalTime": "2026-06-15T11:40:00",
"duration": "3h 15min",
"durationMinutes": 195,
"price": 399,
"currency": "DKK",
"travelClass": "Standard",
"transfers": 0,
"carrier": "DSB",
"url": "https://www.dsb.dk/",
"scrapedAt": "2026-06-09T10:00:00.000Z"
}

Output fields

FieldTypeDescription
trainNumberstringTrain service identifier (e.g. IC 123, Lyn 45)
trainTypestringTrain category (Lyntog, IC, RE, S-tog, etc.)
departureStationstringDeparture station name
arrivalStationstringArrival station name
departureTimestringDeparture date and time
arrivalTimestringArrival date and time
durationstringHuman-readable duration (e.g. "3h 15min")
durationMinutesintegerDuration in minutes
pricenumberTicket price in DKK (null if unavailable)
currencystringCurrency code (DKK)
travelClassstringTravel class (Standard, DSB 1, Orange, etc.)
transfersintegerNumber of required transfers
carrierstringOperating carrier (DSB, Arriva, etc.)
urlstringLink to the journey on dsb.dk
scrapedAtstringISO 8601 timestamp of data collection

Here are commonly searched routes you can use:

  • Kobenhavn H to Aarhus H (approx. 3h, IC direct)
  • Kobenhavn H to Odense (approx. 1h 30min, IC direct)
  • Kobenhavn H to Aalborg (approx. 4h 30min)
  • Aarhus H to Aalborg (approx. 1h 20min)
  • Odense to Aarhus H (approx. 1h 30min)
  • Kobenhavn H to Esbjerg (approx. 3h)
  • Kobenhavn H to Fredericia (approx. 2h 15min)
  • Aarhus H to Odense (approx. 1h 30min)
  • Kobenhavn H to Roskilde (approx. 25min, RE/S-tog)
  • Kobenhavn H to Helsingor (approx. 45min)

Supported station names

The actor accepts DSB station names as they appear on timetables. Major stations include:

  • Copenhagen area: Kobenhavn H (Central), Norreport, Kobenhavns Lufthavn (Airport), Osterport, Valby
  • Zealand: Roskilde, Hoje Taastrup, Ringsted, Naestved, Korsor, Helsingor, Hillerod
  • Funen: Odense, Nyborg, Svendborg, Middelfart
  • Jutland: Aarhus H, Aalborg, Fredericia, Vejle, Kolding, Esbjerg, Herning, Silkeborg, Randers, Horsens, Viborg
  • Cross-border: Hamburg Hbf, Flensburg, Malmo C (via Oresund)

Station names should match DSB's naming convention. The search is flexible and will match partial names.

DSB ticket types

DSB offers several ticket categories that may appear in results:

  • Standard: Regular second-class fare, fully flexible
  • DSB Orange: Discounted off-peak tickets, non-refundable
  • DSB Orange Fri: Discounted with more flexibility than Orange
  • DSB 1: First-class tickets with extra comfort and services

Prices vary significantly between peak and off-peak hours. Orange tickets offer the best value when available.

Train types on DSB

  • Lyntog (Lyn): Express trains, fastest service between major cities
  • IC (InterCity): Standard long-distance trains connecting major cities
  • RE (Regional): Regional trains serving medium-distance routes
  • S-tog: Copenhagen suburban rail network (S-train)
  • ICE: German ICE trains on cross-border routes to Hamburg

Use cases

  • Travel planning: Find the cheapest and fastest connections for your Denmark trip
  • Price monitoring: Track fare changes on popular routes over time
  • Commuter analysis: Monitor train schedules for daily commutes
  • Research: Analyze Danish public transport patterns and connectivity
  • Travel apps: Feed timetable and fare data into booking platforms or dashboards
  • Academic research: Study rail network utilization and pricing patterns

Tips

  • Use station names as they appear on DSB (e.g. "Kobenhavn H" not "Copenhagen")
  • Leave date and time empty to search from tomorrow at 08:00
  • DSB Orange tickets are cheapest but sell out fast on popular routes
  • Residential proxies with DK country code give the best results
  • The actor includes a Rejseplanen fallback if the main DSB site blocks requests
  • For cross-border journeys to Germany or Sweden, the same search works