Indian Railways+API.SH

Indian Railways API

Live running status, timetables, station boards and trains between stations for Indian Railways as JSON.

The API.SH Indian Railways API returns public train data as JSON. Check where a train is now with its delay and next stop, read a train's full timetable with every stop, find every train between two stations with days, classes and indicative fares, look up a station's live board and search station codes by name. It does not cover PNR status, seat availability or ticket booking.

  • 5 endpoints
  • from $1 / 1,000 calls
  • 1,000 free credits / month
  • failed calls free
Station code search
GET https://api.api.sh/indian-rail/v1/stations
{ "success": true }
1 credit · $1 per 1,000 calls

What you can build with the Indian Railways API

Train tracking apps

Show where a train is, how late it is and when it reaches the next stop, with the full list of halts.

Journey planners

List every train between two stations with departure, arrival, duration, days of running and classes, filtered by date or class.

Station displays and alerts

Show the trains due at a station with platform, expected times and delay, or alert on late arrivals.

Timetable and fare data

Pull a train's route, coach order, pantry and zone, and compare indicative fares by class.

Chatbots and travel agents

Give an assistant station code lookup, timetable and live status so it can answer train questions in plain language.

Indian Railways data you get

Field names from real responses. Numbers come parsed, URLs absolute, dates in ISO 8601.

Indian Railways API endpoints and prices

Every Indian Railways endpoint costs 1 credit per call: credits are $1 per 1,000 on a monthly plan, $2 pay-as-you-go. Pricing

Search and discovery1
Station code search
/indian-rail/v1/stations
$1 · $2 PAYG
1 credit
Posts and media1
Train live running status
/indian-rail/v1/live-status
$1 · $2 PAYG
1 credit
More data3
Station arrivals and departures
/indian-rail/v1/station
$1 · $2 PAYG
1 credit
Train schedule
/indian-rail/v1/train
$1 · $2 PAYG
1 credit
Trains between two stations
/indian-rail/v1/trains
$1 · $2 PAYG
1 credit

Call the Indian Railways API

Station code search: GET https://api.api.sh/indian-rail/v1/stations

curl "https://api.api.sh/indian-rail/v1/stations?q=delhi" \
  -H "x-api-key: $APISH_KEY"
  1. Create a free accountConfirm your email and get 1,000 free credits every month. No card needed.
  2. Create an API keyOne key works for all 482 platforms.
  3. Send the requestJSON back in one call. Add output=csv or output=ndjson for files.

Why API.SH for Indian Railways data

  • Public data only: no Indian Railways login, cookies or account needed
  • One key and one response shape for Indian Railways and 481 other platforms
  • Built and maintained by API.SH, not third-party publishers
  • Pay per call; errors on our side cost nothing
  • Live status for every endpoint

API.SH vs the official Indian Railways API

Search results, including Google's AI overview, say Indian Railways and IRCTC offer no open public API for general developers, with ticketing data limited to authorized partners. API.SH needs no partner agreement and returns public timetable, station and running-status data as JSON.

Instead of stitching together RapidAPI train listings, small hobby APIs or your own scraper, use one API.SH key with a fixed price per call.

Indian Railways API questions

What Indian Railways data can I get?+

Live running status (/indian-rail/v1/live-status), a train's timetable (/indian-rail/v1/train), trains between two stations (/indian-rail/v1/trains), a station's live board (/indian-rail/v1/station) and station code search (/indian-rail/v1/stations).

How much does the Indian Railways API cost?+

Every Indian Railways endpoint costs 1 credit per call. On a monthly plan 1,000 credits cost $1 (Starter is $50/month for 50,000 credits). Pay-as-you-go is $2 per 1,000 credits, with top-ups from $15 that never expire.

Is there a free trial?+

Yes. Every account gets 1,000 free credits every month. That is 1,000 calls to /indian-rail/v1/live-status at 1 credit each.

Is there an official Indian Railways API?+

Search results indicate there is no open public API from Indian Railways or IRCTC for general use; access is through authorized partners. API.SH reads public pages only and needs no partner approval.

Do I need an IRCTC account or login?+

No. API.SH reads public Indian Railways pages only. No endpoint uses a login, cookies or anyone's account. IRCTC accounts and tickets are not involved.

Does it include PNR status, seat availability or booking?+

No. API.SH does not return PNR status or seat availability and cannot book tickets. It returns timetables, indicative fares, station boards and live running status.

Is there a free Indian Railways API?+

Every account gets 1,000 free credits every month, which is enough to try every route. After that, Every Indian Railways endpoint costs 1 credit per call. On a monthly plan 1,000 credits cost $1 (Starter is $50/month for 50,000 credits). Pay-as-you-go is $2 per 1,000 credits, with top-ups from $15 that never expire.

How do I get started?+

1. Sign up at api.sh. 2. Copy your API key from the dashboard. 3. Call /indian-rail/v1/stations with q set to a city name to find its code, then /indian-rail/v1/trains with from and to. Request examples and every parameter are in the docs at https://api.sh/docs. You can also use the JS or Python SDK, Google Sheets, Zapier, Make, n8n or the MCP server at https://api.sh/mcp.

More travel & events APIs all travel & events APIs →

Start with 1,000 free credits
Every month, on every account. One key works for all 482 platforms.
Get a free API key