IRCTC Train Data Scraper avatar

IRCTC Train Data Scraper

Pricing

from $1.00 / 1,000 train services

Go to Apify Store
IRCTC Train Data Scraper

IRCTC Train Data Scraper

Search public IRCTC train services between two stations for a journey date, quota, and travel class. Get train schedules, station details, source-provided availability, and fare data in structured dataset rows for travel research and route tools.

Pricing

from $1.00 / 1,000 train services

Rating

0.0

(0)

Developer

Maxime Dupré

Maxime Dupré

Maintained by Community

Actor stats

0

Bookmarked

10

Total users

7

Monthly active users

14 days ago

Last modified

Features

Limited permissions

Share

🚆 Search Indian rail routes with IRCTC data

For travel planners, rail data teams, and developers, IRCTC searches public train services for one origin, destination, journey date, quota, and travel class. It returns train identity and type, station details, times, operating days, available classes, source-provided availability, and fare data in structured dataset rows for route research and travel tools.

  • Run a train search between two stations to list every public service on that route.
  • Do a seat availability check for one date, quota, and travel class before you plan a trip.
  • See the IRCTC train ticket price for a class, with the total fare and each fare component.
  • Compare departure times, arrival times, travel time, and distance for trains on the same route.
  • Check Tatkal or General quota train ticket availability for an upcoming journey date.

📊 Train service rows from public routes

Each dataset item is one train service returned for the submitted route, date, quota, and class. A row keeps the train, route, schedule, available classes, operating days, and source-provided station context. Availability and fare are optional because the source may not provide them for every service. You can also add the railway zone of the origin and destination stations.

▶️ Search one Indian rail route

This Actor handles one origin and destination, one journey date, one quota, and one travel class per run. It does not book tickets, take payments, reserve seats, cancel trips, or change an account.

  1. Enter the origin and destination by station name or official station code.
  2. Choose a journey date from today up to 60 days ahead, a quota code, and a travel class code.
  3. Turn on Include railway zones if you want the station zones.
  4. Run the Actor and open the results link in the Output tab or the default dataset.
  5. Review the fields that the source provides. Optional availability and fare fields stay absent when the source does not return them.

⚙️ Input

Use one route, date, quota, and travel class per run. Station names and official station codes are accepted for both endpoints.

Input fields

FieldTypeWhat it does
originstring (required)Sets the departure station by name or official station code.
destinationstring (required)Sets the arrival station by name or official station code.
journeyDatestring (required)Sets the journey date in YYYY-MM-DD format. Use a date from today up to 60 days ahead.
quotastring (required)Chooses a quota code. Common codes include GN, TQ, and PT; other source-supported codes may also work.
travelClassstring (required)Chooses a travel class code. Common codes include SL, 3A, 2A, and 1A; other source-supported codes may also work.
includeStationZonesbooleanAdds the railway zone code of the origin and destination stations to each train service. Default is false. A train service that gets zones has an extra charge.

Example input

This is the exact public input from a successful current-beta default-input run.

{
"origin": "NDLS",
"destination": "MMCT",
"journeyDate": "2026-12-31",
"quota": "GN",
"travelClass": "3A",
"includeStationZones": false
}

🧾 Output

Output fields

FieldTypeWhat it does
journeyDatestringGives the journey date used for the service result.
quotastringGives the source quota used for availability and fare details.
travelClassstringGives the source travel class used for availability and fare details.
trainobjectHolds the train identity and source-provided service details.
train.numberstringGives the train number returned by the source.
train.namestringGives the train name returned by the source.
train.typestring (optional)Gives the train type code returned by the source, such as RAJ or SHB.
train.availableClassesstring[] (optional)Lists travel classes available for the train when supplied by the source.
train.operatingDaysstring[] (optional)Lists days on which the train operates when supplied by the source.
routeobjectHolds the source-provided stations and schedule.
route.originobjectHolds the canonical origin station.
route.origin.namestringGives the origin station name.
route.origin.codestringGives the origin station code.
route.origin.citystring (optional)Gives the origin city when supplied by the source.
route.origin.statestring (optional)Gives the origin state or region when supplied by the source.
route.origin.zonestring (optional)Gives the origin railway zone code, such as NR, when includeStationZones is on and the zone is known.
route.destinationobjectHolds the canonical destination station.
route.destination.namestringGives the destination station name.
route.destination.codestringGives the destination station code.
route.destination.citystring (optional)Gives the destination city when supplied by the source.
route.destination.statestring (optional)Gives the destination state or region when supplied by the source.
route.destination.zonestring (optional)Gives the destination railway zone code, such as NR, when includeStationZones is on and the zone is known.
route.departureTimestringGives the departure time at the origin station.
route.arrivalTimestringGives the arrival time at the destination station.
route.durationMinutesinteger (optional)Gives the journey duration in minutes when available.
route.distanceKmnumber (optional)Gives the journey distance in kilometers when available.
availabilityobject (optional)Holds source-provided seat or berth availability for the selected service, class, quota, and date.
availability.statusstring (optional)Gives the availability text or status returned by the source.
availability.seatsinteger (optional)Gives the available seat count when the source provides it.
availability.berthsinteger (optional)Gives the available berth count when the source provides it.
fareobject (optional)Holds the source-provided total fare and fare components.
fare.totalnumberGives the total fare returned by the source.
fare.currencystring (optional)Gives the fare currency returned by the source.
fare.componentsobject[] (optional)Lists named fare components returned by the source.
fare.components[].namestringGives the fare component name.
fare.components[].amountnumberGives the fare component amount.

Example train service row

This complete row is from the successful current-beta default-input run.

{
"journeyDate": "2026-12-31",
"quota": "GN",
"travelClass": "3A",
"train": {
"number": "12952",
"name": "MMCT TEJAS RAJ",
"type": "RAJ",
"availableClasses": [
"1A",
"3A",
"2A"
],
"operatingDays": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
]
},
"route": {
"origin": {
"name": "NEW DELHI",
"code": "NDLS",
"city": "NEW DELHI",
"state": "DELHI"
},
"destination": {
"name": "MUMBAI CENTRAL",
"code": "MMCT",
"city": "MUMBAI",
"state": "MAHARASHTRA"
},
"departureTime": "16:55",
"arrivalTime": "08:35",
"durationMinutes": 940,
"distanceKm": 1383
},
"availability": {
"status": "AVAILABLE-0254",
"berths": 254
},
"fare": {
"total": 3165,
"currency": "INR",
"components": [
{
"name": "baseFare",
"amount": 1820
},
{
"name": "reservationCharge",
"amount": 40
},
{
"name": "superfastCharge",
"amount": 45
},
{
"name": "fuelAmount",
"amount": 0
},
{
"name": "tatkalFare",
"amount": 0
},
{
"name": "serviceTax",
"amount": 132
},
{
"name": "otherCharge",
"amount": 0
},
{
"name": "cateringCharge",
"amount": 400
},
{
"name": "dynamicFare",
"amount": 728
}
]
}
}

💳 Pricing

This Actor uses pay-per-event pricing. The Train service event costs $0.001 for each train service saved to the dataset. When includeStationZones is on, the Railway zone event costs $0.0005 for each saved train service that gets at least one station zone. No charge applies when no train service is saved.

🔌 Integrations

Read the dataset through the Apify API or export it from the run. Open the results link in the Output tab to reach the dataset.

❓ FAQ

Can I search more than one route in one run?

No. Each run uses one origin, one destination, one journey date, one quota, and one travel class. Start another run for another route or date.

Use a date from today up to 60 days ahead. IRCTC does not accept past dates or dates later than that.

What are railway zones, and do they cost extra?

A railway zone is the zone code of a station, such as NR. Turn on includeStationZones to add it for the origin and destination stations. Each train service that gets a zone has an extra Railway zone charge. When no zone is found, the row is saved without it and has no zone charge.

Can I use a station name instead of a station code?

Yes. Enter a station name or official station code for the origin and destination. The output keeps the canonical station name and code returned by the source.

What does the availability field mean?

It contains the source-provided availability status and, when supplied, a seat or berth count for the selected train, class, quota, and journey date.

Why might availability or fare be missing?

These fields are optional because the source may not provide them for every train service. Missing source values stay absent from the row.

Does this Actor book or cancel tickets?

No. It searches public train services and saves returned schedule, availability, and fare details. It does not book, reserve, pay for, cancel, or change a ticket or account.

Does it show PNR status or live train locations?

No. This Actor covers route schedules, source-provided availability, and fares. It does not provide PNR status, live train location tracking, or change alerts.

Can I read the data through the Apify API?

Yes. Open the dataset from the results link, export it, or read it through the Apify API.

No train-service row is saved for a run when the source returns no matching service.

📝 Changelog

v1.0 (03-11-2026)

  • Railway zones are now off by default. Before, each train service had a zone for its origin and destination stations when it was found. To keep getting it, set the new includeStationZones input to true. Each train service that gets zones has an extra charge.
  • Each train service now has a train.type field, such as Rajdhani or Superfast, when IRCTC gives it.
  • The example input now uses a future journey date.
  • Reliability improvements.

v0.0 (28-09-2026)

  • Initial release.

🆘 Support

For issues, questions, or feature requests, file a ticket and I'll fix or implement it in less than 24h 🫡

  • redBus Scraper compares public bus schedules, fares, and seat availability for road routes.
  • Flight Scraper compares public flight itineraries, prices, and times for trips that may continue by air.
  • Flightpoints & Roame Award Flights Scraper checks points-based flight itineraries, seats, cabins, and taxes for travel planning.
  • Ryanair Scraper checks public Ryanair fares, flight times, and airport details for a route.
  • EasyJet Scraper checks public easyJet fares, flight times, and airport details for a route.

Made with ❤️ by Maxime Dupré