National Rail Train Ticket & Connection Scraper
Pricing
from $2.00 / 1,000 train connections
National Rail Train Ticket & Connection Scraper
Scrape UK National Rail connections, schedules, operators, live status, journey legs, ticket types, and GBP fares.
Pricing
from $2.00 / 1,000 train connections
Rating
0.0
(0)
Developer
Muhammad Afzal
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Share
Find live UK train connections, timetable information, operators, train legs, service status, and ticket fares from National Rail's public Journey Planner. Use it for route comparison, travel-planning assistants, fare research, timetable monitoring, and downstream itinerary selection.
The Actor uses National Rail's page-owned journey-planning service. It does not log in, buy tickets, bypass a CAPTCHA, or promise a ticket reservation. Fares and realtime status are point-in-time results and can change before purchase.
What it returns
Each default-dataset record is one outbound or return connection:
| Field | Description |
|---|---|
origin, destination | Station names and 3-letter CRS codes |
departureScheduled, arrivalScheduled | ISO-8601 times with UK offset |
departureRealtime, arrivalRealtime, status, delayMinutes | Realtime status when supplied |
durationMinutes, changes, direct, isOvertaken | Route comparison fields |
operators | Train operator code and name |
cheapestFare, fares | Ticket type, fare class, category, restriction, and GBP amount |
legs | Train number/UID, board/alight stations, platforms, status, and replacement-bus flags |
The OUTPUT key-value record reports DATA, EMPTY, PARTIAL, BLOCKED, or REJECTED, plus delivery, scan, warning, and billing counts. It is deliberately separate from the homogeneous connection dataset so agents can distinguish a valid no-match from an access problem.
Input
from and to accept a full station name or CRS code, such as London Euston or EUS. departureDate uses YYYY-MM-DD; if omitted, the Actor uses tomorrow in Europe/London. departureTime uses local UK HH:mm and defaults to 09:00. searchBy can be departure or arrival.
Optional returnDate and returnTime add reverse-direction return connections. adults and children control the fare request. fareClass is any, standard, or first. Set directOnly to exclude journeys requiring a change, and set includeOvertaken to false to hide slower trains overtaken by a later departure. maxResults is capped at 20 across both directions.
Example input:
{"from": "London Euston","to": "Manchester Piccadilly","departureDate": "2026-09-18","departureTime": "09:00","searchBy": "departure","adults": 1,"children": 0,"fareClass": "any","directOnly": false,"maxResults": 5}
The API equivalent is a normal Apify Actor run:
apify call YOUR_USERNAME/national-rail-train-ticket-connection-scraper \-p '{"from":"London Euston","to":"Manchester Piccadilly","departureDate":"2026-09-18","departureTime":"09:00","maxResults":5}'
Output example
{"connectionId": "outbound-1-2026-09-18T09:13:00+01:00","direction": "outbound","origin": { "crsCode": "EUS", "name": "London Euston" },"destination": { "crsCode": "MAN", "name": "Manchester Piccadilly" },"departureScheduled": "2026-09-18T09:13:00+01:00","arrivalScheduled": "2026-09-18T11:19:00+01:00","durationMinutes": 126,"changes": 0,"direct": true,"status": "OnTime","cheapestFare": { "ticketCode": "SVS", "ticketName": "Off-Peak Single", "amountGbp": 79.8, "fareClass": "STANDARD" }}
Pricing
This private development Actor is configured for Pay per event:
| Event | Price | Meaning |
|---|---|---|
| Actor start | $0.00005 | One bounded search start; synthetic platform event |
| Train connection | $0.002 | One schema-valid connection delivered to the default dataset |
A one-result run therefore has a $0.002 result charge plus the synthetic start event. Runs stop when the user's maximum charge is reached. Invalid input and station-resolution failures do not create result events.
Reliability and limits
The scraper resolves stations from National Rail's public station list, uses a single bounded search request per direction, retries 429 and 5xx responses with capped backoff, and limits each run to 20 records. It preserves valid partial records and writes warnings to OUTPUT. A truthful no-match query returns an empty dataset with an EMPTY summary; HTTP denial, throttling, malformed source responses, and missing source data are reported as BLOCKED or PARTIAL rather than fabricated fares.
The public service can change schedules, prices, service status, station availability, or response fields. National Rail's official journey planner remains the source of truth for purchase eligibility. The Actor does not include Railcard discounts because users must supply and verify their own Railcard eligibility at checkout.
Legal and responsible use
Use the Actor for permitted public-data research and itinerary planning. Respect National Rail terms, rate limits, and applicable law. Do not use the dataset to misrepresent live availability, scrape private account data, or automate ticket purchasing. The result is informational and is not a booking confirmation.