
Transport for Manchester, England
TransportationTfGM transport network data. The system has been designed to provide Developers with access to data from across the region’s transport network. The system enables you to register for an account, and access various different data feeds. You can also find out the latest news about TfGMs open data. TfGM hopes that by making more data available from across the region’s transport network that this will inspire the development of high quality applications that create better informed travellers and stimulate smarter choices.
📚 Documentation & Examples
Everything you need to integrate with Transport for Manchester, England
🚀 Quick Start Examples
// Transport for Manchester, England API Example
const response = await fetch('https://developer.tfgm.com/', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
Using TFGM's Public API with JavaScript
If you are looking to build applications that contain information related to transport in the Greater Manchester area, the TFGM API can be a great resource to get started. In this article, we will show you how to use this API with JavaScript.
Getting Started
Before you can start using the TFGM API, you first need to sign up to create an account. Once you have registered and verified your account, you will receive an API key that you can use to access the various endpoints.
Endpoints
The TFGM API has several endpoints that you can use to retrieve information about transport in Greater Manchester. Below are some examples of how you can use these endpoints with JavaScript.
Bus Schedules
fetch('https://api.tfgm.com/odata/busstopschedules')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
Train Schedules
fetch('https://api.tfgm.com/odata/trainschedules')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
Tram Schedules
fetch('https://api.tfgm.com/odata/tramschedules')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
Car Parks
fetch('https://api.tfgm.com/odata/carparks')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
Travel Alerts
fetch('https://api.tfgm.com/odata/travelalerts')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
Conclusion
In this article, we have demonstrated how to use TFGM's Public API with JavaScript. By using these endpoints, you can build applications that provide in-depth information related to transport in Greater Manchester. Get creative and build something amazing!
📊 30-Day Uptime History
Daily uptime tracking showing online vs offline minutes