SYSTEM all green source sj.se queue 14,802 routes p99 latency 312ms dataflirt.com · scraper/sj-se
RUN · 41 active pipelines · sj.se live

Swedish rail data,
at warehouse scale.

We extract timetables, dynamic pricing signals, seat availability, and route details from SJ. Delivered as clean JSON, CSV, or Parquet to S3, BigQuery, or Snowflake on your cadence.

Fares extracted
412K /day
Route updates
89K /24h
Station nodes
1,241 /run
Active pipelines
41
Uptime
99.94%
Data Dictionary

Every field we extract from sj.se

Structured, schema-consistent data across all major object types — delivered clean, typed, and ready to query.

Complete list of extractable fields for Fares & Timetables objects from sj.se. All fields typed and schema-versioned.

departure_stationarrival_stationdeparture_timearrival_timeduration_minutesprice_sekticket_classtrain_typetrain_numberavailable_seatstransfersoperator
fares_& timetables
● 200 OK
"departure_station": "Stockholm Central",
"arrival_station": "Göteborg C",
"departure_time": "2026-10-14T08:14:00Z",
"arrival_time": "2026-10-14T11:25:00Z",
"price_sek": 495.0,
"train_type": "SJ Snabbtåg (X2000)",
"train_number": "421",
"transfers": 0
# departure_stationarrival_stationdeparture_timearrival_timeduration_minutesprice_sek
1
2
3

Complete list of extractable fields for Route Details objects from sj.se. All fields typed and schema-versioned.

route_idorigindestinationintermediate_stopstotal_distance_kmoperatortrain_modelonboard_servicestrack_numberstatuslast_updated
route_details
● 200 OK
"route_id": "RT-421-STO-GOT",
"origin": "Stockholm Central",
"destination": "Göteborg C",
"intermediate_stops": "['Södertälje Syd', 'Katrineholm C', 'Skövde C']",
"train_model": "X2000",
"onboard_services": "['Bistro', 'WiFi', 'Quiet Zone']",
"status": "Scheduled"
# route_idorigindestinationintermediate_stopstotal_distance_kmoperator
1
2
3

Complete list of extractable fields for Station Metadata objects from sj.se. All fields typed and schema-versioned.

station_idstation_namecityregionlatitudelongitudefacilitiesconnectionstimezoneshort_code
station_metadata
● 200 OK
"station_id": "ST-001",
"station_name": "Stockholm Central",
"city": "Stockholm",
"latitude": 59.33,
"longitude": 18.0583,
"facilities": "['Lounge', 'Luggage Storage', 'Restrooms']",
"short_code": "Cst"
# station_idstation_namecityregionlatitudelongitude
1
2
3

Complete list of extractable fields for Ticket Classes & Options objects from sj.se. All fields typed and schema-versioned.

ticket_idfare_typerefundabilityseat_selection_feewifi_includedmeal_includedquiet_zoneprice_sekcurrencypoints_earned
ticket_classes & options
● 200 OK
"fare_type": "1 klass",
"refundability": "Återbetalningsbar",
"seat_selection_fee": 0,
"wifi_included": true,
"meal_included": true,
"quiet_zone": false,
"price_sek": 1295.0,
"points_earned": 1295
# ticket_idfare_typerefundabilityseat_selection_feewifi_includedmeal_included
1
2
3

Complete list of extractable fields for Live Disruptions objects from sj.se. All fields typed and schema-versioned.

disruption_idaffected_routetrain_numberdelay_minutesreasonestimated_departureestimated_arrivalalternative_transportannouncement_timestatus
live_disruptions
● 200 OK
"disruption_id": "DIS-8942",
"train_number": "421",
"delay_minutes": 25,
"reason": "Signal failure at Flemingsberg",
"estimated_departure": "2026-10-14T08:39:00Z",
"alternative_transport": false,
"status": "Active"
# disruption_idaffected_routetrain_numberdelay_minutesreasonestimated_departure
1
2
3

Capabilities

Extract the Swedish rail network — structured and normalised

Our SJ scraper handles dynamic search sessions, multi-leg routing, and real-time availability across the entire Swedish railway network — bypassing geoblocks and rate limits.

Timetable Extraction

Capture scheduled departure and arrival times, train numbers, and intermediate stops for all SJ and regional routes.

Dynamic Fare Tracking

Monitor price fluctuations across 1st class, 2nd class, non-refundable, and flexible ticket tiers.

Seat Availability

Extract capacity indicators and seat map availability to gauge route demand and booking velocity.

Multi-Leg Routing

Parse complex journeys involving multiple transfers, varying operators, and layover durations.

Disruption Monitoring

Track real-time delays, cancellations, and track changes broadcasted on the SJ platform.

Station Mapping

Extract geographical coordinates, facility details, and connection options for every station node.

Fleet & Train Types

Identify specific rolling stock (e.g., SJ Snabbtåg X2000, SJ InterCity, Regional) assigned to each route.

Scheduled Polling

Configure hourly or daily pipelines to track price curves leading up to departure dates.

SJ Prio Points Calculation

Extract the exact SJ Prio points yield for specific ticket classes and routes.

// engagement pipeline

From route matrix to warehouse record

Brief in. Clean data out.

Define Scope
d 0

Provide origin-destination pairs, date ranges, and passenger configurations. We design the extraction schema.

Pipeline Build
d 2–4

We configure Playwright crawlers, Nordic proxy rotation, and session management to navigate SJ's search flow.

Validation & QA
d 4–6

Schema validation, null-rate checks, and route completeness verification before full launch.

Delivery
ongoing

JSON / CSV / Parquet pushed to your S3 bucket, BigQuery dataset, or Snowflake stage on agreed cadence.

Under the hood

Navigating SJ's search architecture

SJ.se relies on complex session states and strict rate limits. Here is how we maintain extraction stability.

pipeline-monitor · sj.se · live ● active
// fingerprinting
Identity rotation
TLS fingerprintrandomised
User-agentrotated
IP poolresidential
Challenges blocked0
// pagination
Page coverage
48,291 pages queued running
// observability
Pipeline health
99.9%
uptime
142ms
p99 lat
0.3%
null rate
2
alerts
Anti-bot layer
Nordic residential proxy rotation

SJ implements strict rate limiting and geoblocking for high-velocity queries. We route requests through Swedish residential IPs to maintain realistic traffic patterns and prevent subnet bans.

JavaScript rendering
Playwright execution for React SPA

The SJ booking flow is a single-page application requiring full JavaScript execution. We use Playwright to render the DOM, interact with date pickers, and wait for asynchronous network responses.

Session state
Stateful search management

Retrieving pricing for multi-leg journeys requires maintaining session cookies and specific payload structures across multiple API calls. Our crawlers manage this state automatically.

Change detection
Delta exports for fare updates

To monitor dynamic pricing efficiently, we hash fare outputs and only deliver records where prices or availability have changed since the previous crawl.

Monitoring & alerting
Automated schema drift detection

Frontend updates to SJ.se can break standard selectors. We monitor null rates on critical fields like price and departure time, automatically alerting our engineers to patch selectors.

Applications

Who uses SJ rail data — and how

Teams across industries use sj.se data to build competitive products and smarter operations.

01
Price Intelligence & Aggregation

OTAs and metasearch engines ingest SJ fares to display accurate pricing and routing options to end consumers.

02
Demand Forecasting

Revenue management teams analyse seat availability curves to predict peak travel periods and optimise their own pricing.

03
Travel Disruption Analytics

Insurance and logistics firms track real-time delays and cancellations to trigger automated compensation or rerouting protocols.

04
Carbon Footprint Calculation

Sustainability platforms map train routes and distances to calculate accurate CO2 emissions for corporate travel reporting.

05
Multi-Modal Route Planning

Mobility-as-a-Service (MaaS) providers combine SJ rail schedules with local bus and ferry data for door-to-door navigation.

06
Corporate Travel Auditing

Enterprise procurement teams verify that booked employee travel aligns with available market rates and corporate policies.

Why DataFlirt

"SJ's dynamic pricing and timetable network form the backbone of Swedish transit — but extracting it requires navigating complex session states and SPA rendering."

Most teams underestimate the investment required: reliable SJ.se scraping requires Swedish residential proxies, full JavaScript rendering for their React frontend, session persistence for multi-leg searches, and anomaly monitoring. DataFlirt absorbs that complexity so your engineers can focus on the analysis — not the infrastructure.

Technical Spec

SJ scraper — technical capabilities

Everything supported by our sj.se scraper — rendered SPA elements, auth walls, rate-limit evasion and beyond.

JavaScript rendering
Full Playwright sessions — required for SPA navigation and dynamic fare loading
Supported
Residential proxy rotation
ISP-grade residential IPs from SE pools to bypass geoblocking
Supported
Session persistence
Maintains required cookies and tokens across multi-step search flows
Supported
Multi-leg routing
Extracts full itineraries including transfers and wait times
Supported
Disruption tracking
Captures real-time delay minutes and cancellation statuses
Supported
Seat map extraction
Parses available versus occupied seats per carriage
Supported
Change detection (diffs)
Hash-based diff: only emit records with changed fares since last run
Supported
Webhook delivery
HTTP POST per record for real-time OTA integration
Supported
SJ Prio account history
Gated data (past bookings, member points balance) requires authentication
Partial
Checkout/Payment execution
We do not automate ticket purchases or handle payment gateways
Partial
Infrastructure

Infrastructure powering the SJ pipeline

Open-source tooling on proven cloud infra — no vendor lock-in, full observability.

ScrapyPlaywrightPython 3.12RedisPostgreSQLApache AirflowAWS LambdaS3CloudWatch2CaptchaCapSolverResidential ProxiesDockerKubernetesGrafanaPrometheus
Scrapy + Playwright Stack

Scrapy handles crawl orchestration and retry logic. Playwright manages the React SPA rendering and complex session state required for SJ search flows.

Nordic Proxy Infrastructure

We maintain pools of Swedish residential ISP proxies to route requests natively, avoiding the strict rate limits applied to data centre IPs.

Cloud-Native Orchestration

Pipelines run on AWS ECS. Airflow handles scheduling for forward-looking fare extraction. All state stored in managed Postgres.

Output & Delivery

Your data, your destination

Data delivered to where your team already works — no new tooling required.

JSON
Newline-delimited or nested — schema versioned per run
CSV
Flat file with typed columns — Excel/Sheets compatible
XLS
Legacy spreadsheet format for business analysts
Parquet
Columnar format for BigQuery, Snowflake, Athena
AWS S3
Direct bucket delivery — compatible with any data lake
Webhook
HTTP POST per record for real-time downstream processing
API
REST endpoint to query latest extracted records
PostgreSQL
Upsert into your existing schema with conflict resolution
Snowflake
Stage + COPY INTO workflow — incremental or full-replace
S3
Direct bucket delivery — compatible with any data lake
// faq

Common questions.

About sj.se scraping, legality, and pipeline operations.

Ask us directly →
Is scraping sj.se legal?

Scraping publicly available timetable and pricing information is generally permissible under EU law, provided it does not breach database rights or cause technical harm. DataFlirt targets only public search interfaces. We do not extract personal data or circumvent authentication walls. Clients should review SJ's ToS and consult legal counsel for specific use cases.

How do you handle SJ's bot protection?

We use Swedish residential proxies, full Playwright browser sessions, and request timing modelled on human behaviour. This ensures our requests appear as standard domestic user traffic, preventing IP bans and rate limiting.

Do you capture real-time delays?

Yes. We can configure pipelines to poll specific routes at high frequency to capture live delay minutes, platform changes, and cancellation notices as soon as they are published.

How fresh is the pricing data?

Extraction frequency is defined by your requirements. We can run forward-looking fare sweeps daily for the next 90 days, or poll specific high-priority routes hourly to capture dynamic price shifts.

Can you track specific train models (e.g., X2000)?

Yes. The train model, operator, and onboard services (like Bistro or WiFi) are extracted as standard fields for every route.

What is the minimum viable engagement?

Our smallest packages start at a defined matrix of origin-destination pairs with daily delivery. For extensive continuous polling across the entire network, we price based on compute volume.

Can I request a sample dataset?

Yes. We provide a sample run of up to 100 routes across various dates as part of the pre-engagement scoping process to validate schema fit and data quality.

$ dataflirt scope --new-project --source=sj.se ready

Tell us what
to extract.
We do the rest.

20-minute scoping call. Pilot dataset within the week. Production within two. Whether you need a one-off timetable dump or continuous dynamic fare monitoring across the Swedish network — we scope, build, and operate the pipeline. Tell us what you need.

hello@dataflirt.com · Bengaluru · IST · typical reply < 4h
Related Scrapers

More in travel flights hotels buses

Services

Data Extraction for Every Industry

View All Services →