Trip.com Flight Search API Documentation Search flights between two airports or cities, one-way or round trip. Each itinerary has the price with taxes and currency, the cabin, seats left, stops, total duration in minutes, carriers and the segments with flight number, airline, aircraft, airports, terminals and local times in ISO 8601. Itineraries are sorted by price, up to 50. Add return_date for a round trip: the answer lists the outbound options (leg: outbound) and the price of each is the price of the whole round trip. Every round-trip option has a policy_id. Send it again with the same search to get the return legs of that option (leg: return). Cost: 1 credit for a one-way search. 3 credits for each successful round-trip call. Failed calls cost 0.
Run this endpoint
Endpoint
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
Runnable path
3 required parameters needed before sending a request.
5 optional filters available.
string
Required
Departure IATA airport or city code, uppercase. Example: LON.
example
string
Required
Arrival IATA airport or city code, uppercase. Example: NYC.
example
string
Required
Departure date, YYYY-MM-DD, today or later. Example: 2027-03-14.
2026-06-15
string
Optional
Return date for a round trip, YYYY-MM-DD, on or after date. Example: 2027-03-21. Without it the search is one way.
2026-06-15
string
Optional
policy_id of one outbound option from a round-trip answer. Returns the return legs of that option. Needs return_date.
1234567890
integer
Optional
Number of adults, 1 to 9. Defaults to 1.
10
string
Optional
economy (default), premium_economy or business.
example
string
Optional
Price currency: USD, EUR, GBP, JPY or KRW. Defaults to USD. Every price in the answer has this currency.
USD
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"data": {
"to": "NYC",
"date": "2027-03-14",
"from": "LON",
"total": 2,
"adults": 1,
"currency": "USD",
"cabin_class": "economy",
"itineraries": [
{
"cabin": "Economy class",
"price": 406,
"stops": 1,
"taxes": 371.8,
"carriers": [
"TAP Air Portugal"
],
"currency": "USD",
"segments": [
{
"airline": "TAP Air Portugal",
"arrival": {
"city": "Lisbon",
"time": "2026-12-15T11:05:00",
"airport": "Humberto Delgado Airport",
"terminal": "T1",
"airport_code": "LIS"
},
"aircraft": "Airbus A320-212",
"departure": {
"city": "London",
"time": "2026-12-15T08:15:00",
"airport": "Heathrow Airport",
"terminal": "T2",
"airport_code": "LHR"
},
"airline_code": "TP",
"flight_number": "TP1351",
"duration_minutes": 170
},
{
"airline": "TAP Air Portugal",
"arrival": {
"city": "New York",
"time": "2026-12-15T22:15:00",
"airport": "Newark Liberty International Airport",
"terminal": "B",
"airport_code": "EWR"
},
"aircraft": "Airbus A321neo",
"departure": {
"city": "Lisbon",
"time": "2026-12-15T18:40:00",
"airport": "Humberto Delgado Airport",
"terminal": "T1",
"airport_code": "LIS"
},
"airline_code": "TP",
"flight_number": "TP203",
"duration_minutes": 515
}
],
"seats_left": 9,
"arrival_time": "2026-12-15T22:15:00",
"departure_time": "2026-12-15T08:15:00",
"arrival_airport": "EWR",
"duration_minutes": 1140,
"departure_airport": "LHR"
}
]
},
"meta": {
"billable": true,
"endpoint_family": "flight_search"
},
"success": true
}
Errors
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
A query parameter is missing or invalid. This response is not billable.
{
"errors": {
"from": [
"A departure airport or city code is required, e.g. LON."
]
},
"message": "The request validation failed"
}Resource Not Found
The id is unknown. This response is not billable.
{
"meta": {
"billable": false,
"retryable": false,
"endpoint_family": "trip_com"
},
"error": {
"code": "NOT_FOUND",
"message": "The requested Trip.com resource was not found."
},
"success": false
}Unexpected Upstream Answer
Trip.com answered with a page or payload Scrappa cannot read. This response is not billable. Retry later.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "trip_com"
},
"error": {
"code": "PARSER_DRIFT",
"message": "The Trip.com API is temporarily unavailable. Please retry."
},
"success": false
}Upstream Unavailable
Trip.com did not answer after one retry. This response is not billable. Retry later.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "trip_com"
},
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The Trip.com API is temporarily unavailable. Please retry."
},
"success": false
}Generate Code with AI
Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.
Try It Live
Test this endpoint in our interactive playground with real data.