SJ Scraper - Swedish Train Fares & Schedules avatar

SJ Scraper - Swedish Train Fares & Schedules

Pricing

from $1.20 / 1,000 result scrapeds

Go to Apify Store
SJ Scraper - Swedish Train Fares & Schedules

SJ Scraper - Swedish Train Fares & Schedules

Scrape train schedules, fares, and availability from SJ (sj.se), Sweden's national railway. Extract Snabbtag, InterCity, and regional train data for any Swedish route. No login required.

Pricing

from $1.20 / 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

How to scrape SJ data

SJ Scraper extracts train schedules, ticket fares, availability, and journey details from SJ — the official booking platform of Sweden's national railway operator. SJ operates high-speed (Snabbtag/X2000), InterCity, regional, and night train services across Sweden and to neighboring countries.

This Actor uses Playwright to navigate the SJ search interface, extract train results including departure times, prices in SEK, train types, and travel classes, and return structured data ready for analysis, fare monitoring, or integration with your travel platform. No login or cookies required.

Why use SJ Scraper?

  • Fare monitoring — Track ticket prices across routes and dates to find the best deals or monitor fare trends over time.
  • Travel research — Compare routes, durations, and train types (Snabbtag, InterCity, Regional) for any Swedish destination.
  • Market intelligence — Collect structured pricing data for competitive analysis in the Scandinavian travel industry.
  • Schedule tracking — Monitor train schedules and connections for commuter or business travel planning.
  • API access — Get SJ train data via Apify API, webhooks, or scheduled runs. Integrate with Zapier, Make, Google Sheets, or your own applications.

What data can you extract from SJ?

FieldDescription
trainNumberSJ train number identifier
trainTypeService type (SJ Snabbtag, SJ InterCity, SJ Regional, X2000, etc.)
departureStationDeparture station or city
arrivalStationArrival station or city
departureTimeDeparture time (HH:mm)
arrivalTimeArrival time (HH:mm)
durationTotal travel time (e.g., 3h 5min)
priceTicket price in SEK
currencyCurrency code (SEK)
travelClassSeat class (1st, 2nd)
changesNumber of transfers
urlSource URL
scrapedAtTimestamp of extraction

How to use SJ Scraper

  1. Go to the SJ Scraper input page.
  2. Enter your origin station (e.g., Stockholm) and destination station (e.g., Goteborg).
  3. Optionally set a departure date in YYYY-MM-DD format. If left empty, defaults to 14 days from today.
  4. Set the number of passengers (default: 1).
  5. Configure max results to limit the number of train results returned.
  6. Click Start and wait for the run to complete.
  7. Download your data from the Dataset tab in JSON, CSV, Excel, or HTML format.

Input parameters

ParameterTypeDefaultDescription
originstringStockholmDeparture city or station name
destinationstringGoteborgArrival city or station name
departureDatestring14 days from todayTravel date (YYYY-MM-DD)
passengersinteger1Number of adult passengers (1-9)
maxResultsinteger50Maximum results to return
proxyConfigurationobjectResidential SEProxy settings (residential recommended)

Example input

{
"origin": "Stockholm",
"destination": "Goteborg",
"departureDate": "2026-07-15",
"passengers": 1,
"maxResults": 20
}

Output example

{
"trainNumber": "525",
"trainType": "SJ Snabbtag",
"departureStation": "Stockholm",
"arrivalStation": "Goteborg",
"departureTime": "06:25",
"arrivalTime": "09:30",
"duration": "3h 5min",
"price": 345,
"currency": "SEK",
"travelClass": "2nd",
"changes": 0,
"url": "https://www.sj.se/en",
"scrapedAt": "2026-06-09T10:30:00.000Z"
}

How much does it cost to scrape SJ?

A typical run searching one route returns 10-30 train results and costs approximately $0.10-0.25 in Apify platform credits, depending on proxy usage and result count. The Actor uses Playwright (browser-based) which consumes more compute than HTTP-only scrapers, but this is necessary because SJ.se is a JavaScript single-page application.

To keep costs down:

  • Set maxResults to only what you need.
  • Use a specific date rather than leaving it to default.
  • Schedule runs during off-peak hours for faster loading.

Supported routes

SJ covers all major Swedish rail routes and some international connections:

  • High-speed (SJ Snabbtag / X2000) — Stockholm-Goteborg, Stockholm-Malmo, Stockholm-Sundsvall, Goteborg-Malmo, Stockholm-Karlstad, and more.
  • InterCity — Medium and long-distance routes across Sweden.
  • Regional — Local and regional connections in Swedish regions.
  • Night train (SJ Nattag) — Overnight services to northern Sweden (Lulea, Kiruna, Narvik).
  • International — Stockholm-Copenhagen, Stockholm-Oslo, Goteborg-Copenhagen, Malmo-Copenhagen.

Tips for best results

  • Use residential proxies — SJ.se is a modern JavaScript SPA. Residential proxies with SE country code provide the best success rate.
  • Set realistic dates — SJ typically shows results for dates up to 3 months in advance. Past dates or dates too far in the future will return no results.
  • Use common station names — Major cities like Stockholm, Goteborg, Malmo, Uppsala, Linkoping, and Lund work well. For smaller stations, use the official SJ station name.
  • Run during business hours (CET) — SJ.se tends to respond faster during European daytime hours.

Integrations

Connect SJ Scraper to your workflow with:

  • Apify API — Call programmatically from any language.
  • Webhooks — Get notified when a run completes.
  • Scheduled runs — Monitor fares daily or weekly.
  • Zapier / Make — No-code integration with 5000+ apps.
  • Google Sheets — Export results directly to a spreadsheet.

FAQ

This Actor extracts publicly available train schedule and pricing information that any visitor can see on sj.se. No login, authentication, or account is required. Always ensure your use case complies with applicable laws and SJ's terms of service.

Why did my run return zero results?

SJ.se is a JavaScript SPA which may block automated requests. Make sure you are using residential proxies with SE country code. Also verify that your origin and destination station names are valid and your departure date is in the future.

Can I scrape multiple routes in one run?

Currently the Actor searches one route per run. To scrape multiple routes, trigger separate runs with different origin/destination combinations using the Apify API or scheduler.

How often is pricing data updated?

SJ updates prices dynamically based on demand and booking period. For accurate fare tracking, schedule runs at consistent times (e.g., daily at 8:00 AM CET).

What train operators are covered?

The scraper covers SJ-operated services (Snabbtag, InterCity, Regional, Night Train). Other operators visible on sj.se such as MTRX or Vy may also appear in results when available on the same routes.

Support and feedback

If you encounter issues or have feature requests, please open an issue in the Issues tab. For custom scraping solutions, reach out via the Actor's page on the Apify Store.