SJ Scraper - Swedish Train Fares & Schedules
Pricing
from $1.20 / 1,000 result scrapeds
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
Maintained by CommunityActor 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?
| Field | Description |
|---|---|
| trainNumber | SJ train number identifier |
| trainType | Service type (SJ Snabbtag, SJ InterCity, SJ Regional, X2000, etc.) |
| departureStation | Departure station or city |
| arrivalStation | Arrival station or city |
| departureTime | Departure time (HH:mm) |
| arrivalTime | Arrival time (HH:mm) |
| duration | Total travel time (e.g., 3h 5min) |
| price | Ticket price in SEK |
| currency | Currency code (SEK) |
| travelClass | Seat class (1st, 2nd) |
| changes | Number of transfers |
| url | Source URL |
| scrapedAt | Timestamp of extraction |
How to use SJ Scraper
- Go to the SJ Scraper input page.
- Enter your origin station (e.g., Stockholm) and destination station (e.g., Goteborg).
- Optionally set a departure date in YYYY-MM-DD format. If left empty, defaults to 14 days from today.
- Set the number of passengers (default: 1).
- Configure max results to limit the number of train results returned.
- Click Start and wait for the run to complete.
- Download your data from the Dataset tab in JSON, CSV, Excel, or HTML format.
Input parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| origin | string | Stockholm | Departure city or station name |
| destination | string | Goteborg | Arrival city or station name |
| departureDate | string | 14 days from today | Travel date (YYYY-MM-DD) |
| passengers | integer | 1 | Number of adult passengers (1-9) |
| maxResults | integer | 50 | Maximum results to return |
| proxyConfiguration | object | Residential SE | Proxy 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
maxResultsto 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
Is it legal to scrape SJ?
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.