# SNCF TGV Timetable & TGV Max Seat Finder (`yck69/french-trains`) Actor

Every TGV INOUI, Intercités and night train for the next 30 days with TGV Max (MAX JEUNE / MAX SENIOR) seat availability, free-seat alerts, 'where can I go' explorer, typical fares and route punctuality, from SNCF open data.

- **URL**: https://apify.com/yck69/french-trains.md
- **Developed by:** [yck](https://apify.com/yck69) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 trains

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## SNCF TGV Timetable & TGV Max Seat Finder

Every **TGV INOUI, Intercités and night train** in France for the **next 30 days**, with **TGV Max seat availability** (MAX JEUNE and MAX SENIOR), from SNCF open data, refreshed every morning.

- **Trains & TGV Max seats**: all trains between cities, filtered by date, weekday and departure time, with whether a TGV Max seat is available, the **typical fares** of the route and its **punctuality**.
- **TGV Max alerts**: schedule it every morning and get **only the seats that opened since yesterday**, by email, Slack or Telegram.
- **TGV Max explorer**: "where can I go from Paris on Friday with my MAX JEUNE?" Every destination with free seats, with the fastest train and departure times.
- **Route punctuality**: monthly on-time rate, long delays, cancellations and the causes of delays.
- **Fares**: price ranges per route by carrier (TGV INOUI, OUIGO), class and fare type.

**$1 per 1,000 trains.**

### What data can you get?

<table>
<tr><td>🚄 Train number and type</td><td>📅 Date and times</td><td>🏙️ Origin and destination</td></tr>
<tr><td>⏱️ Duration</td><td>🎟️ TGV Max seat available</td><td>💶 Typical fares by class</td></tr>
<tr><td>⏰ Route punctuality</td><td>🚧 Delay causes</td><td>🗺️ Destinations with free seats</td></tr>
<tr><td>🔔 New seats since yesterday</td><td>📊 Monthly on-time rate</td><td>🌙 Night trains</td></tr>
</table>

### How to use it

1. Click **Try for free** at the top of this page.
2. Choose **trains**, **explorer**, **punctuality** or **fares**.
3. Enter departure and arrival cities, dates, weekdays or times.
4. Click **Start**, or schedule it every morning for TGV Max alerts.
5. Download as JSON, CSV or Excel, or get alerts by email or Slack.

### Use cases

- **TGV Max subscribers**: never miss a seat on your route, or find a spontaneous weekend trip.
- **Travel apps and chatbots**: a clean TGV timetable with durations and typical prices.
- **Travel managers**: compare routes by punctuality before booking business trips.
- **Analysts and journalists**: punctuality trends of the TGV network.

### Input examples

**TGV Max seats from Paris to Marseille on Fridays after 17:00**

```json
{ "mode": "trains", "origins": ["Paris"], "destinations": ["Marseille"], "weekdays": ["Friday"], "departAfter": "17:00", "onlyMaxAvailable": true }
```

**Alert: new TGV Max seats Lyon to Paris** (schedule daily at 07:00 and add an integration)

```json
{ "mode": "trains", "origins": ["Lyon"], "destinations": ["Paris"], "onlyNew": true, "alertName": "lyon-paris" }
```

**Where can I go from Bordeaux this weekend with TGV Max?**

```json
{ "mode": "explorer", "origins": ["Bordeaux"], "weekdays": ["Saturday", "Sunday"] }
```

**Punctuality of Paris to Lyon over a year**

```json
{ "mode": "punctuality", "origins": ["Paris"], "destinations": ["Lyon"], "months": 12 }
```

### Output

**Train**

```json
{
    "date": "2026-11-06",
    "weekday": "Friday",
    "trainNumber": "6127",
    "origin": "PARIS (intramuros)",
    "destination": "MARSEILLE ST CHARLES",
    "departureTime": "17:38",
    "arrivalTime": "20:57",
    "durationMin": 199,
    "maxSeatsAvailable": true,
    "axis": "SUD EST",
    "typicalFares": [
        { "carrier": "TGV INOUI", "travelClass": 2, "minPrice": 17.5, "maxPrice": 138 },
        { "carrier": "OUIGO", "travelClass": 2, "minPrice": 19, "maxPrice": 109 }
    ],
    "routePunctuality": { "month": "2026-09", "onTimePct": 87.2, "lateOver30MinPct": 6.7, "cancelledPct": 0, "averageDelayOfLateTrainsMin": 45 }
}
```

**Explorer row**: `destination`, `trainsWithMaxSeats`, `dates`, `shortestDurationMin`, `firstDeparture`, `lastDeparture`, `trains` (each with date, times, train number).

### Pricing

| Event | Price |
|---|---|
| Train | $0.001 |
| TGV Max destination (explorer) | $0.005 |
| Punctuality month or fare row | $0.001 |

Alert runs with no new seat cost almost nothing.

### Good to know

- **Source**: SNCF open data ([TGV Max availability](https://ressources.data.sncf.com/explore/dataset/tgvmax/), [fares](https://ressources.data.sncf.com/explore/dataset/tarifs-tgv-inoui-ouigo/), [punctuality](https://ressources.data.sncf.com/explore/dataset/regularite-mensuelle-tgv-aqst/)), *Open Database Licence*.
- **TGV Max availability** is published by SNCF once a day (around 06:30 Paris time). Seats can be taken during the day, so check on SNCF Connect before travelling.
- **Times** are Paris local time. City names cover all their stations ("Lyon" includes Lyon Part-Dieu, Perrache and Saint-Exupéry).
- **OUIGO** trains aren't in the timetable (TGV Max doesn't apply to them), but their fares are in the fare ranges.
- **Fares** are the range of prices sold on the route, not the price of a given train on a given day.

### More Actors from this developer

### FAQ

##### Can I use it through the API, Make, Zapier or Google Sheets?

Yes. Every run can be started and read through the [Apify API](https://docs.apify.com/api/v2) (JavaScript and Python clients, CLI, MCP), and Apify integrations connect it to Make, Zapier, n8n, Google Sheets, Slack, webhooks and more.

##### Is it legal to use this data?

The Actor only reads public or official open data and doesn't log in anywhere. Check the source's licence and your local rules (for example GDPR when data concerns people) for your use case; if in doubt, ask a lawyer.

##### Something isn't working, or you need another field?

Open an issue on the **Issues** tab: feedback is read and answered.

# Actor input Schema

## `mode` (type: `string`):

<b>Trains</b>: every TGV INOUI, Intercités and night train between cities over the next 30 days, with TGV Max seat availability, typical fares and the route's punctuality. Turn on alerts to get only seats that just opened.<br><b>TGV Max explorer</b>: every destination you can reach with a TGV Max seat from a city, by date.<br><b>Punctuality</b>: monthly on-time rate, delays and causes of a TGV route.<br><b>Fares</b>: price ranges by carrier, class and fare type.

## `origins` (type: `array`):

Cities or stations, e.g. <code>Paris</code>, <code>Lyon</code>, <code>Aix en Provence</code>. Several are allowed.

## `destinations` (type: `array`):

Cities or stations. Leave empty for every destination.

## `dateFrom` (type: `string`):

Default: today. The timetable covers the next 30 days. A date or a duration like <code>7 days</code> (from today).

## `dateTo` (type: `string`):

Default: the end of the 30-day window.

## `weekdays` (type: `array`):

e.g. only Fridays and Sundays for weekend trips.

## `departAfter` (type: `string`):

e.g. <code>07:00</code>.

## `departBefore` (type: `string`):

e.g. <code>10:30</code>.

## `onlyMaxAvailable` (type: `boolean`):

Keep trains with MAX JEUNE / MAX SENIOR seats available.

## `onlyNew` (type: `boolean`):

SNCF publishes TGV Max availability once a day (around 06:30 Paris time). Schedule the Actor every morning with an email, Slack or Telegram integration to be told about seats that opened since the previous day.

## `alertName` (type: `string`):

Separate memory per alert, e.g. <code>paris-marseille-fridays</code>. Defaults to one per set of filters.

## `includeFares` (type: `boolean`):

Price ranges of the route by carrier and class (for trains with a 'To').

## `includePunctuality` (type: `boolean`):

The route's on-time rate and delays over the latest month.

## `includeBuses` (type: `boolean`):

The timetable also lists some SNCF coach services.

## `months` (type: `integer`):

For Punctuality mode.

## `maxResults` (type: `integer`):

Trains, destinations or report rows.

## Actor input object example

```json
{
  "mode": "trains",
  "origins": [
    "Paris"
  ],
  "destinations": [
    "Marseille"
  ],
  "onlyMaxAvailable": false,
  "onlyNew": false,
  "includeFares": true,
  "includePunctuality": true,
  "includeBuses": false,
  "months": 12,
  "maxResults": 20
}
```

# Actor output Schema

## `trains` (type: `string`):

Trains with TGV Max availability.

## `explorer` (type: `string`):

Destinations reachable with TGV Max seats.

## `results` (type: `string`):

Every field.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "trains",
    "origins": [
        "Paris"
    ],
    "destinations": [
        "Marseille"
    ],
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("yck69/french-trains").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "trains",
    "origins": ["Paris"],
    "destinations": ["Marseille"],
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("yck69/french-trains").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "trains",
  "origins": [
    "Paris"
  ],
  "destinations": [
    "Marseille"
  ],
  "maxResults": 20
}' |
apify call yck69/french-trains --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yck69/french-trains"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/iWaL5wf2po4LKBYCd/builds/4dNbibs5Qu4JLg6zz/openapi.json
