MakeMyTrip Trains Search API
Find trains between two stations for a travel date.
{ "collected_at": "2026-10-15T09:07:00Z", "collection_complete": false, "excluded_nearby_trips": 0, "origin": "NDLS", "source_total_trips": 2, "source_url": "https://www.makemytrip.com/railways/listing?date=20261110&destStn=CNB&srcStn=NDLS", "total_trips": 2, "trips": [ { "arrival": "2026-11-11T06:20:00+05:30", "booking_allowed": true, "departure": "2026-11-10T23:55:00+05:30", "destination_station": "CNB", "destination_station_name": "Kanpur Central", "duration_minutes": 385, "origin_station": "NDLS", "origin_station_name": "New Delhi", "record_type": "availability_snapshot", "train_name": "Shram Shkti Exp", "train_number": "12452", "trip_id": "12452", "classes": [ { "price": 795, "date": "2026-11-10", "availability_type": "1", "class": "3A", "currency": "INR", "display_status": "Available 11", "last_updated": "Updated 6 hrs ago", "last_updated_unix_ms": 1792031660000, "price_basis": "listed_class_fare", "quota": "GN", "status": "AVAILABLE-0011" }, { "price": 1100, "date": "2026-11-10", "availability_type": "2", "class": "2A", "currency": "INR", "display_status": "RAC 2", "last_updated": "Updated 6 hrs ago", "last_updated_unix_ms": 1792031660000, "price_basis": "listed_class_fare", "quota": "GN", "status": "RAC 2/RAC 2" } ] }, { "arrival": "2026-11-10T20:50:00+05:30", "booking_allowed": true, "departure": "2026-11-10T15:40:00+05:30", "destination_station": "CNB", "destination_station_name": "Kanpur Central", "duration_minutes": 310, "origin_station": "NDLS", "origin_station_name": "New Delhi", "record_type": "availability_snapshot", "train_name": "Ndls Cnb Sht", "train_number": "12034", "trip_id": "12034", "classes": [ { "price": 1265, "date": "2026-11-10", "availability_type": "1", "class": "CC", "currency": "INR", "display_status": "Available 884", "last_updated": "Updated few mins ago", "last_updated_unix_ms": 1792054774000, "price_basis": "listed_class_fare", "quota": "GN", "status": "AVAILABLE-0884" }, { "price": 1925, "date": "2026-11-10", "availability_type": "1", "class": "EC", "currency": "INR", "display_status": "Available 32", "last_updated": "Updated 2 hrs ago", "last_updated_unix_ms": 1792046624000, "price_basis": "listed_class_fare", "quota": "GN", "status": "AVAILABLE-0032" } ] } ]}
What you send, what comes back
The input object it accepts, and every field of a record, with the values from the response above.
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
| date | string | yes | Travel date in YYYY-MM-DD | 2026-11-10 |
| destination | string | yes | Exact Indian railway station code; city-name resolution and nearby-station expansion are not supported. | CNB |
| source | string | yes | Exact Indian railway station code; city-name resolution and nearby-station expansion are not supported. | NDLS |
| max_results | integer | no | Local retrieval bound; this does not request source pagination. At least 1. | 5 |
| mode | string | no | Optional train mode. Allowed values: train. |
train |
| Field | Type | Example |
|---|---|---|
| collected_at | string | 2026-10-15T09:07:00Z |
| collection_complete | boolean | false |
| excluded_nearby_trips | integer | 0 |
| origin | string | NDLS |
| source_total_trips | integer | 2 |
| source_url | string | https://www.makemytrip.com/railways/listing?date=20261110&destS… |
| total_trips | integer | 2 |
| trips | array | 2 records |
| trips[].arrival | string | 2026-11-11T06:20:00+05:30 |
| trips[].booking_allowed | boolean | true |
| trips[].classes | array | 3 records |
| trips[].classes[].availability_type | string | 1 |
| trips[].classes[].class | string | 3A |
| trips[].classes[].currency | string | INR |
| trips[].classes[].date | string | 2026-11-10 |
| trips[].classes[].display_status | string | Available 11 |
| trips[].classes[].last_updated | string | Updated 6 hrs ago |
| trips[].classes[].last_updated_unix_ms | integer | 1,792,031,660,000 |
| trips[].classes[].price | integer | 795 |
| trips[].classes[].price_basis | string | listed_class_fare |
| trips[].classes[].quota | string | GN |
| trips[].classes[].status | string | AVAILABLE-0011 |
| trips[].departure | string | 2026-11-10T23:55:00+05:30 |
| trips[].destination_station | string | CNB |
| trips[].destination_station_name | string | Kanpur Central |
| trips[].duration_minutes | integer | 385 |
| trips[].origin_station | string | NDLS |
| trips[].origin_station_name | string | New Delhi |
| trips[].record_type | string | availability_snapshot |
| trips[].train_name | string | Shram Shkti Exp |
| trips[].train_number | string | 12452 |
| trips[].trip_id | string | 12452 |
Call it from your code
Set UPSCRAPE_API_KEY to your key and copy a working request. No SDK needed.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "mmt.trains.search", "input": { "date": "2026-11-10", "destination": "CNB", "max_results": 5, "mode": "train", "source": "NDLS" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "mmt.trains.search", "input": { "date": "2026-11-10", "destination": "CNB", "max_results": 5, "mode": "train", "source": "NDLS" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "mmt.trains.search", "input": { "date": "2026-11-10", "destination": "CNB", "max_results": 5, "mode": "train", "source": "NDLS" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
{ "collected_at": "2026-10-15T09:07:00Z", "collection_complete": false, "excluded_nearby_trips": 0, "origin": "NDLS", "source_total_trips": 2, "source_url": "https://www.makemytrip.com/railways/listing?date=20261110&destStn=CNB&srcStn=NDLS", "total_trips": 2, "trips": [ { "arrival": "2026-11-11T06:20:00+05:30", "booking_allowed": true, "departure": "2026-11-10T23:55:00+05:30", "destination_station": "CNB", "destination_station_name": "Kanpur Central", "duration_minutes": 385, "origin_station": "NDLS", "origin_station_name": "New Delhi", "record_type": "availability_snapshot", "train_name": "Shram Shkti Exp", "train_number": "12452", "trip_id": "12452", "classes": [ { "price": 795, "date": "2026-11-10", "availability_type": "1", "class": "3A", "currency": "INR", "display_status": "Available 11", "last_updated": "Updated 6 hrs ago", "last_updated_unix_ms": 1792031660000, "price_basis": "listed_class_fare", "quota": "GN", "status": "AVAILABLE-0011" }, { "price": 1100, "date": "2026-11-10", "availability_type": "2", "class": "2A", "currency": "INR", "display_status": "RAC 2", "last_updated": "Updated 6 hrs ago", "last_updated_unix_ms": 1792031660000, "price_basis": "listed_class_fare", "quota": "GN", "status": "RAC 2/RAC 2" } ] }, { "arrival": "2026-11-10T20:50:00+05:30", "booking_allowed": true, "departure": "2026-11-10T15:40:00+05:30", "destination_station": "CNB", "destination_station_name": "Kanpur Central", "duration_minutes": 310, "origin_station": "NDLS", "origin_station_name": "New Delhi", "record_type": "availability_snapshot", "train_name": "Ndls Cnb Sht", "train_number": "12034", "trip_id": "12034", "classes": [ { "price": 1265, "date": "2026-11-10", "availability_type": "1", "class": "CC", "currency": "INR", "display_status": "Available 884", "last_updated": "Updated few mins ago", "last_updated_unix_ms": 1792054774000, "price_basis": "listed_class_fare", "quota": "GN", "status": "AVAILABLE-0884" }, { "price": 1925, "date": "2026-11-10", "availability_type": "1", "class": "EC", "currency": "INR", "display_status": "Available 32", "last_updated": "Updated 2 hrs ago", "last_updated_unix_ms": 1792046624000, "price_basis": "listed_class_fare", "quota": "GN", "status": "AVAILABLE-0032" } ] } ]}
More MakeMyTrip endpoints
The same API key runs every one of them.
The same data from other platforms
MakeMyTrip Trains Search API FAQ
The short answers. The docs have the long ones.
How much does the MakeMyTrip Trains Search API cost?
1 credit per successful call, shown before it runs. You buy credits once, and paid credits never expire.
What do I send?
Send source, destination and date. The input fields below list every option with its type and limits.
Do I need a MakeMyTrip login?
No. It reads public MakeMyTrip data; nothing runs on your account.
Can my AI agent call it?
Yes, over MCP: the agent finds mmt.trains.search, checks its price and runs it with the same credits as the REST API.