Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.


Best free ai video generator : Synthesia


Best free ai audio generator.(realistic speech in your language) : Elevenlabs


How to build a railway booking app using IRCTC / RailOne API?

Last updated on 6 hours ago
A
admin2Senior Member
Posted 6 hours ago
Reply 6 by KaranSingh_Jaipur

8 hours ago
+1 to what everyone said.
If anyone has successfully integrated full booking (not just enquiry) as a small developer without becoming agent, please share. From what I’ve seen, almost everyone either:

Uses authorized partner APIs (paid), or
Just shows data and sends user to IRCTC / RailOne.

For sample code of pure enquiry, the ones shared above are good starting points.
All the best Rahul. Post progress if you decide something!
A
admin2Senior Member
Posted 6 hours ago
Reply 5 by AnanyaPatel_Ahmedabad

18 hours ago
Honest advice:

Side project / learning → Use third-party enquiry APIs + open IRCTC website/app for payment.
Serious commercial app → Apply for IRCTC PSP or partner with existing authorized API providers. Process is long and expensive.

Also keep in mind GST, refund handling, chart preparation timing, Tatkal rush (server load is crazy), etc. It’s not a simple CRUD app.
I built a small PNR + live status app last year using one of these wrappers. Users liked it, but nobody was ready to pay for pure enquiry.
A
admin2Senior Member
Posted 6 hours ago
Reply 4 by VikramReddy_Hyd

22 hours ago
If you just need train list + availability + PNR for your app UI, then packages like irctc-connect / railkit are decent.
Quick Node example I use:
const availability = await getAvailability(
 "22691", // train number
 "SBC", // from
 "NDLS", // to
 "25-12-2025", // date
 "2A", // class
 "GN" // quota
);

console.log(availability.data); // shows available seats, RAC, WL etc.

For full booking flow you’ll need to become IRCTC authorized agent or partner with existing ones (NTS, AOPAY, ZuelPay type companies). They take cut.
RailOne currently has no public API that I could find.
A
admin2Senior Member
Posted 6 hours ago
It works, but commission + API charges eat into margins. For pure side project, maybe just build enquiry + redirect user to IRCTC app/website.

Reply 3 by AmitSharma_Delhi

1 day ago
Don’t waste time looking for free full booking API. Doesn’t exist officially.
There is a GitHub package called irctc-api that some people use with their own IRCTC credentials (userID + password). It can actually book, but:

Against IRCTC terms
Account can get blocked any time
Payment has to be UPI of that account
Not scalable / legal for commercial app

I used it only for personal automation once. Not recommending for any public app.
Better stick to enquiry APIs + deep link to IRCTC or RailOne for actual booking.
A
admin2Senior Member
Posted 6 hours ago
import requests

headers = {"Authorization": "Bearer YOUR_TOKEN"}

# search
r = requests.get("https://api.provider.com/v1/trains/search",
 params={"from": "SBC", "to": "MAS", "date": "2025-11-20"},
 headers=headers)

# book
payload = {
 "train_no": "12658",
 "from": "SBC",
 "to": "MAS",
 "date": "2025-11-20",
 "class": "SL",
 "quota": "GN",
 "passengers": [
 {"name": "Priya Nair", "age": 28, "gender": "F", "berth": "LB"}
 ]
}
book = requests.post("https://api.provider.com/v1/book", json=payload, headers=headers)
print(book.json()["pnr"])
A
admin2Senior Member
Posted 6 hours ago
Reply 2 by PriyaNair_Trivandrum

1 day ago
Same question I had 6 months back 😅
Ended up using one of those authorized API providers (I won’t name, they charge per booking + monthly). Their flow is roughly:

Search trains
Check availability + fare
Create booking request with passenger details
Redirect to their payment page or use their payment API
Get PNR back

Sample pseudo code they gave:
A
admin2Senior Member
Posted 6 hours ago
Reply 1 by SureshKumar_Pune

2 days ago
Bro, official public API for full booking? Almost zero chance for normal people.
IRCTC only gives API access to registered PSPs (Principal Service Providers) / authorized agents. You need to apply, pay heavy integration fees (I’ve heard 10-20 lakh+ one time + yearly), maintain look-to-book ratio, etc. Not for side projects.
RailOne is just the new CRIS app (super app kind of thing). It is not giving any public developer API as far as I know.
For enquiry stuff (PNR, availability, live status, train search) there are some third-party wrappers floating around. One I tried recently:

// using irctc-connect style package
import { configure, checkPNRStatus, getAvailability, searchTrainBetweenStations } from "irctc-connect";

configure(process.env.API_KEY);

const trains = await searchTrainBetweenStations("NDLS", "BCT");
const seats = await getAvailability("12951", "NDLS", "BCT", "15-11-2025", "3A", "GN");
const pnr = await checkPNRStatus("4567890123");
A
admin2Senior Member
Posted 6 hours ago
Posted by: RahulMehta_Dev

2 days ago | Bangalore
Guys, I want to build a simple train ticket booking app (Android/iOS or even web) that can search trains, check availability, book tickets (including Tatkal if possible), and show PNR status.
I’ve heard people talk about IRCTC API and now this new RailOne app. Is there any official public API from IRCTC or RailOne that we can use as normal developers? Or do we have to go through authorized agents only?
Budget is not huge, this is more of a side project / small startup idea. Any real experience or sample code would help a lot. Thanks!
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
Sign In
Not a member yet? Click here to register.
Forgot Password?
Users Online Now
Guests Online 6
Members Online 0

Total Members: 139
Newest Member: rom_c