Querying Live running status and PNR of trains using Railway API in Python
Railway API is organized around GET Requests. One can use this JSON based API to get information from Indian Railways regarding Live Train Status, PNR Status, Train Schedule, Station Details, and other things.
To use this API, one must need the API key, which can get from here
Note: User need to create an account on railwayapi.com to use the APIs.
Modules Needed :
Live running status :
Below is the implementation :
train name : NEWDELHI JAN SHATABDI EXP source station : DEHRADUN destination station : NEW DELHI current status : Train has reached Destination and late by 15 minutes.
Live PNR status :
train name : DOON EXPRESS train number : 13009 from station : LUCKNOW to station : DEHRADUN boarding point : LUCKNOW reservation upto : DEHRADUN pnr number : 6515483790 date of journey : 01-07-2018 total no. of passengers: 1 chart prepared : False passenger number : 1 current status : RLWL/-/16/GN booking_status : RLWL/-/23/GN