Transport for Manchester, England API

Transportation / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

The Transport for Greater Manchester API (TfGM) gives developers access to real-time and scheduled data for buses, trams (Metrolink), and other transport services across Greater Manchester, England. An API key is required and can be obtained by registering on the TfGM Open Data Portal. The API returns JSON data and is well-suited for building transit apps or dashboards for the Manchester area.

💡

Beginner Tip

After registering on the TfGM Open Data Portal, start with the Metrolink live departure endpoint since it offers clean, straightforward JSON. The portal also includes interactive documentation where you can test requests without writing any code.

Available Data

match scores and results
team standings
player statistics
schedule and fixtures
Use case: Integrate tfgm transport network data data into web and mobile applications

Example Response

JSON Response
{
  "route": "Line 1",
  "origin": "Station A",
  "destination": "Station B",
  "departure": "08:30",
  "arrival": "09:15",
  "status": "On Time",
  "delays_min": 0
}

Field Reference

Id Unique numeric identifier for a Metrolink station or tram record.
StationLocation Name of the Metrolink tram stop or station.
Dest0 Destination displayed for the next tram departing from this platform.
Wait0 Minutes until the next tram departs; 0 means the tram is at the platform now.
Status Current operational status of the tram service at this stop, such as Due or Departing.
LastUpdated ISO 8601 timestamp indicating when the live departure data was last refreshed.

Implementation Example

const url = "https://developer.tfgm.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized or "Access denied due to missing subscription key" The subscription key is not included in the request header.
Add the header Ocp-Apim-Subscription-Key: YOUR_API_KEY to every request; this is different from a typical Authorization Bearer header.
403 Forbidden after repeated requests You may have exceeded the rate limit for your subscription tier.
Check your quota on the TfGM developer portal and add a delay between requests; consider caching responses locally.
OData query syntax error The or parameters use incorrect OData syntax.
Refer to the OData v4 specification and test filter expressions like =StationLocation eq 'Piccadilly' in the portal's interactive console first.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 9/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS NO
Category Transportation
Difficulty Intermediate
Verified: 2026-04-07

Similar APIs

View All →