SNCF Scraper - French Train Schedules & Prices avatar

SNCF Scraper - French Train Schedules & Prices

Pricing

from $9.00 / 1,000 sncf train connections

Go to Apify Store
SNCF Scraper - French Train Schedules & Prices

SNCF Scraper - French Train Schedules & Prices

Scrape SNCF Connect train connections, schedules, displayed ticket prices, operators, seat availability hints, and onboard services.

Pricing

from $9.00 / 1,000 sncf train connections

Rating

0.0

(0)

Developer

Muhammad Afzal

Muhammad Afzal

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

15 days 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.

Search the public SNCF Connect booking flow and export one structured record per train connection. The Actor is designed for travel planners, price-watch dashboards, route research, and AI agents that need current departure and arrival times, journey duration, direct/connecting status, displayed fares, train operators, and onboard services.

What it extracts

Each dataset item represents one SNCF Connect result card:

FieldDescription
origin, destinationStation labels shown by SNCF Connect
departureTime, arrivalTimeISO timestamps in Europe/Paris
durationMinutesJourney duration when displayed
direct, changesDirect/connection interpretation of the result card
carrier, trainTypeDisplayed operator and normalized family (tgv-inoui, ouigo, ter, intercites, or eurostar)
lowestPrice, faresDisplayed EUR prices by class, including “dès” and seat-count hints when present
servicesOnboard services such as Wi-Fi, bar, or bicycle space
sourceUrl, searchedAtResult page and retrieval timestamp

Prices and availability are live snapshots displayed by SNCF Connect. They are not a booking, quote, inventory guarantee, or guarantee that every operator is returned.

When to use it

Use it for a bounded one-way route search. Enter station names as SNCF Connect presents them; city names such as Paris and Lyon are also accepted and are resolved to the best matching station. Use directOnly or trainType for a narrower result set, priceMode: "schedules" when fare cards are not needed, and maxResults for a predictable budget.

The Actor does not log in, purchase tickets, access user bookings, solve CAPTCHAs, or bypass DataDome. It only reads the public booking flow. A challenged session is returned as a clear BLOCKED diagnostic with zero result charges.

Input

{
"from": "Paris Gare de Lyon",
"to": "Lyon Part-Dieu",
"departureTime": "08:00",
"directOnly": false,
"trainType": "all",
"priceMode": "prices",
"maxResults": 5,
"maxLoadMoreClicks": 0
}

departureDate defaults to tomorrow in Europe/Paris. maxResults accepts 1–50 and defaults to 5. maxLoadMoreClicks accepts 0–8 and defaults to 0 extra clicks, so the standard run searches one page. The optimized default run uses 1 GB of memory. Nonessential advertising, analytics, survey, push-notification, media, and font requests are blocked; required search, consent, and security services remain available. Service workers and GPU rendering are disabled. Use 2 GB only when larger searches need it. Images, fonts, and media are blocked because the extracted result cards are text-based. The Actor uses a France-targeted DataImpulse residential session from Apify secret environment variables because SNCF Connect commonly applies DataDome to non-browser or datacenter traffic. Keep the proxy, browser, cookies, locale, and geography consistent for a run; the input does not expose a proxy override. DataImpulse transfer is billed separately by the provider, and Apify container receive bytes provide only an estimate of that charge.

Console/API example:

apify call YOUR_USERNAME/sncf-train-ticket-connection-scraper \
-p '{"from":"Paris Gare de Lyon","to":"Lyon Part-Dieu","departureTime":"08:00","maxResults":3}'

Output example

{
"connectionId": "5d0a5f0e4c46a4c0c98b5e8d",
"origin": "Paris - Gare De Lyon - Hall 1 & 2",
"destination": "Lyon Part Dieu",
"departureTime": "2026-09-11T08:00:00+02:00",
"arrivalTime": "2026-09-11T09:56:00+02:00",
"durationMinutes": 116,
"changes": 0,
"direct": true,
"carrier": "TGV INOUI",
"trainType": "tgv-inoui",
"services": ["Wifi à bord", "Voiture bar"],
"lowestPrice": 49,
"currency": "EUR",
"fares": [{"className":"second","price":49,"currency":"EUR","priceFrom":true,"availabilityText":null}],
"searchedFrom": "Paris Gare de Lyon",
"searchedTo": "Lyon Part-Dieu",
"searchedAt": "2026-09-10T03:00:00.000Z",
"source": "SNCF Connect",
"sourceUrl": "https://www.sncf-connect.com/home/shop/results/outward"
}

Run diagnostics are written to the OUTPUT key-value record. Outcomes are DATA, EMPTY, BLOCKED, REJECTED, or FAILED. The Actor never adds an error object to the homogeneous connection dataset.

Pay per event

EventPrice
SNCF search start$0.09 per GB ($0.09 at the default 1 GB allocation)
train-connection$0.012 per delivered connection (tiered down to $0.009)

The start event is synthetic and is never manually charged. The Actor reduces the result limit to the remaining event budget before browsing and checks the budget again before each write. A connection is pushed to the dataset before its result event is charged. Empty and blocked runs charge zero train-connection events. They still consume compute and residential proxy traffic while attempting the search, so platform usage can accrue without results. Actor Start is charged once per run, with one event per GB of memory (minimum one event). At the default 1 GB allocation, the start charge is $0.09 per run; five connections add $0.06 at the FREE tier. The default run charge cap is $0.25.

Reliability and compliance

The scraper uses a displayed Chromium session, a DataImpulse French residential route with a distinct sticky proxy identity and fresh browser context for each retry, up to four browser sessions within a bounded runtime budget, concurrency one, short pagination, coherent browser signals, and session retirement for HTTP 403/429 or challenge responses. If SNCF changes its page structure, the Actor reports an explicit extraction diagnostic instead of fabricating records. Respect SNCF Connect’s terms, robots/access policies, fare display conditions, and applicable privacy and database-rights law. Do not use this Actor to automate purchasing or circumvent access controls.

Support

For a reproducible issue, include the redacted input, run ID, outcome, and OUTPUT record. Do not include cookies, proxy URLs, account credentials, or other secrets.

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.012; BRONZE: $0.011; SILVER: $0.01; GOLD: $0.009; PLATINUM: $0.009; DIAMOND: $0.009SNCF train connection — One schema-valid SNCF connection saved to the default dataset.
apify-actor-start$0.09 per GB ($0.09 at 1 GB default)Actor 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. The Actor publisher still incurs platform usage costs for empty and blocked runs.

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

Regional itinerary limitation

Some regional routes redirect to SNCF’s multimodal itinerary planner instead of commercial ticket results. These pages are currently unsupported. The Actor stops with a clear failure and zero result charges rather than repeatedly reopening the browser. Increasing memory does not resolve that page-layout limitation.