irctc-connect
v3.3.2
Published
⚠️ DEPRECATED: This package has been renamed to `railkit`. It still works for now but will not receive updates. Please migrate to `railkit` as soon as possible.
Downloads
363
Maintainers
Readme
⚠️ DEPRECATION NOTICE
irctc-connecthas been renamed torailkit.This package will continue to work for now, but it will not receive new features, bug fixes, or security updates. Please migrate to
railkitas soon as possible.🔄 Migrate in 3 steps
# 1. Remove the old package npm uninstall irctc-connect # 2. Install the new package npm install railkit- import { configure, checkPNRStatus } from "irctc-connect"; + import { configure, checkPNRStatus } from "railkit";📖 New documentation: https://railkit.rajivdubey.dev 📦 New repository: github.com/RAJIV81205/RailKit 🚀 npm page: npmjs.com/package/railkit
IRCTC Connect (DEPRECATED)
Heads up: This is the legacy
irctc-connectpackage. It still works, but the actively maintained successor israilkit. New users should installrailkitdirectly.
A comprehensive Node.js SDK for Indian Railways. Get real-time PNR status, train information, live tracking, station updates, train search, and seat availability — all through a single, clean API.
✨ Features
- 🎫 PNR Status — Real-time PNR status with full passenger details
- 🚂 Train Information — Complete train details with station-by-station route
- 📍 Live Train Tracking — Real-time position and delay info for any train
- 🚉 Live Station Board — Upcoming trains at any station right now
- 🔍 Train Search — Find all direct trains between two stations
- 💺 Seat Availability — Check availability and fare for any class and quota
- 💰 Fare Lookup — Full fare breakdown for any train, class, and quota
- ⚡ Fast & Reliable — Built-in timeout handling, input validation, and caching
📦 Installation (NEW package — recommended)
npm install railkitLegacy installation (this package)
If you specifically need the legacy irctc-connect package — for example to keep an existing project running while you migrate — you can still install it, but a deprecation warning will be shown on every install/update:
npm install irctc-connect@^3.3.1🔑 Getting an API Key
- Visit railkit.rajivdubey.dev
- Sign up and navigate to your Dashboard
- Generate an API key from the API Keys section
- Copy the key — you'll use it in the next step
🚀 Quick Start
Step 1 — Add your API key to .env
# .env
IRCTC_API_KEY=your_api_key_hereStep 2 — Use the SDK
With the new railkit package (recommended):
import { configure, checkPNRStatus } from "railkit";
configure(process.env.IRCTC_API_KEY);
const result = await checkPNRStatus("1234567890");
console.log(result);With the legacy irctc-connect package (still works):
import { configure, checkPNRStatus } from "irctc-connect";
configure(process.env.IRCTC_API_KEY);
const result = await checkPNRStatus("1234567890");
console.log(result);The API surface is identical — once you've swapped the import, you're done.
🧭 Migration Checklist
- [ ] Run
npm uninstall irctc-connect - [ ] Run
npm install railkit - [ ] Replace every
from "irctc-connect"withfrom "railkit" - [ ] Re-test your application
- [ ] Deploy 🚀
The configure(apiKey) call and all function names/signatures remain the same, so no other code changes are required.
📚 Documentation
| Resource | Link | | ----------------- | ------------------------------------------------------------------------------------- | | New docs site | https://railkit.rajivdubey.dev | | npm (new package) | https://www.npmjs.com/package/railkit | | GitHub repository | https://github.com/RAJIV81205/RailKit | | Issues | https://github.com/RAJIV81205/RailKit/issues |
📜 License
ISC © Rajiv81205
