SYSTEM all green source scotrail.co.uk queue 14,208 routes p99 latency 215ms dataflirt.com · scraper/scotrail-co.uk
RUN - 42 active pipelines - scotrail.co.uk live

ScotRail data,
at warehouse scale.

We extract journey planners, live departure boards, Advance fare pricing, and disruption alerts from ScotRail. Delivered as clean JSON, CSV, or Parquet to S3, BigQuery, or Snowflake on your cadence.

Timetables extracted
1.2M /day
Live train updates
450K /hr
Fares tracked
8.4M /24h
Active pipelines
42
Uptime
99.94%
Data Dictionary

Every field we extract from scotrail.co.uk

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

Complete list of extractable fields for Live Departures objects from scotrail.co.uk. All fields typed and schema-versioned.

station_codedestinationscheduled_timeexpected_timeplatformstatusoperatordelay_minutestrain_id
live_departures
● 200 OK
"station_code": "EDB",
"destination": "Glasgow Queen Street",
"scheduled_time": "2026-05-12T08:15:00Z",
"expected_time": "2026-05-12T08:19:00Z",
"platform": "14",
"status": "Delayed",
"delay_minutes": 4,
"operator": "ScotRail"
# station_codedestinationscheduled_timeexpected_timeplatformstatus
1
2
3

Complete list of extractable fields for Timetables objects from scotrail.co.uk. All fields typed and schema-versioned.

origin_crsdestination_crsdeparture_timearrival_timeduration_minuteschangesoperatorcalling_pointstrain_uid
timetables
● 200 OK
"origin_crs": "GLC",
"destination_crs": "ABD",
"departure_time": "2026-05-12T09:41:00Z",
"arrival_time": "2026-05-12T12:20:00Z",
"duration_minutes": 159,
"changes": 0,
"operator": "ScotRail",
"train_uid": "C39281"
# origin_crsdestination_crsdeparture_timearrival_timeduration_minuteschanges
1
2
3

Complete list of extractable fields for Ticket Fares objects from scotrail.co.uk. All fields typed and schema-versioned.

route_idticket_typeprice_gbprailcard_discounttravel_classflexibilityavailability_statusscraped_timestamp
ticket_fares
● 200 OK
"route_id": "EDB-GLQ",
"ticket_type": "Advance Single",
"price_gbp": 14.8,
"railcard_discount": "16-25 Railcard",
"travel_class": "Standard",
"flexibility": "Fixed train only",
"availability_status": "Available",
"scraped_timestamp": "2026-05-12T07:12:00Z"
# route_idticket_typeprice_gbprailcard_discounttravel_classflexibility
1
2
3

Complete list of extractable fields for Disruptions objects from scotrail.co.uk. All fields typed and schema-versioned.

incident_idroute_affectedseveritydescriptionstart_timeestimated_clear_timedelay_reasonalternative_travel
disruptions
● 200 OK
"incident_id": "INC-8832",
"route_affected": "Inverness to Edinburgh",
"severity": "High",
"description": "Tree blocking the railway at Pitlochry.",
"start_time": "2026-05-12T06:30:00Z",
"delay_reason": "Severe weather",
"alternative_travel": "Bus replacement in operation."
# incident_idroute_affectedseveritydescriptionstart_timeestimated_clear_time
1
2
3

Complete list of extractable fields for Station Info objects from scotrail.co.uk. All fields typed and schema-versioned.

station_namecrs_codeticket_office_hoursaccessibility_ratingparking_spacestoilets_availablewaiting_roomwifi_available
station_info
● 200 OK
"station_name": "Stirling",
"crs_code": "STG",
"accessibility_rating": "Category A",
"parking_spaces": 142,
"toilets_available": true,
"waiting_room": true,
"wifi_available": true,
"ticket_office_hours": "06:15 - 20:00"
# station_namecrs_codeticket_office_hoursaccessibility_ratingparking_spacestoilets_available
1
2
3

Capabilities

Extract ScotRail data with engineering precision

Our pipelines handle session state, dynamic pricing grids, and real-time polling constraints to deliver structured rail data without manual intervention.

Live Departure Polling

Track expected versus scheduled times, platform alterations, and cancellation notices across all Scottish stations in near real-time.

Dynamic Fare Extraction

Capture Advance, Off-Peak, and Anytime ticket prices. Monitor yield management algorithms as departure dates approach.

Disruption & Delay Tracking

Extract live incident alerts, severity ratings, delay reasons, and alternative travel advice published on the ScotRail network.

Timetable Matrix Scraping

Map complete A-to-B route combinations, including intermediate calling points, duration, and operator data.

Station Facility Audits

Gather metadata on station accessibility, ticket office hours, parking capacity, and facility availability.

Railcard Pricing Logic

Apply 16-25, Senior, Disabled Persons, and regional railcard modifiers to extract discounted fare grids.

Multi-Stop Route Mapping

Extract intermediate calling points and connection times for complex multi-leg journeys across the network.

Carriage Formation Data

Capture the number of coaches and expected train length where surfaced by the journey planner.

Scheduled + Streaming Modes

Run one-off timetable exports or configure continuous pipelines at minutely cadences for live departure tracking.

// engagement pipeline

From route list to warehouse record

Brief in. Clean data out.

Define Scope
d 0

Provide CRS codes, route combinations, or station lists. We design the extraction schema together.

Pipeline Build
d 2–4

We configure Scrapy / Playwright crawlers, proxy rotation, and session management for scotrail.co.uk.

Validation & QA
d 4–6

Schema validation, null-rate checks, and data type enforcement before full launch.

Delivery
ongoing

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

Under the hood

Handling ScotRail's technical barriers

Travel sites deploy strict rate limits and complex session states. We manage the infrastructure so you receive clean data.

pipeline-monitor · scotrail.co.uk · 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
Residential proxy rotation

Travel sites rate-limit aggresively. We route requests through UK-based residential proxies to distribute load and prevent IP blocks during high-frequency polling.

Session state
Booking flow tokens

Extracting accurate pricing requires navigating multi-step journey planners. We maintain cookie sessions and CSRF tokens to simulate valid search flows.

Real-time polling
Managing rate limits on live boards

Live departure boards require frequent polling. We optimise request timing and distribute queries across proxy pools to ensure data freshness without triggering WAF rules.

Schema stability
Resilient DOM selectors

ScotRail updates its frontend periodically. We deploy multi-layered selectors with fallback chains to ensure UI changes do not break the extraction pipeline.

Monitoring
24/7 pipeline health

We monitor null rates and schema drift in real time. If a fare grid fails to load, the system retries automatically with a fresh session.

Applications

Who uses ScotRail data - and how

Teams across industries use scotrail.co.uk data to build competitive products and smarter operations.

01
Travel Aggregation

Online Travel Agencies (OTAs) sync timetables and fares to display accurate routing options to end users.

02
Delay Prediction Models

Machine learning teams use historical delay and cancellation data to train predictive models for network reliability.

03
Corporate Travel Auditing

Expense management platforms verify claimed ticket prices against historical fare grids for compliance.

04
Disruption Alerting

B2B SaaS providers ingest live incident reports to push real-time travel alerts to corporate commuters.

05
Competitor Pricing

Coach operators and domestic airlines track rail fares to optimise their own dynamic pricing algorithms.

06
Infrastructure Planning

Consultancies use timetable frequency and station facility data as proxies for regional economic activity.

Why DataFlirt

"Rail data is highly dynamic. Fares change by the hour and delays cascade across the network. Querying it requires purpose-built infrastructure."

Extracting reliable data from ScotRail involves managing session tokens, bypassing rate limits, and parsing complex grid layouts. DataFlirt handles the extraction layer completely, delivering structured transit data directly to your warehouse so your team can focus on downstream analysis.

Technical Spec

ScotRail scraper - technical capabilities

Everything supported by our scotrail.co.uk scraper — rendered SPA elements, auth walls, rate-limit evasion and beyond.

Journey planner scraping
Extract full route options, durations, and changes
Supported
Live departure boards
Poll expected times and platform numbers in near real-time
Supported
Disruption alerts
Capture network incidents and delay reasons
Supported
Station facility data
Extract metadata on accessibility and parking
Supported
Ticket availability
Monitor Advance ticket quotas and price tiers
Supported
Webhook delivery
HTTP POST per record for real-time disruption alerts
Supported
Smartcard account history
Requires user authentication and personal credentials
Partial
Ticket purchase execution
Transactional flows and payment processing
Partial
Infrastructure

Infrastructure powering the ScotRail pipeline

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

ScrapyPlaywrightPython 3.12RedisPostgreSQLApache AirflowAWS LambdaS3CloudWatch2CaptchaCapSolverResidential ProxiesDockerKubernetesGrafanaPrometheusBigQuerySnowflakeApache Kafka
Scrapy + Playwright Stack

Scrapy handles crawl orchestration, deduplication, and retry logic. Playwright handles JavaScript rendering, cookie sessions, and interaction flows. Combined via scrapy-playwright middleware.

Residential Proxy Infrastructure

We maintain pools of residential ISP proxies across UK regions. Rotation happens per-request with sticky sessions where required. IP score monitoring prevents blacklisted pool contamination.

Cloud-Native Orchestration

Pipelines run on AWS Lambda (burst) and ECS (sustained). Airflow handles scheduling, dependency management, and SLA alerting. 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
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 your extracted datasets
PostgreSQL
Upsert into your existing schema with conflict resolution
BigQuery
Streamed directly into your dataset with schema auto-detect
Snowflake
Stage + COPY INTO workflow - incremental or full-replace
S3
Direct bucket delivery — compatible with any data lake
// faq

Common questions.

About scotrail.co.uk scraping, legality, and pipeline operations.

Ask us directly →
Is scraping ScotRail legal?

Scraping publicly available timetable, pricing, and disruption data is generally permissible. DataFlirt targets only public, non-authenticated network data. We do not extract personal user accounts or execute ticket purchases. Clients should review ScotRail's terms of service and consult legal counsel for their specific use cases.

How do you handle bot protection on travel sites?

We use UK-based residential proxies, realistic browser fingerprints, and strict session management. Our crawlers simulate human request timing to avoid triggering Web Application Firewalls (WAF) during high-frequency polling.

How fresh is the live departure data?

Live departure pipelines can be configured to poll specific station boards at minutely intervals, providing near real-time updates on delays and platform changes.

Can you extract historical delay data?

We capture data going forward from the day your pipeline is commissioned. By continuously polling live boards and timetables, we build a historical time-series of network performance over time.

Do you support complex route combinations?

Yes. We can feed the journey planner a matrix of origin and destination CRS codes to extract pricing and timetables for multi-leg journeys, including intermediate calling points.

What is the minimum viable engagement?

Our minimum engagements typically start with a defined list of routes or stations polled daily. Pricing scales based on the frequency of extraction and the total volume of data processed.

$ dataflirt scope --new-project --source=scotrail.co.uk 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 daily timetable extract or continuous polling for live departures, 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 →