[IRCTC] Indian railways official eRail API 1.1 for developers to get train info

eRail.in API is the Official API for developers to get Indian railway information such as Station List, Trains, Route, Fare. PNR Status, Live Status, Seat/Berth Availability, Cancelled train information, Diverted trains, Rescheduled trains, and so on as JSON objects.

Note that this data is provided for non-commercial use for developers to create innovative mobile applications and websites for that would be useful for commuters.

Note: It seems like eRail.in API service has been suspended until further notice!

How to use eRail API

The API works on HTTP protocol and as a developer, you have to register yourself with the service by sending an email to api@erail.in with following details,

Subject: Request for Indian Railways API registration Body: To eRail.in API,

I would like to register for Indian Railways API access.

Following are the details :

Contact Name :
Contact Email ID:
Commercial/Non-Commercial :
Purpose of use :

Once you get approved you will reactive an API key, each request to the server as a URL must contain a Valid API Key, this will help you monitor application usage and set per IP quota/limit

Try Out Code2care Dev Tools:


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.