Open documentation ↗Overview
Discover TFL APIs
Transport for London, England is a transportation API from tfl.gov.uk. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 84 endpoints.
At a glance
- Authentication
- API key
- HTTPS
- Yes
- CORS
- Unknown
- Category
- Transportation
- Base URL
https://api.digital.tfl.gov.uk- Version
- v1
- Endpoints
- 84
- OpenAPI
- Specification ↗
- Spec updated
- 2023-03-06
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://api.digital.tfl.gov.uk/AirQuality" \
-H "Accept: application/json" \
-H "X-API-Key: YOUR_API_KEY"const response = await fetch("https://api.digital.tfl.gov.uk/AirQuality", {
method: "GET",
headers: {
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://api.digital.tfl.gov.uk/AirQuality",
headers={
"Accept": "application/json",
"X-API-Key": "YOUR_API_KEY",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /AccidentStats/{year} | Gets all accident details for accidents occuring in the specified year |
| GET | /AirQuality | Gets air quality data feed |
| GET | /BikePoint | Gets all bike point locations. The Place object has an addtionalProperties array which contains the nbBikes, nbDocks and nbSpaces numbers which giv |
| GET | /BikePoint/Search | Search for bike stations by their name, a bike point's name often contains information about the name of the street or nearby landmarks, for exampl |
| GET | /BikePoint/{id} | Gets the bike point with the given id. |
| GET | /Cabwise/search | Gets taxis and minicabs contact information |
| GET | /Journey/JourneyResults/{from}/to/{to} | Perform a Journey Planner search from the parameters specified in simple types |
| GET | /Journey/Meta/Modes | Gets a list of all of the available journey planner modes |
| GET | /Line/Meta/DisruptionCategories | Gets a list of valid disruption categories |
| GET | /Line/Meta/Modes | Gets a list of valid modes |
| GET | /Line/Meta/ServiceTypes | Gets a list of valid ServiceTypes to filter on |
| GET | /Line/Meta/Severity | Gets a list of valid severity codes |
| GET | /Line/Mode/{modes} | Gets lines that serve the given modes. |
| GET | /Line/Mode/{modes}/Disruption | Get disruptions for all lines of the given modes. |
| GET | /Line/Mode/{modes}/Route | Gets all lines and their valid routes for given modes, including the name and id of the originating and terminating stops for each route |
| GET | /Line/Mode/{modes}/Status | Gets the line status of for all lines for the given modes |
| GET | /Line/Route | Get all valid routes for all lines, including the name and id of the originating and terminating stops for each route. |
| GET | /Line/Search/{query} | Search for lines or routes matching the query string |
| GET | /Line/Status/{severity} | Gets the line status for all lines with a given severity A list of valid severity codes can be obtained from a call to Line/Meta/Severity |
| GET | /Line/{ids} | Gets lines that match the specified line ids. |
| GET | /Line/{ids}/Arrivals/{stopPointId} | Get the list of arrival predictions for given line ids based at the given stop |
| GET | /Line/{ids}/Disruption | Get disruptions for the given line ids |
| GET | /Line/{ids}/Route | Get all valid routes for given line ids, including the name and id of the originating and terminating stops for each route. |
| GET | /Line/{ids}/Status | Gets the line status of for given line ids e.g Minor Delays |
| GET | /Line/{ids}/Status/{StartDate}/to/{EndDate} | Gets the line status for given line ids during the provided dates e.g Minor Delays |
| GET | /Line/{id}/Route/Sequence/{direction} | Gets all valid routes for given line id, including the sequence of stops on each route. |
| GET | /Line/{id}/StopPoints | Gets a list of the stations that serve the given line id |
| GET | /Line/{id}/Timetable/{fromStopPointId} | Gets the timetable for a specified station on the give line |
| GET | /Line/{id}/Timetable/{fromStopPointId}/to/{toStopPointId} | Gets the timetable for a specified station on the give line with specified destination |
| GET | /Mode/ActiveServiceTypes | Returns the service type active for a mode. Currently only supports tube |
| GET | /Mode/{mode}/Arrivals | Gets the next arrival predictions for all stops of a given mode |
| GET | /Occupancy/BikePoints/{ids} | Get the occupancy for bike points. |
| GET | /Occupancy/CarPark | Gets the occupancy for all car parks that have occupancy data |
| GET | /Occupancy/CarPark/{id} | Gets the occupancy for a car park with a given id |
| GET | /Occupancy/ChargeConnector | Gets the occupancy for all charge connectors |
| GET | /Occupancy/ChargeConnector/{ids} | Gets the occupancy for a charge connectors with a given id (sourceSystemPlaceId) |
| GET | /Place | Gets the places that lie within a geographic region. The geographic region of interest can either be specified by using a lat/lon geo-point and a r |
| GET | /Place/Address/Streets/{Postcode} | Gets the set of streets associated with a post code. |
| GET | /Place/Meta/Categories | Gets a list of all of the available place property categories and keys. |
| GET | /Place/Meta/PlaceTypes | Gets a list of the available types of Place. |
| GET | /Place/Search | Gets all places that matches the given query |
| GET | /Place/Type/{types} | Gets all places of a given type |
| GET | /Place/{id} | Gets the place with the given id. |
| GET | /Place/{type}/At/{Lat}/{Lon} | Gets any places of the given type whose geography intersects the given latitude and longitude. In practice this means the Place must be polygonal e |
| GET | /Place/{type}/overlay/{z}/{Lat}/{Lon}/{width}/{height} | Gets the place overlay for a given set of co-ordinates and a given width/height. |
| GET | /Road | Gets all roads managed by TfL |
| GET | /Road/Meta/Categories | Gets a list of valid RoadDisruption categories |
| GET | /Road/Meta/Severities | Gets a list of valid RoadDisruption severity codes |
| GET | /Road/all/Disruption/{disruptionIds} | Gets a list of active disruptions filtered by disruption Ids. |
| GET | /Road/all/Street/Disruption | Gets a list of disrupted streets. If no date filters are provided, current disruptions are returned. |
| GET | /Road/{ids} | Gets the road with the specified id (e.g. A1) |
| GET | /Road/{ids}/Disruption | Get active disruptions, filtered by road ids |
| GET | /Road/{ids}/Status | Gets the specified roads with the status aggregated over the date range specified, or now until the end of today if no dates are passed. |
| GET | /Search | Search the site for occurrences of the query string. The maximum number of results returned is equal to the maximum page size of 100. To return sub |
| GET | /Search/BusSchedules | Searches the bus schedules folder on S3 for a given bus number. |
| GET | /Search/Meta/Categories | Gets the available search categories. |
| GET | /Search/Meta/SearchProviders | Gets the available searchProvider names. |
| GET | /Search/Meta/Sorts | Gets the available sorting options. |
| GET | /StopPoint | Gets a list of StopPoints within {radius} by the specified criteria |
| GET | /StopPoint/Meta/Categories | Gets the list of available StopPoint additional information categories |
| GET | /StopPoint/Meta/Modes | Gets the list of available StopPoint modes |
| GET | /StopPoint/Meta/StopTypes | Gets the list of available StopPoint types |
| GET | /StopPoint/Mode/{modes} | Gets a list of StopPoints filtered by the modes available at that StopPoint. |
| GET | /StopPoint/Mode/{modes}/Disruption | Gets a distinct list of disrupted stop points for the given modes |
| GET | /StopPoint/Search | Search StopPoints by their common name, or their 5-digit Countdown Bus Stop Code. |
| GET | /StopPoint/Search/{query} | Search StopPoints by their common name, or their 5-digit Countdown Bus Stop Code. |
| GET | /StopPoint/ServiceTypes | Gets the service types for a given stoppoint |
| GET | /StopPoint/Sms/{id} | Gets a StopPoint for a given sms code. |
| GET | /StopPoint/Type/{types} | Gets all stop points of a given type |
| GET | /StopPoint/Type/{types}/page/{page} | Gets all the stop points of given type(s) with a page number |
| GET | /StopPoint/{ids} | Gets a list of StopPoints corresponding to the given list of stop ids. |
| GET | /StopPoint/{ids}/Disruption | Gets all disruptions for the specified StopPointId, plus disruptions for any child Naptan records it may have. |
| GET | /StopPoint/{id}/ArrivalDepartures | Gets the list of arrival and departure predictions for the given stop point id (overground, Elizabeth line and thameslink only) |
| GET | /StopPoint/{id}/Arrivals | Gets the list of arrival predictions for the given stop point id |
| GET | /StopPoint/{id}/CanReachOnLine/{lineId} | Gets Stopoints that are reachable from a station/line combination. |
| GET | /StopPoint/{id}/Crowding/{line} | Gets all the Crowding data (static) for the StopPointId, plus crowding data for a given line and optionally a particular direction. |
| GET | /StopPoint/{id}/DirectionTo/{toStopPointId} | Returns the canonical direction, "inbound" or "outbound", for a given pair of stop point Ids in the direction from -> to. |
| GET | /StopPoint/{id}/Route | Returns the route sections for all the lines that service the given stop point ids |
| GET | /StopPoint/{id}/placeTypes | Get a list of places corresponding to a given id and place types. |
| GET | /StopPoint/{stopPointId}/CarParks | Get car parks corresponding to the given stop point id. |
| GET | /StopPoint/{stopPointId}/TaxiRanks | Gets a list of taxi ranks corresponding to the given stop point id. |
| GET | /TravelTimes/compareOverlay/{z}/mapcenter/{mapCenterLat}/{mapCenterLon}/pinlocation/{pinLat}/{pinLon}/dimensions/{width}/{height} | Gets the TravelTime overlay. |
| GET | /TravelTimes/overlay/{z}/mapcenter/{mapCenterLat}/{mapCenterLon}/pinlocation/{pinLat}/{pinLon}/dimensions/{width}/{height} | Gets the TravelTime overlay. |
| GET | /Vehicle/{ids}/Arrivals | Gets the predictions for a given list of vehicle Id's. |
Questions
Does the Transport for London, England API need an API key?
Yes. The Transport for London, England API uses API key authentication; the documentation explains how to get credentials.
Does the Transport for London, England API support HTTPS?
Yes, the Transport for London, England API is served over HTTPS.
How many endpoints does the Transport for London, England API have?
Its OpenAPI description lists 84 endpoints in version v1. All of them are shown on this page.
What are alternatives to the Transport for London, England API?
Other Transportation APIs include airportsapi, Uber, Transport for Spain, Amadeus for Developers, Boston MBTA Transit.
Similar transportation APIs
Compare alternatives →airportsapi
TransportationGet name and website-URL for airports by ICAO code
Uber
TransportationUber ride requests and price estimation
Transport for Spain
TransportationPublic trains of Spain
Amadeus for Developers
TransportationTravel Search - Limited usage
Boston MBTA Transit
TransportationStations and predicted arrivals for MBTA
ADS-B Exchange
TransportationAccess real-time and historical data of any and all airborne aircraft
Listed from public-apis (MIT), public-apis database (MIT), APIs.guru (CC0).