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:
So, to learn more about it in python for data science, you can check this and this as well.
