us.trip.com APIus.trip.com ↗
Search one-way flights and retrieve a 90-day low-price calendar from Trip.com. Returns segments, stops, pricing, duration, and cabin class via 2 endpoints.
curl -X GET 'https://api.parse.bot/scraper/2e3b4b01-36ff-45b1-8d79-7f4684575e71/search_flights?arrive_city=ORD&depart_city=SFO&depart_date=2026-05-15' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for one-way flights between two cities. Returns flight details including segments, airlines, departure/arrival times, duration, stops, pricing, and cabin class.
| Param | Type | Description |
|---|---|---|
| adults | integer | Number of adult passengers |
| infants | integer | Number of infant passengers |
| children | integer | Number of child passengers |
| arrive_cityrequired | string | Arrival city IATA code (e.g., LAX, ORD, CDG) |
| cabin_class | string | Cabin class: economy, premium_economy, business, first |
| depart_cityrequired | string | Departure city IATA code (e.g., NYC, SFO, LHR) |
| depart_date | string | Departure date in YYYY-MM-DD format. Omitting defaults to 30 days from today. |
{
"type": "object",
"fields": {
"flights": "array of flight objects each containing segments, total_duration_minutes, stops, num_stops, cabin_class, price, is_direct",
"search_summary": "object containing departure_city, departure_code, arrival_city, arrival_code, depart_date, total_results, lowest_price, currency"
},
"sample": {
"data": {
"flights": [
{
"price": {
"fare": 129.6,
"currency": "USD",
"total_price": 207,
"product_name": "Economy",
"average_price": 207,
"taxes_and_fees": 76.6
},
"stops": "1 stop",
"segments": [
{
"aircraft": "Airbus A321neo",
"airline_code": "F9",
"arrival_city": "Atlanta",
"arrival_time": "2026-05-16 06:15:00",
"aircraft_type": "32Q",
"flight_number": "F91448",
"departure_city": "San Francisco",
"departure_time": "2026-05-15 22:15:00",
"arrival_airport": "ATL",
"arrival_terminal": "N",
"duration_minutes": 300,
"arrival_city_code": "ATL",
"departure_airport": "SFO",
"departure_terminal": "T1",
"departure_city_code": "SFO"
}
],
"is_direct": false,
"num_stops": 1,
"cabin_class": "Economy class",
"total_duration_minutes": 649
}
],
"search_summary": {
"currency": "USD",
"depart_date": "2026-05-15",
"arrival_city": "Chicago",
"arrival_code": "CHI",
"lowest_price": 207,
"total_results": 1,
"departure_city": "San Francisco",
"departure_code": "SFO"
}
},
"status": "success"
}
}About the us.trip.com API
The Trip.com Flights API exposes 2 endpoints for querying flight availability and price trends from us.trip.com. The search_flights endpoint returns full itinerary details — segments, stop counts, total duration, cabin class, and per-flight pricing — for one-way routes between any two IATA-coded airports. The get_low_prices endpoint returns a date-indexed price calendar spanning roughly 90 days, making it straightforward to identify the cheapest travel windows on a given route.
Flight Search
The search_flights endpoint accepts a required departure city (depart_city) and arrival city (arrive_city) as IATA codes, along with optional parameters for depart_date (YYYY-MM-DD), cabin_class (economy, premium_economy, business, or first), and passenger counts (adults, children, infants). When depart_date is omitted, the search defaults to 30 days from today. Each result in the flights array includes a segments breakdown, total_duration_minutes, num_stops, is_direct flag, cabin_class, price, and the currency in use. The search_summary object provides the resolved city names, IATA codes, date, total result count, and the lowest_price across all returned options.
Low-Price Calendar
The get_low_prices endpoint returns a price-by-date array for a route, centered around a reference date and spanning approximately 90 days. Each entry in the prices array contains a date, a numeric price, a formatted price_display string, and the currency. Top-level fields include lowest_price (the cheapest date found in the window) and total_dates (how many dates have price data). If depart_date is omitted, the calendar defaults to starting 7 days from today. This endpoint is well-suited for flexible-date travel planning or fare-monitoring workflows.
Coverage and Data Shape
Both endpoints work with IATA city or airport codes — examples like NYC, LAX, CDG, and LHR are accepted. Pricing is returned in the currency applicable to the Trip.com US locale (typically USD). The search_flights response includes segment-level detail, which allows reconstructing layover information and per-leg carrier data. Results reflect one-way itineraries only; round-trip queries are not currently supported through these endpoints.
- Build a flexible-date flight search tool that surfaces the cheapest travel days using
get_low_pricesdate-price arrays. - Monitor fare trends on a specific route over a 90-day window and alert users when prices drop below a threshold.
- Populate a flight comparison table with itinerary details — stops, duration, cabin class, and price — from
search_flights. - Filter search results to direct-only flights using the
is_directflag returned per flight object. - Identify the lowest available fare on a given departure date using
search_summary.lowest_pricewithout parsing every result. - Support multi-passenger booking flows by passing
adults,children, andinfantscounts to price itineraries accurately. - Aggregate price calendars across multiple routes to recommend the cheapest destination for a given travel window.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Trip.com have an official developer API?+
What does the `search_flights` endpoint return for connecting flights?+
segments array (covering individual legs), num_stops, total_duration_minutes, and an is_direct boolean. This lets you distinguish nonstop flights from connecting itineraries and reconstruct layover structure from the segment data.Does the low-price calendar cover round-trip or multi-city routes?+
get_low_prices endpoint covers one-way routes only, returning prices keyed by departure date for a single origin-destination pair. Round-trip and multi-city calendar data are not currently returned. You can fork this API on Parse and revise it to add a round-trip or multi-city pricing endpoint.Is hotel or car rental data available through this API?+
How current is the pricing data returned by these endpoints?+
get_low_prices periodically on a schedule will give the most up-to-date picture of price movements.