canonical: https://jentic.com/apis/tfl.gov.uk/tfl-gov-uk

# Tfl Transport for London Unified API

tfl.gov.uk/main version v1. The API exposes 84 endpoints secured with apiKey authentication.

## For AI agents

Programmatically gets all accident details for accidents occuring in the specified year, gets air quality data feed. Covers 84 operations with apiKey authentication.

## Scope

Does not handle payments, communications, or crm - use for maps and geolocation only.

## Capabilities

- Gets all accident details for accidents occuring in the specified year
- Search for bike stations by their name, a bike point's name often contains infor
- Perform a Journey Planner search from the parameters specified in simple types
- Query and filter Transport for London Unified API records by parameters
- Monitor Transport for London Unified API operational status and events

## Use cases

### Maps and Geolocation Operations

Use the Transport for London Unified API to perform maps geolocation operations programmatically. The API provides 84 endpoints covering core functionality including gets all accident details for accidents occuring in the specified year, gets air quality data feed, gets all bike point locations. the place object has an addtionalproperties array.

Example prompt: Call GET /AccidentStats/{year} to gets all accident details for accidents occuring in the specified year

### Automated Accidentstats Management

Automate accidentstats operations by combining multiple Transport for London Unified API endpoints. Agents can gets air quality data feed and then gets all bike point locations. the place object has an addtionalproperties array in a single workflow.

Example prompt: Call GET /AirQuality to gets air quality data feed, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Transport for London Unified API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle apiKey tokens manually.

Example prompt: Search Jentic for 'gets all accident details for accidents occuring in the specified year', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| 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 |
| GET | /BikePoint/Search | Search for bike stations by their name, a bike point's name often contains infor |
| 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 |

## Key resources

- **Accidentstats** — Operations for AccidentStats
- **Airquality** — Operations for AirQuality
- **Bikepoint** — Operations for BikePoint
- **Cabwise** — Operations for Cabwise
- **Journey** — Operations for Journey

## Why Jentic

- **Setup:** Wiring the Transport for London Unified API by hand means passing its app_key and app_id in the query string of every request to api.digital.tfl.gov.uk and handling each transport endpoint yourself. Through Jentic you install once, import the TfL Unified API from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** The TfL Unified API is read-only and puts targets like the accident year and bike point id in the URL path (/AccidentStats/{year}, /BikePoint/{id}), so limit the agent to the operations it needs, such as fetching bike points or planning a journey. You choose that set, so an endpoint is only reachable if you include it.
- **Credential handling:** Your TfL app_key and app_id are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'plan a journey between two points' or 'find nearby bike points', and Jentic returns the matching Transport for London operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Here** — Alternative maps geolocation API
- **Tomtom** — Alternative maps geolocation API
- **Googleapis** — Complementary maps geolocation API

## FAQ

### What authentication does the Transport for London Unified API use?

The Transport for London Unified API uses an API key passed in the `app_key` query. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I gets all accident details for accidents occuring in the specified year with the Transport for London Unified API?

Yes. Use the GET /AccidentStats/{year} endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Transport for London Unified API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I gets all accident details for accidents occuring in the specified year through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'gets all accident details for accidents occuring in the specified year'. Jentic returns the matching Transport for London Unified API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Transport for London Unified API have?

The Transport for London Unified API exposes 84 endpoints covering accidentstats, airquality, bikepoint operations.

### Can I limit what my agent is allowed to do with the Transport for London Unified API?

Yes. Because Jentic One is self-hosted, you define the rules that decide which Transport for London operations and credentials your agent may use, and this API is read-only, so an agent can only fetch data, never change it. You can restrict the agent to just the operations it needs, such as GET /BikePoint for cycle hire locations or GET /Journey/JourneyResults for journey planning, while leaving others like GET /AccidentStats/{year} or GET /AirQuality out of reach. An endpoint is only callable if you include it in the set you allow.
