# Transport for London API: Plan a London journey

> Plans a London public transport journey between two places, stations, addresses or postcodes with the TfL Journey Planner, leaving or arriving at a given time. Returns journey options in TfL order with leg directions and an adult pay-as-you-go fare when available.

Unofficial. Not affiliated with or endorsed by Transport for London.

- Page: https://fous.com/methods/tfl.gov.uk/plan-journey
- Method: `tfl.gov.uk/plan_journey`, version 1
- Website: tfl.gov.uk
- Returns: departure and arrival times, total time, adult pay-as-you-go fare, legs with mode, line, stops, time and instruction, TfL results link
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `modes` | array of string | no | `["bus"]` | Transport modes to include; omit for all public transport. Example: ["tube", "bus"]. |
| `origin` | string | yes | `"SW1A 1AA"` | From: London address, station, place or postcode. Example: King's Cross. |
| `time_is` | string | no | `"arriving"` | Whether the specified time is when you leave or arrive. Example: departing. One of "departing", "arriving". Default "departing". |
| `date_time` | string | no | `"now"` | London local departure or arrival date and time as ISO 8601, or now. Example: 2026-09-30T12:00:00+01:00. Default "now". |
| `destination` | string | yes | `"SE1 7PB"` | To: London address, station, place or postcode. Example: Brixton. |
| `max_results` | integer | no | `2` | Most journey options to show, in TfL order. Example: 3. Default 3. |

## Output

From a run on Oct 31, 2026. Its input:

```json
{
  "modes": [
    "bus"
  ],
  "origin": "SW1A 1AA",
  "time_is": "arriving",
  "date_time": "now",
  "destination": "SE1 7PB",
  "max_results": 2
}
```

Its output:

```json
{
  "journeys": [
    {
      "legs": [
        {
          "mode": "walking",
          "to_stop": "St James's Park Station",
          "leg_time": "10 min",
          "from_stop": "SW1A 1AA",
          "line_name": null,
          "instruction": "Walk to St James's Park Station",
          "time_minutes": 10
        },
        {
          "mode": "bus",
          "to_stop": "St Thomas' Hospital / County Hall",
          "leg_time": "0 min",
          "from_stop": "St James's Park Station",
          "line_name": "148",
          "instruction": "Take 148 bus to St Thomas' Hospital / County Hall",
          "time_minutes": 0
        },
        {
          "mode": "walking",
          "to_stop": "SE1 7PB",
          "leg_time": "5 min",
          "from_stop": "St Thomas' Hospital / County Hall",
          "line_name": null,
          "instruction": "Walk to SE1 7PB",
          "time_minutes": 5
        }
      ],
      "page_link": "https://tfl.gov.uk/plan-a-journey/results?InputFrom=SW1A+1AA&InputTo=SE1+7PB&Date=20260930&Time=1200&TimeIs=arriving",
      "total_time": "15 min",
      "arrival_time": "2026-09-30T11:40:00+01:00",
      "time_minutes": 15,
      "fare_currency": "GBP",
      "departure_time": "2026-09-30T11:25:00+01:00",
      "adult_pay_as_you_go_fare_gbp": 1.75
    },
    {
      "legs": [
        {
          "mode": "walking",
          "to_stop": "St James's Park Station",
          "leg_time": "10 min",
          "from_stop": "SW1A 1AA",
          "line_name": null,
          "instruction": "Walk to St James's Park Station",
          "time_minutes": 10
        },
        {
          "mode": "bus",
          "to_stop": "St Thomas' Hospital / County Hall",
          "leg_time": "2 min",
          "from_stop": "St James's Park Station",
          "line_name": "11",
          "instruction": "Take 11 bus to St Thomas' Hospital / County Hall",
          "time_minutes": 2
        },
        {
          "mode": "walking",
          "to_stop": "SE1 7PB",
          "leg_time": "5 min",
          "from_stop": "St Thomas' Hospital / County Hall",
          "line_name": null,
          "instruction": "Walk to SE1 7PB",
          "time_minutes": 5
        }
      ],
      "page_link": "https://tfl.gov.uk/plan-a-journey/results?InputFrom=SW1A+1AA&InputTo=SE1+7PB&Date=20260930&Time=1200&TimeIs=arriving",
      "total_time": "17 min",
      "arrival_time": "2026-09-30T11:42:00+01:00",
      "time_minutes": 17,
      "fare_currency": "GBP",
      "departure_time": "2026-09-30T11:25:00+01:00",
      "adult_pay_as_you_go_fare_gbp": 1.75
    }
  ]
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"tfl.gov.uk/plan_journey","input":{"modes":["bus"],"origin":"SW1A 1AA","time_is":"arriving","date_time":"now","destination":"SE1 7PB","max_results":2}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- How do I get from Paddington to Canary Wharf right now, and what's the pay-as-you-go fare?
- I need to arrive at SE1 9SG by 9:15am on 14 October 2025, starting from Walthamstow Central. Show me up to 4 options using only tube and bus.
- Use the TfL Journey Planner to find routes from Heathrow Terminal 5 to Liverpool Street leaving at 6pm this Friday, Elizabeth line preferred.
- On tfl.gov.uk, plan a trip from 221B Baker Street to the O2 Arena in Greenwich, departing 2025-11-08T19:30:00Z, with step-by-step leg directions.
- Fastest way from Clapham Junction to Stratford by Overground or DLR only, need to be there by 10am tomorrow — give me just the top option and how long it takes.

## Input schema

```json
{
  "type": "object",
  "required": [
    "origin",
    "destination"
  ],
  "properties": {
    "modes": {
      "type": "array",
      "items": {
        "enum": [
          "tube",
          "bus",
          "overground",
          "elizabeth_line",
          "dlr",
          "national_rail"
        ],
        "type": "string"
      },
      "description": "Transport modes to include; omit for all public transport. Example: [\"tube\", \"bus\"]."
    },
    "origin": {
      "type": "string",
      "description": "From: London address, station, place or postcode. Example: King's Cross."
    },
    "time_is": {
      "enum": [
        "departing",
        "arriving"
      ],
      "type": "string",
      "default": "departing",
      "description": "Whether the specified time is when you leave or arrive. Example: departing."
    },
    "date_time": {
      "type": "string",
      "default": "now",
      "description": "London local departure or arrival date and time as ISO 8601, or now. Example: 2026-09-30T12:00:00+01:00."
    },
    "destination": {
      "type": "string",
      "description": "To: London address, station, place or postcode. Example: Brixton."
    },
    "max_results": {
      "type": "integer",
      "default": 3,
      "maximum": 10,
      "minimum": 1,
      "description": "Most journey options to show, in TfL order. Example: 3."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "journeys"
  ],
  "properties": {
    "journeys": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "departure_time",
          "arrival_time",
          "total_time",
          "adult_pay_as_you_go_fare_gbp",
          "fare_currency",
          "legs",
          "page_link",
          "time_minutes"
        ],
        "properties": {
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "mode",
                "line_name",
                "from_stop",
                "to_stop",
                "leg_time",
                "instruction",
                "time_minutes"
              ],
              "properties": {
                "mode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_stop": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "leg_time": {
                  "type": "string"
                },
                "from_stop": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "line_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "instruction": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "time_minutes": {
                  "type": "integer"
                }
              },
              "additionalProperties": false
            }
          },
          "page_link": {
            "type": "string"
          },
          "total_time": {
            "type": "string"
          },
          "arrival_time": {
            "type": "string"
          },
          "time_minutes": {
            "type": "integer"
          },
          "fare_currency": {
            "enum": [
              "GBP"
            ],
            "type": "string"
          },
          "departure_time": {
            "type": "string"
          },
          "adult_pay_as_you_go_fare_gbp": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
```

## See more

- [Transport for London API: Get line status](https://fous.com/methods/tfl.gov.uk/get-line-status.md): Gets the current or future-day service status for London Tube, Elizabeth line, DLR, Overground, tram or a named bus route. Multiple notices on one line are combined into the most disruptive status.
- [Google API: Get directions](https://fous.com/methods/google.com/get-directions.md): Gets up to three Google Maps routes between two places, with distances, travel times and step-by-step directions.
- [FlixBus API: Search bus trips](https://fous.com/methods/flixbus.com/search-bus-trips.md): Finds dated FlixBus trip options between two cities, with stops, local times, availability and displayed per-person prices, including partner operators on some routes.
- [Trip.com API: Search flights](https://fous.com/methods/trip.com/search-flights.md): Finds priced flights between two cities or airports on Trip.com for the chosen dates, cheapest first; round trips pair each outbound flight with its available returns.
- [Google API: Search Google Flights](https://fous.com/methods/google.com/search-flights.md): Finds Google Flights options for a route and date with prices, local times, stops and emissions. Round-trip searches list outbound choices with their displayed round-trip fares.
- [Time and Date API: Convert time between cities](https://fous.com/methods/timeanddate.com/convert-time-between-cities.md): Converts a meeting time in one city to local times in other cities, with time zones and 09:00-17:00 working-hours status. Supports dates from 1970 to 2030; ambiguous clock-change times use the first occurrence.
- [Numbeo API: Compare cost of living between two cities](https://fous.com/methods/numbeo.com/compare-cost-of-living.md): Compares living costs in two Numbeo cities: six price and purchasing-power differences, plus the monthly take-home salary needed in the destination for a similar standard of living (rent assumed in both cities).
- [Expedia API: Search flights](https://fous.com/methods/expedia.com/search-flights.md): Finds Expedia flights between cities or airports on selected dates, with per-traveler USD prices. Round trips combine outbound and return choices; for round trips only the cheapest outbound choices are paired with their returns.
- [All Transport for London methods](https://fous.com/methods/tfl.gov.uk.md)
