↑ ↓ to move ↵ to open

Trip.com Train Search API

Find trains between two cities on Trip.com with stations, times, duration, operator and train number.

Train search
{  "arrival_station_id": "GB0278",  "departure_station_id": "GB1594",  "end_page": 1,  "has_more": false,  "query": "London-Birmingham",  "query_date": "2026-10-22",  "returned": 3,  "source_url": "https://www.trip.com/trains/uk/route/london-to-birmingham/",  "start_page": 1,  "total_trains": 14,  "trains": [    {      "arrival_station": "Birmingham Moor Street",      "arrival_time": "00:55",      "departure_date": "2026-10-22",      "departure_station": "London Marylebone",      "departure_time": "23:07",      "duration": "1h 48m",      "operator": "Chiltern Railways",      "record_type": "journey",      "train_number": "L37398"    },    {      "arrival_station": "Birmingham New Street",      "arrival_time": "01:41",      "departure_date": "2026-10-22",      "departure_station": "London Euston",      "departure_time": "23:09",      "duration": "2h 32m",      "operator": "Avanti West Coast / LNR & WMR",      "record_type": "journey",      "train_number": "W33871-W70594",      "transfers": 1    }  ]}
Try it live, free

What you send, what comes back

The input object it accepts, and every field of a record, with the values from the response above.

Input5 fields
FieldTypeRequiredWhat it doesExample
destination string yes Arrival city or station name, for example Birmingham Birmingham
origin string yes Departure city or station name, for example London London
country string no Departure-country route segment, for example uk, france or japan; tried first when resolving the route page. uk
departure_date string no Travel date in YYYY-MM-DD. The route page publishes lowest fares for tomorrow through today+7; a date outside that window is rejected with the covered range. Omit it for the page's current-day timetable.
max_results integer no Maximum number of results to return. At least 0. Default: 0. 3
Fields it returns20 fields
FieldTypeExample
arrival_station_id string GB0278
departure_station_id string GB1594
end_page integer 1
has_more boolean false
query string London-Birmingham
query_date string 2026-10-22
returned integer 3
source_url string https://www.trip.com/trains/uk/route/london-to-birmingham/
start_page integer 1
total_trains integer 14
trains array 3 records
trains[].arrival_station string Birmingham Moor Street
trains[].arrival_time string 00:55
trains[].departure_date string 2026-10-22
trains[].departure_station string London Marylebone
trains[].departure_time string 23:07
trains[].duration string 1h 48m
trains[].operator string Chiltern Railways
trains[].record_type string journey
trains[].train_number string L37398

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": "tripcom.train.search",  "input": {    "country": "uk",    "destination": "Birmingham",    "max_results": 3,    "origin": "London"  }}'
Response
{  "arrival_station_id": "GB0278",  "departure_station_id": "GB1594",  "end_page": 1,  "has_more": false,  "query": "London-Birmingham",  "query_date": "2026-10-22",  "returned": 3,  "source_url": "https://www.trip.com/trains/uk/route/london-to-birmingham/",  "start_page": 1,  "total_trains": 14,  "trains": [    {      "arrival_station": "Birmingham Moor Street",      "arrival_time": "00:55",      "departure_date": "2026-10-22",      "departure_station": "London Marylebone",      "departure_time": "23:07",      "duration": "1h 48m",      "operator": "Chiltern Railways",      "record_type": "journey",      "train_number": "L37398"    },    {      "arrival_station": "Birmingham New Street",      "arrival_time": "01:41",      "departure_date": "2026-10-22",      "departure_station": "London Euston",      "departure_time": "23:09",      "duration": "2h 32m",      "operator": "Avanti West Coast / LNR & WMR",      "record_type": "journey",      "train_number": "W33871-W70594",      "transfers": 1    }  ]}

Use it from your AI agent instead

More Trip.com endpoints

The same API key runs every one of them.

The same data from other platforms

Trip.com Train Search API FAQ

The short answers. The docs have the long ones.

Still have a question? Talk to the people who build the endpoints.
How much does the Trip.com Train 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 origin and destination. The input fields below list every option with its type and limits.

Do I need a Trip.com Travel login?

No. It reads public Trip.com Travel data; nothing runs on your account.

Can my AI agent call it?

Yes, over MCP: the agent finds tripcom.train.search, checks its price and runs it with the same credits as the REST API.