Discover/Trip API
live

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

Endpoint health
verified 4h ago
get_low_prices
search_flights
2/2 passing latest checkself-healing
Endpoints
2
Updated
22d ago

What is the Trip 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.

Try it
Number of adult passengers (1-9)
Number of infant passengers (0-9)
Number of child passengers (0-9)
Arrival city IATA code (e.g., LAX, ORD, CDG)
Cabin class for the flight search.
Departure city IATA code (e.g., NYC, SFO, LHR)
Departure date in YYYY-MM-DD format. Omitting defaults to 30 days from today.
api.parse.bot/scraper/2e3b4b01-36ff-45b1-8d79-7f4684575e71/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/2e3b4b01-36ff-45b1-8d79-7f4684575e71/search_flights?adults=1&infants=0&children=0&arrive_city=LAX&cabin_class=economy&depart_city=NYC&depart_date=2026-08-07' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace us-trip-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""
Trip.com Flight Search API — find flights and compare prices across dates.
Get your API key from: https://parse.bot/settings
"""
from parse_apis.trip.com_flight_search_api import TripFlights, CabinClass, FlightSearchFailed

client = TripFlights()

# Search for economy flights from NYC to LAX, capped at 5 results.
for flight in client.flights.search(depart_city="NYC", arrive_city="LAX", cabin_class=CabinClass.ECONOMY, limit=5):
    seg = flight.segments[0]
    print(f"{seg.airline_code}{seg.flight_number} | {flight.stops} | {flight.price.total_price} {flight.price.currency}")

# Drill into the first business-class flight on the same route.
biz_flight = client.flights.search(depart_city="NYC", arrive_city="LAX", cabin_class=CabinClass.BUSINESS, limit=1).first()
if biz_flight:
    print(f"Business: {biz_flight.total_duration_minutes}min, ${biz_flight.price.total_price}, direct={biz_flight.is_direct}")

# Find cheapest travel dates using the price calendar.
for dp in client.dateprices.list(depart_city="NYC", arrive_city="LAX", limit=5):
    print(f"{dp.date}: {dp.price_display}")

# Typed error handling around a search call.
try:
    result = client.flights.search(depart_city="SFO", arrive_city="CDG", limit=1).first()
    if result:
        print(f"SFO→CDG: {result.price.total_price} {result.price.currency}, {result.num_stops} stops")
except FlightSearchFailed as exc:
    print(f"Search blocked: {exc}")

print("exercised: flights.search / dateprices.list / CabinClass enum / FlightSearchFailed error")
All endpoints · 2 totalmissing one? ·

Search for one-way flights between two cities. Returns flight details including segments, airlines, departure/arrival times, duration, stops, pricing, and cabin class. All matching flights are returned in one response sorted by directness by default.

Input
ParamTypeDescription
adultsintegerNumber of adult passengers (1-9)
infantsintegerNumber of infant passengers (0-9)
childrenintegerNumber of child passengers (0-9)
arrive_cityrequiredstringArrival city IATA code (e.g., LAX, ORD, CDG)
cabin_classstringCabin class for the flight search.
depart_cityrequiredstringDeparture city IATA code (e.g., NYC, SFO, LHR)
depart_datestringDeparture date in YYYY-MM-DD format. Omitting defaults to 30 days from today.
Response
{
  "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"
  }
}

About the Trip API

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.

Reliability & maintenanceVerified

The Trip API is a managed, monitored endpoint for us.trip.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when us.trip.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official us.trip.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
4h ago
Latest check
2/2 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a flexible-date flight search tool that surfaces the cheapest travel days using get_low_prices date-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_direct flag returned per flight object.
  • Identify the lowest available fare on a given departure date using search_summary.lowest_price without parsing every result.
  • Support multi-passenger booking flows by passing adults, children, and infants counts to price itineraries accurately.
  • Aggregate price calendars across multiple routes to recommend the cheapest destination for a given travel window.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does Trip.com have an official developer API?+
Trip.com does not publish a public developer API for flight search or price data. Access to structured flight data from us.trip.com is available through this Parse API.
What does the `search_flights` endpoint return for connecting flights?+
Each flight object includes a 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?+
The 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?+
Not currently. The API covers flight search results and a flight low-price calendar only. Trip.com also lists hotels, car rentals, and attraction tickets on its platform, but those are not exposed here. You can fork this API on Parse and revise it to add endpoints for hotel or other travel product data.
How current is the pricing data returned by these endpoints?+
Prices reflect availability at the time of the request. Airline fares change frequently, so results should be treated as point-in-time snapshots rather than guaranteed fares. For fare monitoring, calling get_low_prices periodically on a schedule will give the most up-to-date picture of price movements.
Page content last updated . Spec covers 2 endpoints from us.trip.com.
Related APIs in TravelSee all →
skyscanner.com API
Search for flights and compare prices across multiple booking agents, while exploring airports and cities to plan your trip. View daily and monthly price calendars to find the best deals for your travel dates.
skyscanner.co.in API
Search for flights worldwide and compare prices with autocomplete suggestions for airports and destinations. View price calendars to find the cheapest travel dates and explore real-time flight availability and pricing.
skiplagged.com API
Search for flights across airlines including hidden-city ticketing options, and look up airport information by name or code to find the best travel deals. Access Skiplagged's flight inventory and routing data to discover cheaper itineraries and alternative airport combinations.
kayak.com.hk API
Search for flights and compare prices across airlines and routes, including flexible-date searches across multiple origin airports. View monthly price calendars to find the cheapest travel dates and get real-time fare information for any route.
makemytrip.com API
Search for airports and compare the cheapest flight fares between any two cities across multiple dates with MakeMyTrip's fare calendar to find your best deal. Quickly identify the most affordable travel options and plan your trip with real-time pricing information.
aircanada.com API
Search for Air Canada flights between any two airports and compare pricing across all fare families, from Basic to Business class, along with complete schedule and segment details. Find the perfect flight option with transparent pricing and full flight information to make your booking decision.
flightconnections.com API
Search for flights with detailed information about pricing, schedules, and layover options to find the best travel connections for your trips. Compare multiple flight choices and their costs in one convenient search.
wizzair.com API
Search for Wizz Air flights and compare prices across dates with interactive price calendars, while discovering available routes and airports to plan your budget travel. Find the best fares for your desired destination and access complete flight timetables for any route.