↑ ↓ to move ↵ to open
Trip.com Travel API · Endpoint

Trip.com Travel Train Search API

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

  • 1 credit per call
  • Failed calls are free
  • Updated
  • tripcom.train.search
Response completed
{  "arrival_station_id": "GB0278",  "departure_station_id": "GB1594",  "end_page": 1,  "has_more": false,  "query": "London-Birmingham",  "query_date": "2026-11-10",  "returned": 1,  "source_url": "https://www.trip.com/trains/uk/route/london-to-birmingham/",  "start_page": 1,  "total_trains": 1,  "trains": [    {      "price": 31.56,      "arrival_station": "Birmingham",      "arrival_time": "08:44",      "currency": "USD",      "departure_date": "2026-11-10",      "departure_station": "London",      "departure_time": "06:43",      "duration": "2h 1m",      "record_type": "lowest_fare",      "train_number": "C17953-Y80791",      "transfers": 1    }  ]}
Try it live, free
Input

What you send

The input object of the request, with every field the endpoint accepts.

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; tried first when resolving the route page uk
departure_date string no Travel date in YYYY-MM-DD; defaults to the source page's current day 2026-11-10
max_results integer no Maximum number of results to return. At least 0. Default: 0. 10
Response

Fields it returns

What each record in the response holds, with the values from the sample above.

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-11-10
returned integer 1
source_url string https://www.trip.com/trains/uk/route/london-to-birmingham/
start_page integer 1
total_trains integer 1
trains array 1 records
trains[].arrival_station string Birmingham
trains[].arrival_time string 08:44
trains[].currency string USD
trains[].departure_date string 2026-11-10
trains[].departure_station string London
trains[].departure_time string 06:43
trains[].duration string 2h 1m
trains[].price number 31.56
trains[].record_type string lowest_fare
trains[].train_number string C17953-Y80791
trains[].transfers integer 1
REST API · MCP server

Call it from your code, or ask your agent

Set UPSCRAPE_API_KEY to your key and copy a working request.

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",    "departure_date": "2026-11-10",    "destination": "Birmingham",    "max_results": 10,    "origin": "London"  }}'
In your AI agent Claude · Cursor · any MCP client
1Add the Upscrape MCP server
https://data.upscrape.com/mcp
2Ask for the data in plain words

With Upscrape, get the Trip.com Travel train search for country "uk", departure date "2026-11-10" and destination "Birmingham". Tell me what it costs before you run it, then show the results as a table.

The agent finds the endpoint, shows you the price, and runs it with your credits.
Trip.com Travel

More from the Trip.com Travel API

Same data, other platforms

The same data from other platforms

Questions

Trip.com Travel 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 Travel 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.

Get started

Your first Trip.com Travel call is free.

Up to 100 free credits to start, no card needed.