> ## Documentation Index
> Fetch the complete documentation index at: https://cloro.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google transit results schema

> Schema for Google's train and bus block returned by the Google Search endpoint: route, date, fastest trip, cheapest fare, departures a day and the departures of the day, with the booking sites and the transport websites in the EU.

The [Google Search endpoint](https://cloro.dev/docs/api-reference/endpoint/monitor-google.md) returns Google's train and bus block, shown on queries for a route ("train tickets london to manchester", "bus paris lyon") and on some flight queries ("Consider taking the train"), as `result.transitResults`, on desktop and mobile, with no flag and at no extra cost. `transitResults` is omitted when the SERP has no transit block.

Values are text as Google shows them, in the language of the SERP (`06:29`, `5:10 am`, `2h 15m`, `0 changes`, `Ohne Umsteigen`). Google uses the same block for trains and buses, and the result does not say which.

`departures` holds every departure the page has, in page order: the ones it shows, and the ones it shows only after a click ("N earlier trains", "More options", a closed booking site), with `expanded: false`.

## Layouts

Google shows the block in four layouts, and each returns the fields it shows. Each example below is the result for the page in its screenshot, shortened with `// …`.

### Route block

On a train or bus query: a route form (`origin`, `destination`, `date`), a summary (`fastest`, `cheapest`, `dailyDepartures`) and the departures. `departures` has every departure of the day: the 3 the block shows, the earlier train and the ones under "More options", with `expanded: false`.

![Route block in Google Search](https://mintcdn.com/cloro/mMGkzHvz4mmZ11Xu/images/google/search-transit-results-route-block.webp?fit=max\&auto=format\&n=mMGkzHvz4mmZ11Xu\&q=85\&s=9826079876186cc492addc94b85bd206)

Route block in Google Search

A response to `train tickets london to manchester` in the United Kingdom, on desktop:

```json theme={null}
{
  "success": true,
  "result": {
    "transitResults": {
      "title": "Trains from London to Manchester",
      "origin": "Euston",
      "destination": "Manchester Piccadilly",
      "date": "Sat 24 Oct",
      "fastest": "2h 6m",
      "cheapest": { "value": 31, "currency": "£", "raw": "£31" },
      "dailyDepartures": 49,
      "departures": [
        {
          "position": 1,
          "departureTime": "00:39",
          "arrivalTime": "07:43",
          "duration": "7h 4m",
          "changes": "2 changes",
          "price": { "value": 80, "currency": "£", "raw": "£80" },
          "operator": "Multiple trains",
          "expanded": false
        },
        {
          "position": 2,
          "departureTime": "06:10",
          "arrivalTime": "08:59",
          "duration": "2h 49m",
          "changes": "1 change",
          "price": { "value": 32, "currency": "£", "raw": "£32" },
          "operator": "Multiple trains",
          "expanded": true
        },
        // …
        {
          "position": 49,
          "departureTime": "21:01",
          "arrivalTime": "23:35",
          "duration": "2h 34m",
          "changes": "0 changes",
          "price": { "value": 75, "currency": "£", "raw": "£75" },
          "operator": "Avanti West Coast",
          "expanded": false
        }
      ]
    }
  }
}
```

### Short block

On some flight queries: a `title` ("Consider taking the train") and the departures. A departure without a fare on the page ("--") has no `price`.

![Short block on a flight query in Google Search](https://mintcdn.com/cloro/mMGkzHvz4mmZ11Xu/images/google/search-transit-results-short-block.webp?fit=max\&auto=format\&n=mMGkzHvz4mmZ11Xu\&q=85\&s=c62a59b8e16c3be47bac220fb4c6f8cc)

Short block on a flight query in Google Search

`flights london to paris` in the United Kingdom:

```json theme={null}
"transitResults": {
  "title": "Consider taking the train",
  "departures": [
    {
      "position": 1,
      "departureTime": "07:31",
      "arrivalTime": "10:59",
      "duration": "2h 28m",
      "changes": "0 changes",
      "operator": "Eurostar 9006",
      "expanded": true
    },
    {
      "position": 2,
      "departureTime": "10:31",
      "arrivalTime": "13:58",
      "duration": "2h 27m",
      "changes": "0 changes",
      "price": { "value": 289, "currency": "£", "raw": "£289" },
      "operator": "Eurostar 9018",
      "expanded": true
    }
  ]
}
```

### EU route unit

In the EU, a list of booking sites (Google, Trainline, Trip.com, …), each with its own summary and departures. The departures of every site come in one list, each with its `supplier`, as in the [EU places unit](https://cloro.dev/docs/api-reference/endpoint/google/local-pack.md#eu-places-unit): the site's `fastest` and `cheapest` are in `supplier`. The transport websites next to the unit (the operators of the route) come as `websites`. No `origin` or `destination`.

![EU route unit in Google Search](https://mintcdn.com/cloro/mMGkzHvz4mmZ11Xu/images/google/search-transit-results-eu-route-unit.webp?fit=max\&auto=format\&n=mMGkzHvz4mmZ11Xu\&q=85\&s=874a51cd7b877e66b321b9ad266f6535)

EU route unit in Google Search: Google open, the other booking sites collapsed

`train paris lyon` in France: Google's 3 departures, open on the page, then those of the 6 other booking sites, 21 in all.

```json theme={null}
"transitResults": {
  "title": "Trains de Paris à Lyon",
  "date": "25 oct.",
  "dailyDepartures": 30,
  "departures": [
    {
      "position": 1,
      "departureTime": "06:24",
      "arrivalTime": "08:40",
      "duration": "2h 16min",
      "changes": "0 changement",
      "price": { "value": 59, "currency": "€", "raw": "59 €" },
      "operator": "Trenitalia",
      "expanded": true,
      "supplier": {
        "name": "Google",
        "expanded": true,
        "domain": "google.com",
        "link": "https://www.google.com/search?…",
        "fastest": "1h 53min",
        "cheapest": { "value": 59, "currency": "€", "raw": "59 €" }
      }
    },
    // …
    {
      "position": 4,
      "departureTime": "06:24",
      "arrivalTime": "08:40",
      "duration": "2h 16min",
      "changes": "0 changement",
      "price": { "value": 59, "currency": "€", "raw": "59 €" },
      "operator": "Trenitalia",
      "expanded": false,
      "supplier": {
        "name": "Trainline",
        "expanded": false,
        "domain": "thetrainline.com",
        "link": "https://www.google.com/travel/clk/tr?pcurl=https://thetrainline.com&…",
        "fastest": "1h 53min",
        "cheapest": { "value": 59, "currency": "€", "raw": "59 €" }
      }
    }
    // …
  ],
  "websites": [
    {
      "operator": "Trenitalia",
      "price": { "value": 59, "currency": "€", "raw": "59 €" },
      "duration": "2h 16min",
      "changes": "0 changement",
      "link": "https://www.google.com/travel/clk/tr?pcurl=http://www.trenitalia.com/&…"
    }
    // …
  ]
}
```

### EU schedule

In the EU, a summary and the departures, without a route form or booking sites. Google shows the route and the date in one line of text under the title ("De Paris (Toutes les stations) à Nantes · sam. 24 oct."), which is not returned: no `origin`, `destination` or `date`.

![EU schedule in Google Search](https://mintcdn.com/cloro/mMGkzHvz4mmZ11Xu/images/google/search-transit-results-eu-schedule.webp?fit=max\&auto=format\&n=mMGkzHvz4mmZ11Xu\&q=85\&s=ee10bb1711db61861fcbb7d59ba96aea)

EU schedule in Google Search

`paris nantes en train` in France:

```json theme={null}
"transitResults": {
  "title": "Trains de Paris à Nantes",
  "fastest": "1h 58min",
  "cheapest": { "value": 35, "currency": "€", "raw": "35 €" },
  "dailyDepartures": 30,
  "departures": [
    {
      "position": 1,
      "departureTime": "06:06",
      "arrivalTime": "09:50",
      "duration": "3h 44min",
      "changes": "1 changement",
      "price": { "value": 90, "currency": "€", "raw": "90 €" },
      "operator": "Plusieurs trains",
      "expanded": true
    },
    // …
    {
      "position": 3,
      "departureTime": "07:12",
      "arrivalTime": "11:09",
      "duration": "3h 57min",
      "changes": "0 changement",
      "price": { "value": 59, "currency": "€", "raw": "59 €" },
      "operator": "OUIGO 4071",
      "expanded": true
    }
  ]
}
```

## Transit results structure

All fields are included only when Google shows them.

| Field | Type | Description |
| - | - | - |
| `title` | string | Heading of the block ("Trains from London to Manchester", "Consider taking the train") |
| `origin` | string | Origin in the route form, a station or a city ("Euston", "London (all stations)") |
| `destination` | string | Destination in the route form ("Manchester Piccadilly") |
| `date` | string | Date of the departures as shown ("Sat 24 Oct") |
| `fastest` | string | Duration of the fastest trip as shown ("2h 6m"). On the EU route unit, in each `supplier` |
| `cheapest` | object | Cheapest fare. See [Price](#price). On the EU route unit, in each `supplier` |
| `dailyDepartures` | number | Number of departures a day |
| `departures` | array | The departures, in page order. See below |
| `websites` | array | EU route unit: the transport websites, one per operator. See below |

### Departure

`position`, `departureTime`, `arrivalTime` and `expanded` are always present.

| Field | Type | Description |
| - | - | - |
| `position` | number | Position in page order (1-indexed), across the booking sites of the EU route unit |
| `departureTime` | string | Departure time as shown ("06:29", "5:10 am") |
| `arrivalTime` | string | Arrival time as shown |
| `arrivalDayOffset` | number | Days after the departure day, when the trip arrives on a later day (`1`) |
| `duration` | string | Duration as shown ("2h 15m") |
| `changes` | string | Changes as shown ("0 changes", "1 change") |
| `price` | object | Fare, or the low end of a fare range. See [Price](#price) |
| `maxPrice` | object | High end of a fare range ("₹728 - ₹4,331") |
| `operator` | string | Company or train as shown ("Avanti West Coast", "Eurostar 9018"), or "Multiple trains" |
| `expanded` | boolean | `true` if the page shows the departure without a click |
| `supplier` | object | EU route unit: the booking site of the departure. See below |

### Supplier

The booking site of a departure in the EU route unit, with its own summary: the fastest trip and the cheapest fare differ between sites.

| Field | Type | Description |
| - | - | - |
| `name` | string | Booking site (`"OMIO"`) |
| `expanded` | boolean | `true` if this booking site is open on the page |
| `domain` | string | Booking site's domain (`"omio.com"`) |
| `link` | string | The booking site's "See more on …" page |
| `fastest` | string | Duration of the fastest trip on this site as shown |
| `cheapest` | object | Cheapest fare on this site. See [Price](#price) |

### Website

| Field | Type | Description |
| - | - | - |
| `operator` | string | Operator ("Trenitalia") |
| `price` | object | Lowest fare. See [Price](#price) |
| `duration` | string | Duration of that trip as shown |
| `changes` | string | Changes of that trip as shown |
| `link` | string | Google's link to the operator's site |

### Price

| Field | Type | Description |
| - | - | - |
| `value` | number | Numeric fare. Omitted when the number doesn't parse |
| `currency` | string | Currency symbol (`£`, `€`, `₹`) |
| `raw` | string | Fare text as shown (`"£38"`) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.