Rail & travel

Trains & PNR API

Trains between any two stations, running status, route, fare breakdown — and live PNR status — from the railway data your travellers actually check.

/trainfree allowance included
api.apimitra.in /train
am@mitra ~ %$curl "https://api.apimitra.in/train?from=MMCT&to=NDLS"
{
"status": "ok",

"count": 12,

"trains": [
{
"train_number": "12951",

"train_name": "NDLS TEJAS RAJ",

"from": {
"name": "Mumbai Central",

"code": "MMCT"

},

"to": {
"name": "New Delhi",

"code": "NDLS"

},

"departure": "17.00",

"arrival": "08.32",

"duration": "15.32",

"days_runs": "1111111",

"classes": [ "1A", "2A", "3A" ],

"train_type": "RAJDHANI"

}

]

}

5

endpoints in the family

MMCT → NDLS

sample station pair

1A · 2A · 3A

classes + fares

CNF · RAC · WL

PNR berth states

About the API

What this endpoint does.

Train data is split across a dozen railway sources, each with its own format and quirks. This family of endpoints normalises it into the five calls developers ask for most: search trains between two stations, look up a train, read its full route, follow live running status, and check a PNR.

Queries are built around the station codes your users already know — MMCT to NDLS, not “Mumbai Central to New Delhi” — and every response carries arrival, departure, duration, classes and fare where available.

Who builds on this

Built for the teams shipping real products.

  1. 01

    Travel & ticketing

    Show live train options, seats and fares inside a booking flow without maintaining railway scrapers.

  2. 02

    IRCTC-adjacent apps

    Surface PNR status so travellers stop refreshing the IRCTC page themselves before their trip.

  3. 03

    Logistics (parcel)

    Verify train routes and running days before promising parcel or cargo timelines to a customer.

Under the hood

What you send. What comes back.

Request

Inputs you send

  • fromrequired

    source station code, e.g. MMCT.

  • torequired

    destination station code, e.g. NDLS.

  • dateoptional

    YYYYMMDD travel date. Omitted → today.

  • numberoptional

    train number — required for /train/info, /train/route and /train/live.

Response

JSON you get back

  • train_number

    e.g. 12951.

  • train_name

    e.g. NDLS TEJAS RAJ.

  • from / to

    { name, code } for both ends of the run.

  • departure / arrival

    times in HH.MM.

  • duration

    total journey time HH.MM.

  • classes

    array like ["1A","2A","3A"].

  • train_type

    RAJDHANI, MAIL, SHTABDI…

Try it

One call, real data.

Try it in the playground
/train?from=MMCT&to=NDLS
am@mitra ~ %$curl "https://api.apimitra.in/train?from=MMCT&to=NDLS"
{
"status": "ok",

"count": 12,

"trains": [
{
"train_number": "12951",

"train_name": "NDLS TEJAS RAJ",

"from": {
"name": "Mumbai Central",

"code": "MMCT"

},

"to": {
"name": "New Delhi",

"code": "NDLS"

},

"departure": "17.00",

"arrival": "08.32",

"duration": "15.32",

"days_runs": "1111111",

"classes": [ "1A", "2A", "3A" ],

"train_type": "RAJDHANI"

}

]

}

Passengers, current status and a 10-digit PNR are available at /train/pnr.

Free tier

Ship on this API free, then pay only when your calls outgrow it.

  • A free monthly request allowance on your first key — enough to build and test.
  • The same key works across every endpoint, so you can switch APIs as you grow.
  • When the free requests end, upgrade to paid — your code and endpoints don’t change.

Every endpoint includes a free monthly request allowance — the size differs from API to API. When your free requests run out, you move to a paid plan with the same key. No card needed to start.

Start with Trains & PNR, free.

Create an account and we’ll issue your free API key in minutes — this endpoint included.

© 2026 API Mitra. All rights reserved.

service statusMade in India