
Transport for India
TransportationIndia Public Transport API. Get data of Road Transport Year Book: 2016-17. Range of information pertaining to registered motor vehicles over time and across state/UTs and major cities and Data of various road transport parameters have been provided here i.e Number of Registered Motor Vehicles, composition of registered motor vehicles, taxes on road transport and motor vehicles, production and sale of motor vehicles, drivers conductors licenses issued etc. Transport Road Transport Year Book 2016-17 Get data of Road Transport Year Book: 2016-17. Range of information pertaining to registered motor vehicles over time and across state/UTs and major cities and Data of various road transport parameters have been provided here i.e Number of Registered Motor Vehicles, composition of registered motor vehicles, taxes on road transport and motor vehicles, production and sale of motor vehicles, drivers conductors licenses issued etc. Road Accidents in India 2018 The data refers to Total Number of Road Accidents, Persons Killed and Injured. It also provides some other information like Number of Accidents per Lakh Population, Number of Accidents per Ten Thousand Vehicles, Number of Accidents per Ten Thousand Kms of Roads, Number of Persons Killed Per Lakh Population, Number of Persons Killed Per Ten Thousand Vehicles, Number of Persons Killed per Ten Thousand Kms of Roads, Number of Persons Injured per Lakh Population, Number of Persons Injured Per Ten Thousand Vehicles and Number of Persons Injured Per Ten Thousand Kms of Roads. Get data of Basic Road Statistics of India 2016-17. It provides comprehensive information on the total road network of the country. Road Statistics of India contains information on various categories of roads at National, State and Local (Municipal and Panchayat) levels. Apart from this, the information on plan allocation and expenditure on roads and an international comparison of road networks are also provided.
📚 Documentation & Examples
Everything you need to integrate with Transport for India
🚀 Quick Start Examples
// Transport for India API Example
const response = await fetch('https://data.gov.in/sector/transport', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
Exploring Transport API on data.gov.in
data.gov.in provides a variety of APIs to access various public datasets. In this blog, we will explore the Transport API and learn how to use it to retrieve transport-related information.
Transport API
Transport API provides access to information related to transport in India. This includes data related to road transport, rail transport, air transport, and water transport. This API can be used to retrieve information such as vehicle registration details, train schedules, flight schedules, etc.
Getting Started
To get started using the Transport API, we need to first obtain an API key. The API key can be obtained by registering at https://api.data.gov.in/signup/. Once the API key is obtained, we can start using the API.
Let's consider an example of how to use the Transport API to retrieve vehicle registration details.
Retrieving Vehicle Registration Details
To retrieve vehicle registration details using the Transport API, we can send a GET request to the following endpoint:
https://api.data.gov.in/resource/416cce7b-9a1c-4c31-8622-221daeef640e?api-key=<api_key>&format=json&filters[registrationno]=<registration_number>
Here, <api_key>
should be replaced with the actual API key obtained from the data.gov.in website. <registration_number>
should be replaced with the actual vehicle registration number.
Here's how we can achieve this in JavaScript:
const api_key = '<api_key>';
const registration_number = '<registration_number>';
const endpoint = `https://api.data.gov.in/resource/416cce7b-9a1c-4c31-8622-221daeef640e?api-key=${api_key}&format=json&filters[registrationno]=${registration_number}`;
fetch(endpoint)
.then(response => response.json())
.then(data => {
console.log(data);
});
In the above code, we first define the api_key
and registration_number
variables. We then construct the endpoint by replacing the placeholders with actual values. We then use the fetch
function to send a GET request to the endpoint. The response is then processed as JSON data.
Conclusion
In this blog, we learned how to use the Transport API provided by data.gov.in to retrieve vehicle registration details. Similar techniques can be applied to retrieve other transport-related information.