Transport for London API
Free Transport for London API: live tube line status, arrivals, journey planning, bike hire and stop points across London. No key for light use. Tested example.
Endpoint tested and returned HTTP 200 on 19 Aug 2026
What is the Transport for London API?
The Transport for London Unified API provides free real-time data for London's transport network — tube and rail line status, live arrival predictions, journey planning, cycle hire availability and stop point information.
TfL's Unified API is one of the best transport APIs published by any city. It covers the tube, buses, Overground, Elizabeth line, DLR, trams, river services and Santander Cycles through a consistent interface, with real-time arrival predictions rather than just timetables.
Light use works with no credentials at all, which is what the example here demonstrates. Registering for a free app key raises your rate limit substantially and is worth doing before you ship anything that polls regularly.
Quick facts
- Base URL
https://api.tfl.gov.uk- Authentication
- Works without credentials at a low rate. A free app_key raises the limit to 500 requests per minute.
- Rate limit
- About 50 requests per minute unregistered; 500 per minute with a free key.
- Pricing
- Free under the TfL open data terms, which require attribution.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Transport for London API
Every request below was executed against the live API on 19 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Live status for all tube lines
GET https://api.tfl.gov.uk/Line/Mode/tube/Status
curl 'https://api.tfl.gov.uk/Line/Mode/tube/Status'const res = await fetch("https://api.tfl.gov.uk/Line/Mode/tube/Status");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.tfl.gov.uk/Line/Mode/tube/Status", timeout=20)
res.raise_for_status()
print(res.json())[
{
"$type": "Tfl.Api.Presentation.Entities.Line, Tfl.Api.Presentation.Entities",
"id": "bakerloo",
"name": "Bakerloo",
"modeName": "tube",
"disruptions": [],
"created": "2026-08-17T17:06:09.307Z",
"modified": "2026-08-17T17:06:09.307Z",
"lineStatuses": [
{
"$type": "Tfl.Api.Presentation.Entities.LineStatus, Tfl.Api.Presentation.Entities",
"id": 0,
"statusSeverity": 10,
"statusSeverityDescription": "Good Service",
"created": "0001-01-01T00:00:00",
"validityPeriods": []
}
],
"routeSections": [],
"serviceTypes": [
{
"$type": "Tfl.Api.Presentation.Entities.LineServiceTypeInfo, Tfl.Api.Presentation.Entities",
"name": "Regular",
"uri": "/Line/Route?ids=Bakerloo&serviceTypes=Regular"
}
],
"crowding": {
"$type": "Tfl.Api.Presentation.Entities.Crowding, Tfl.Api.Presentation.Entities"
}
},
{
"$type": "Tfl.Api.Presentation.Entities.Line, Tfl.Api.Presentation.Entities",
"id": "central",
"name": "Central",
"modeName": "tube",
"disruptions": [],
"created": "2026-08-17T17:06:09.307Z",
"modified": "2026-08-17T17:06:09.307Z",
"lineStatuses": [
{
"$type": "Tfl.Api.Presentation.Entities.LineStatus, Tfl.Api.Presentation.Entities",
"id": 0,
"statusSeverity": 10,
"statusSeverityDescription": "Good Service",
"created": "0001-01-01T00:00:00",
"validityPeriods": []
}
],
"routeSections": [],
"serviceTypes": [
{
"$type": "Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
<mode> | path | Optional | Transport mode: tube, bus, dlr, overground, tram. tube |
app_key | string | Optional | Free API key to raise the rate limit. your-key |
StopPoint/<id>/Arrivals | path | Optional | Live arrival predictions for a stop. 940GZZLUOXC |
Journey/JourneyResults/<from>/to/<to> | path | Optional | Plan a journey between two points. SW1A1AA/to/E1 |
Response fields
idstring- Line identifier, e.g. bakerloo.
namestring- Display name of the line.
modeNamestring- Transport mode.
lineStatuses[].statusSeverityDescriptionstring- Good Service, Minor Delays, Part Closure and so on.
lineStatuses[].reasonstring- Explanation when there is disruption.
disruptionsarray- Active disruptions affecting the line.
What you can build with the Transport for London API
- Show live tube status on a dashboard or office display
- Build arrival boards for a specific station or bus stop
- Add journey planning to a London-focused app
- Track Santander Cycles dock availability
Common errors and how to fix them
429
Unregistered rate limit exceeded.
Fix: Register for a free app key and pass it as app_key — it raises the limit tenfold.
404 on StopPoint
Unknown stop point identifier.
Fix: Use the /StopPoint/Search endpoint to resolve a station name to its NaPTAN id.
Empty lineStatuses
The line is running normally with no reported status.
Fix: Treat an empty or Good Service status as normal operation.
Transport for London API — frequently asked questions
Is the TfL API free?
Yes, free under TfL's open data terms, which require attribution. Light use needs no credentials; a free app key raises the rate limit substantially.
Does it provide real-time arrivals?
Yes. The StopPoint Arrivals endpoints return live predictions rather than scheduled times, which is what makes it useful for departure boards.
Which transport modes are covered?
Tube, bus, DLR, Overground, Elizabeth line, tram, river services, National Rail within London, and Santander Cycles docking stations.
How do I find a station's id?
Use /StopPoint/Search?query=Oxford+Circus to resolve a name to its NaPTAN identifier, then use that id with the arrivals endpoints.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Timestamp Converter
Convert timestamps to human-readable dates and dates back to timestamps. Auto-detects seconds vs milliseconds, shows local, UTC and ISO 8601 formats.
Alternatives to Transport for London API
If Transport for London does not fit, these transport & vehicle apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| NHTSA vPIC | Free NHTSA vPIC API with no key: decode any VIN, list vehicle makes and models, and get manufacturer and specification data. Tested curl example. | No key | No | 19 Aug 2026 |
| NHTSA Recalls | Free NHTSA recalls API with no key: look up open safety recalls by make, model and year, with remedy details and Park It warnings. Tested curl example. | No key | No | 19 Aug 2026 |
| OpenSky Network | Free OpenSky Network API: live aircraft positions, altitude, velocity and callsigns worldwide from crowd-sourced ADS-B receivers. Tested curl example. | No key | No | 19 Aug 2026 |
| Jolpica F1 (Ergast) | Free Formula 1 API with no key: race results, driver and constructor standings, qualifying, lap times and pit stops from 1950 onwards. Tested curl example. | No key | No | 19 Aug 2026 |
| ViaggiaTreno (Italy) | Free Italian railway API with no key: search stations, look up live train status, delays and platform information across the Trenitalia network. Tested example included. | No key | No | 21 Aug 2026 |
| Wiener Linien Realtime | Free Vienna public transport API with no key: live countdown times for U-Bahn, tram and bus, with step-free access flags and traffic-jam warnings. Tested example included. | No key | No | 21 Aug 2026 |
Transport for London is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 19 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.