The railway API is organized around GET request. We can use this API for getting information from the Indian Railways regarding Live running status, Station details, and others through python for data science.
For using this API, we will need an API key from the following link: https://railwayapi.com/register
We have to create an account on railwayapi.com, only then we will be able to use the APIs.
Modules needed: requests, json.
Live running status:
We have shown the implementation below.
Finding Live PNR status: