National Rail Train Ticket & Connection Scraper avatar

National Rail Train Ticket & Connection Scraper

Pricing

from $1.00 / 1,000 train connections

Go to Apify Store
National Rail Train Ticket & Connection Scraper

National Rail Train Ticket & Connection Scraper

Scrape UK National Rail connections, schedules, operators, live status, journey legs, ticket types, and GBP fares.

Pricing

from $1.00 / 1,000 train connections

Rating

0.0

(0)

Developer

Muhammad Afzal

Muhammad Afzal

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a month ago

Last modified

Share

Free plan limit: Free-plan users can receive up to 5 result records per run. Paid-plan and local/unknown runs retain the Actor's existing limits.

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:

FieldDescription
origin, destinationStation names and 3-letter CRS codes
departureScheduled, arrivalScheduledISO-8601 times with UK offset
departureRealtime, arrivalRealtime, status, delayMinutesRealtime status when supplied
durationMinutes, changes, direct, isOvertakenRoute comparison fields
operatorsTrain operator code and name
cheapestFare, faresTicket type, fare class, category, restriction, and GBP amount
legsTrain 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 Actor uses pay-per-event pricing. These are the current Apify Store event prices:

EventPrice (USD)When it is charged
train-connectionFREE: $0.005; BRONZE: $0.005; SILVER: $0.005; GOLD: $0.001; PLATINUM: $0.001; DIAMOND: $0.001Train connection — One schema-valid National Rail connection saved to the default dataset.
apify-actor-start$0.005Actor Start — Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). — Charged once per run.

Apify platform usage for this Actor run is included alongside the event prices above; no separate per-run platform-usage fee is passed to users.

This covers Apify platform usage for this Actor run. Other Apify products or usage outside this Actor run may still follow your account plan.

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.

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.