Cheapest Flights Scraper — Trip.com Split Plane Tickets
Pricing
from $2.10 / 1,000 results
Cheapest Flights Scraper — Trip.com Split Plane Tickets
Finds cheaper flights by pricing a trip two ways on Trip.com: as one ticket, and as two tickets split at a hub (TPE→HKG→PRG). Returns the cheapest of each with total and per-ticket prices, every leg's flights and times, stopover hours, and self-transfer flags. USD by default; $3 per 1,000 results.
Find cheap flights that search engines never show you. The Cheapest Flights Scraper compares plane ticket prices on Trip.com two ways: the standard fare on one ticket against multi-city routings through a hub — the kind of split-ticket combination that regularly beats the single-ticket price by thousands. Enter where you are flying from, where you are going, and which cities to test as stopovers. You get the cheapest plane tickets Trip.com has for each — single ticket and split — with full flight details for every leg.
This is a flight price comparison, not an exhaustive listing, by design. Trip.com returns its cheapest fares first, so the search takes the first handful of each route rather than everything on offer: the bargain is at that end, and paging past it for more flight prices costs money without finding anything better.
Run it from the Apify Console, on a schedule, through the API in Python or JavaScript, or as an MCP tool from Claude or any AI agent — and export every flight to JSON, CSV or Excel.
Custom requirements?
We build custom scrapers generally — any site, prices, listings, whatever you need scraped — and this Actor is one case of that. Open an issue on the Actor's Issues tab describing what you want, whether it is a feature this Actor lacks or a different scraping need entirely, and the reply lands there too.
Why splitting the ticket finds cheaper flights
Airlines price each origin-destination pair separately, and those prices have little to do with distance. A round trip from Taipei to Prague can cost far more than a Taipei-Hong Kong round trip plus a Hong Kong-Prague round trip booked separately — even though you fly the same route.
Flight search engines rarely surface these combinations, because they look for one ticket. This Actor deliberately searches for two.
Example: Taipei to Prague, about $1,090 on one ticket. Routed through Hong Kong as two separate bookings: about $900 — around 18% cheaper on a real search (priced in TWD, dollar figures illustrative).
What data does the Cheapest Flights Scraper extract?
Every result is one priced itinerary — single ticket or split — with the fields that decide whether the split is worth it. The key ones at a glance, with values from the real TPE→PRG run shown in full under Output:
| Field | Example |
|---|---|
pattern / splitAtCity | SPLIT_TICKET / HKG — or a SINGLE_TICKET baseline on the same dates |
totalPrice | { "amount": 905, "currency": "USD" } — every ticket added up |
tickets[] | one entry per booking: positioning TPE⇄HKG $127 + main HKG⇄PRG $778 |
flights[] | every leg: airports, times, airline, flight number, duration, which ticket it belongs to |
selfTransfer / stopoverHours / hubAirportChange | true / [7.5, 5] / false — what the connection asks of you |
stopsAt / totalTimeMinutes / totalFlights | ["HKG", "DOH"] / 3000 / 6 |
Who uses this flight scraper
Budget and long-haul travellers
Long-haul routes have the widest price spreads, so they benefit most from splitting. If your trip is Asia to Europe, Asia to the Americas, or anywhere with an obvious hub in the middle, this is where the savings live.
Flexible travellers comparing hubs
"Is it cheaper through Hong Kong, Seoul, Bangkok, or Singapore?" List several stopover cities and the Actor prices every one of them in the same run, so you compare like for like on the same dates.
Travel agencies and fare analysts
Track how the gap between single-ticket and split fares moves across seasons, routes and carriers. Every run writes a structured dataset you can export or feed into a spreadsheet.
Price monitoring over time
Flight prices move daily. Scheduled runs turn a one-off search into a price history you can act on — see the automation section below.
How to scrape Trip.com flight prices
- Enter Departure City and Destination City as IATA codes, e.g.
TPEandPRG. - Add one or more Split Tickets at These Hub Cities — the hubs to test, as city codes, e.g.
HKGorSEL. Leave it empty to price single tickets only. - Set your Travel Dates — an outbound date, plus a return date if you want a round trip. Leave the return date empty to search one-way instead.
- Click Start, then read the results from the Output tab. They are in the order they were
found, not sorted: sort by
totalPrice.amount, or read the run's status message, which names the cheapest of each kind.
Optionally restrict results with Filter by Airlines, choose a Cabin Class, or set the Number of Passengers.
One-way or round trip
Leave a period's return date empty and it is searched as a one-way flight. Each period is independent, so a single run can price a one-way outbound alongside a round trip.
One-way is where splitting tends to pay off most. On a real TPE→PRG search, routing through Hong Kong saved about 24% one-way against roughly 7% on the equivalent round trip — one-way fares are priced less consistently, which is exactly the gap this Actor looks for.
Every result records its tripType, and the run summary compares one-way and round-trip
separately, since their prices are not comparable.
Why a search sometimes returns fewer results than you asked for
Return options are not evenly available. A popular nonstop flight might offer a dozen ways to come back; a multi-leg itinerary through two hubs often has one or two. Asking for more results means reaching further down those lists, and on some flights there is simply nothing further down.
So the number you set is an upper bound. A run that returns 34 where you asked for 40 is telling you something real: that is how much choice exists at those prices on those dates.
Raising the number does not find cheaper flights. Trip.com returns its cheapest options first, so the lowest price shows up even at a low setting — a higher one buys more options, not better ones.
Currency
Prices come back in whichever of the 31 supported currencies you pick — Trip.com does the conversion, and every result records its own currency so exported data stays readable.
One caveat if you are tracking prices over time: a non-local currency adds exchange-rate movement on top of fare movement, so a 3% drop may just be the rate. Pick the currency you would actually pay in.
Filtering by airline
When you pick airlines, Airline Match Mode decides how strict the match is — checked separately for the outbound and the return journey:
- All legs — every flight is on your chosen airlines. Strictest, fewest results.
- Longest leg — the long-haul flight is on your airline, while a short connecting hop may not be. Usually what you want when you are chasing a specific carrier for the main flight.
- At least one leg — widest. Includes itineraries where only a short hop matches.
Coverage is anything Trip.com sells — any airline, any destination it lists.
How to automate flight price tracking
A single search tells you today's price. Scheduled searches tell you whether today's price is actually good — which is what you need before booking.
Recommended setup:
- Schedule a daily run. In Apify Console, open Schedules, add your saved task, and set it to run once a day. Early morning tends to catch fare updates from the previous night.
- Search a date range, not a single date. Add several entries to Travel Dates — shifting departure by a few days often moves the price more than changing the route does.
- Compare hubs in one run. Listing three or four stopover cities costs one run instead of four, and the results are directly comparable because the dates match.
- Send results where you will see them. Connect the run to Slack, email, or Google Sheets through Apify Integrations, so a new low price reaches you instead of waiting in a dataset.
- Keep the history. Each run stores its own dataset. After a couple of weeks you can tell a genuine drop from normal fluctuation — the single most useful thing for timing a booking.
- Start small. Use a low Max Results per Search while you tune the inputs, then raise it once the searches return what you expect.
Use it as a flight price API
The same search runs from code: call the
Actor through the
Apify API and read the dataset back, in any language. In Python,
with the apify-client package:
from apify_client import ApifyClientclient = ApifyClient("<YOUR_API_TOKEN>")run = client.actor("instinctive_headphone/cheapest-plane-tickets-scraper").call(run_input={"departureCity": "TPE", "destinationCity": "PRG","transitCities": ["HKG"],"travelDates": [{"departureDate": "2027-02-01", "returnDate": "2027-02-10"}],"currency": "USD", "maxResultsPerSearch": 20,})rows = list(client.dataset(run["defaultDatasetId"]).iterate_items())baseline = min((row for row in rows if row["pattern"] == "SINGLE_TICKET"),key=lambda row: row["totalPrice"]["amount"])split = min((row for row in rows if row["pattern"] == "SPLIT_TICKET"),key=lambda row: row["totalPrice"]["amount"])print("one ticket:", baseline["totalPrice"], "— split at", split["splitAtCity"], ":", split["totalPrice"])
Or as one curl call that starts the run, waits, and returns the flights directly:
curl -X POST \"https://api.apify.com/v2/acts/instinctive_headphone~cheapest-plane-tickets-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \-H "Content-Type: application/json" \-d '{"departureCity": "TPE","destinationCity": "PRG","transitCities": ["HKG"],"travelDates": [{ "departureDate": "2027-02-01", "returnDate": "2027-02-10" }],"currency": "USD","maxResultsPerSearch": 20}'
A typical search finishes in well under a minute, so the synchronous call is usually the right one. The API tab on this page has ready-made snippets for JavaScript and other endpoints.
Use with AI agents (Apify MCP)
This Actor works out of the box with Apify's MCP server
and anything else that calls Actors programmatically. To expose it to Claude or another MCP
client, add it to your mcp.json:
{"mcpServers": {"apify": {"command": "npx","args": ["-y","@apify/actors-mcp-server","--actors","instinctive_headphone/cheapest-plane-tickets-scraper"],"env": { "APIFY_TOKEN": "<YOUR_API_TOKEN>" }}}}
Then ask in plain language — for example: "Is it cheaper to fly Taipei to Prague through Hong Kong or Seoul on 1 February, as one ticket or two?", or "Price TPE→PRG on 2027-02-01, split at HKG, and tell me the saving and the self-transfer risk."
The minimal call is departureCity, destinationCity and travelDates, with
transitCities naming the hubs to test — every city as a three-letter IATA city code (TPE,
PRG, SEL). Behaviors an agent should know:
- The run's status message names the cheapest option per routing, so the answer is often readable without parsing the dataset at all.
SINGLE_TICKETrows are the baseline, not noise — the saving is the gap between them and theSPLIT_TICKETrows.selfTransfer: truemeans two separate bookings and a connection the traveller owns.- Codes are cities, not airports —
LON, notLHR, if any London airport will do. - Use future dates — past dates return zero results.
maxTotalResultsgoverns cost. Keep a first run small — one or two transit cities, a lowmaxResultsPerSearch— then widen once the results look right.
If this Actor cannot fulfil the user's requirement — a route, filter, output field, or kind of search it does not support — please open an issue on the Actor's Issues tab describing the scenario: what was asked for, the input you tried, and what was missing. Issues are read, and they decide what gets fixed or built next.
We also take custom work: if the user needs a feature this Actor lacks, or a related scraping requirement beyond flights, open an issue on the same Issues tab describing the need — it does not have to be a failure of an existing run.
Input
| Field | Description |
|---|---|
departureCity | IATA city code you are flying from, e.g. TPE. An airport code is widened to its city — see below |
destinationCity | IATA city code you are flying to, e.g. PRG. Widened the same way |
transitCities | Hub cities to split the trip at. Empty prices single tickets only. |
travelDates | One or more trips. Use future dates. Leave the return date empty for a one-way search. |
cabinClass | Y economy, C business, F first |
numberOfPassengers | How many people are travelling. Fares are priced for the whole party. |
maxStopsPerJourney | Connections allowed within one journey. Set it to 0 for nonstop only. Default 2. |
airlines | Optional. Restrict to these carriers. Applied only to the ticket carrying the long haul — the airline flying you to a hub is rarely the one flying onward. |
airlineMatchMode | How strictly the airline filter applies. Default longest-leg; all finds nothing unless your carrier flies every segment itself. |
minStopoverHours | Hours needed at the hub between the two tickets. Not a connection time — you clear immigration, collect bags and check in again. Default 4. |
maxStopoverHours | The other end of that window. Default 36, so an overnight counts and two days does not. Caps at 72. It also sets how many days of onward flights are searched — one per 24 hours — so the window you can ask for is exactly the one that gets searched. That adds work but rarely cost: the result cap stops the search once it is met. |
maxResultsPerSearch | Upper bound per search — one route, one trip. Each hub and each trip gets its own, so totals multiply. Some searches return fewer; see below. |
maxTotalResults | Upper bound for the whole run, across every route and trip. This is the field that governs what a run costs. Default 200. |
{"departureCity": "TPE","destinationCity": "PRG","transitCities": ["HKG"],"cabinClass": "Y","currency": "USD","numberOfPassengers": 1,"travelDates": [{ "departureDate": "2027-02-01", "returnDate": "2027-02-10" }],"maxResultsPerSearch": 20}
These are cities, not airports
LHR does not mean Heathrow. Trip.com widens an airport code to the city it serves, so a search
for LHR becomes a search for London and can come back with a departure from Gatwick or
Southend — and the result will say LON, because that is what was actually searched.
This matters most with Max Stops per Journey set to 0: you can get a genuine nonstop that leaves from an airport you did not have in mind. Measured examples — asking for Gatwick returned Heathrow, Orly returned Charles de Gaulle, and Gimpo returned Incheon. If only one airport in a city works for you, filter the results after exporting. The search itself cannot be narrowed below the city.
City codes are the safest way to name a hub — SEL, TYO, LON. An airport code works
too, and for the 13 measured so far (ICN, NRT, LHR among them) it is treated as its city, so
a stopover can land at one airport and leave from the other. Any other airport code matches only
flights through that airport.
Output
Each dataset item is one flight option. Results are written as they are found, so the dataset is in discovery order rather than price order — sort it after exporting if you need it ranked. The run's status message already names the cheapest of each routing, so a glance at the Runs list answers "did splitting win" without opening the dataset at all.
A run returns two kinds of row, and you need both
Asking to split the trip at Hong Kong does not mean every row goes through Hong Kong. A run prices the trip both ways, because a saving means nothing without something to compare it to:
pattern | splitAtCity | what the row is |
|---|---|---|
SINGLE_TICKET | null | the baseline — the cheapest way to fly this route on one ticket, routed however the airline likes |
SPLIT_TICKET | HKG | the experiment — the same trip bought as two tickets meeting at Hong Kong |
So a baseline row connecting in Doha is not a mistake or a missed filter. It is the number that
tells you whether splitting at Hong Kong was worth it. Without it, 1,062 is just a price.
Two more fields are easy to confuse, and mean different things:
splitAtCity— where we split the ticket.nullon a baseline row.stopsAt— where the aircraft actually stops, including the airline's own connections. A baseline row can transit Hong Kong all by itself, which is the best outcome of all: one ticket, bags checked through, and no connection of your own to make.
selfTransfer is the field to read before comparing prices. When it is true the itinerary is
two separate bookings and a missed connection is yours to solve.
tickets is where the money is broken down: one entry per booking you would actually make, each
with its own price. A single-ticket row has one entry with role: "main"; a split row adds a
role: "positioning" entry, which is the ticket bought only to get you to the hub and back — so
you can see what reaching the hub costs and what the fare onward from it costs. Every leg in
flights carries a ticket index pointing back into that list, so you can see exactly where one
booking ends and the next begins.
A split round trip is two round trips: positioning from home to the hub and back, and the
main ticket from the hub to the destination and back. The positioning ticket comes home the day
after returnDate, so you get home a day later than you would on a single ticket. The row's
returnDate is the main ticket's.
The run's status message answers the question directly, comparing each stopover against the cheapest single ticket:
✅ 23 results · one ticket 972 USD · via SEL 830 (-142) · via HKG 905 (-67)
So a glance at the Runs list tells you which routing won and by how much, without opening the dataset. The full comparison, including every stopover city, is in the run log.
What does the output look like?
One split-ticket row from a real TPE→PRG run, trimmed to one leg for length:
{"pattern": "SPLIT_TICKET","tripType": "round-trip","departureCity": "TPE","destinationCity": "PRG","splitAtCity": "HKG","departureDate": "2026-11-10","returnDate": "2026-11-20","totalPrice": { "amount": 905, "currency": "USD" },"totalTimeMinutes": 3000,"totalFlights": 6,"selfTransfer": true,"stopoverHours": [7.5, 5],"hubAirportChange": false,"tickets": [{"role": "positioning","from": "TPE","to": "HKG","price": { "amount": 127, "currency": "USD" },"productId": "...","policyId": "..."},{"role": "main","from": "HKG","to": "PRG","price": { "amount": 778, "currency": "USD" },"productId": "...","policyId": "..."}],"stopsAt": ["HKG", "DOH"],"flights": [{"ticket": 0,"departureCityCode": "TPE","departureAirport": "TPE","departureTime": "2026-11-10 23:45:00","arrivalCityCode": "HKG","arrivalAirport": "HKG","arrivalTime": "2026-11-11 01:30:00","flightSegment": { "airline": "CI", "flightNumber": "CI601" },"durationTimeMinutes": 105}]}
Visual report — Every run that finds results also saves an interactive HTML report to the Output tab. It groups results by search combination (route, dates, trip type), highlights the cheapest routing in each group, and shows a timeline bar for every journey with leg-by-leg flight details. Open it from the Output tab after the run finishes.
You can download the dataset as JSON, CSV, Excel, or HTML.
| Field | Type | Description |
|---|---|---|
pattern | string | SINGLE_TICKET or SPLIT_TICKET |
tripType | string | one-way or round-trip. A run can mix both, and their prices are not comparable |
departureCity | string | Origin IATA code |
destinationCity | string | Destination IATA code |
splitAtCity | string | Hub the trip is split at, null on a single ticket |
departureDate | string | Outbound date |
returnDate | string | Return date of the main ticket, null on a one-way |
totalPrice | object | { amount, currency } — what the whole itinerary costs, every ticket added up |
totalTimeMinutes | number | Total travel time including connections |
totalFlights | number | How many flights you take in all |
selfTransfer | bool | true when the itinerary is two tickets and the connection is yours to make |
stopoverHours | array | Hours waiting at the hub, one per handover between tickets |
hubAirportChange | bool | true when you must travel between two airports at the hub, so allow extra time |
tickets | array | One entry per booking: role, from, to, price as { amount, currency } |
stopsAt | array | Every airport the journey stops at that is not an end, each named once |
flights | array | Every leg in order: airports, times, airline, flight number, duration, ticket index |
Before you book: read this
This is a price discovery tool, not a booking system.
Split tickets are two separate bookings, which is exactly why they can be cheaper — and exactly what you are taking on:
- A delay on the first ticket does not protect the second. Nobody rebooks you, and the second fare is simply lost. This is the real cost of the saving, and no search can remove it.
- Baggage does not transfer between separate tickets. You collect it and check in again, and each ticket has its own baggage allowance and fees.
- You enter the hub country. Collecting bags and checking in again means passing immigration, so check the hub's transit-visa and entry requirements for your passport before booking.
- Availability moves between the search and your booking.
Every result reports what it is asking of you: selfTransfer says whether the connection is
yours, stopoverHours says how long you have, and hubAirportChange says whether you also have
to get from one hub airport to another. Itineraries that cannot connect are not
returned — the run checks every handover against your stopover window and says so in a
SEARCH_ERROR row when nothing fits. Choosing a longer minStopoverHours buys margin against
a delay; four hours is the shortest that is realistic.
How much does it cost to scrape Trip.com flight prices?
| Starting the Actor | $0.005 per run |
| Each result | $0.003, so $3 per 1,000 |
A default search — one hub, one trip — is two searches of up to 20 results each, so at most about $0.13. Nothing else is charged: the Actor queries flight data directly rather than driving a browser, and a typical search finishes in well under a minute.
maxTotalResults is the field to set if the bill matters. Results multiply with travel
periods and hub cities, so three periods and three hubs at 100 per search asks for 1,200 results
without looking like it. The default cap of 200 keeps any single run under about $0.61.
Explanation rows are billed too. A search that finds nothing writes one SEARCH_ERROR row
naming the reason, charged like a result. These rows are not counted against maxTotalResults,
but a search writes one only when it wrote no results, so the run still stays within the cap.
Finding outstation tickets (外站票)
An outstation ticket is when flying from a cheaper origin city through your home city to a destination costs less than flying from your home city directly. For example, a Hong Kong → Tokyo ticket routed through Taipei can be cheaper than a Taipei → Tokyo ticket — even though you board the same onward flight in Taipei. This happens because airlines price each origin-destination pair independently, and fares out of hub cities like Hong Kong, Bangkok or Singapore are often lower.
The idea is the same split-ticket logic this Actor already uses, but flipped: instead of splitting a long-haul at a cheaper hub, you start from a cheaper city and pass through home.
How to compare with two runs
You need two runs: one prices the outstation route, the other prices the route from home.
Run 1 — outstation route (HKG → NRT, splitting at TPE):
{"departureCity": "HKG","destinationCity": "NRT","transitCities": ["TPE"],"travelDates": [{ "departureDate": "2027-03-01", "returnDate": "2027-03-10" }],"currency": "USD","maxResultsPerSearch": 20}
This searches Hong Kong to Tokyo, split at Taipei. The SPLIT_TICKET rows in the results
are the outstation fares: a cheap HKG→TPE ticket plus a TPE→NRT ticket onward from your home
city.
Run 2 — baseline from home (TPE → NRT, direct):
{"departureCity": "TPE","destinationCity": "NRT","travelDates": [{ "departureDate": "2027-03-01", "returnDate": "2027-03-10" }],"currency": "USD","maxResultsPerSearch": 20}
No transitCities needed — you just want the single-ticket price from Taipei.
Compare the cheapest SPLIT_TICKET from Run 1 against the cheapest SINGLE_TICKET from
Run 2. If the outstation split is cheaper, the saving pays for the extra leg to the hub city
and back.
What to watch for
- You fly to the hub first. On a round trip, the positioning leg is HKG→TPE before your flight and TPE→HKG after you return — so you add travel time and a self-transfer at your home airport.
- Same self-transfer rules apply. The outstation split is two separate bookings, with the same connection risks described in Before you book.
- One-way outstations can be especially good. The price gap on one-way fares tends to be wider, and you only need the positioning leg in one direction.
FAQ
How is this different from Google Flights or Skyscanner scrapers?
They price a trip as one ticket. This Actor also prices it as two tickets split at a hub, and tells you whether the split wins — the single-ticket baseline is searched in the same run, so the flight price comparison is on the same dates, like for like.
What is split-ticketing, and is it allowed?
Buying one trip as two separate tickets that meet at a hub. It is ordinary ticket buying — each
booking is a normal fare bought at its normal price; the trade-off is that nobody protects the
connection between them, which is what the selfTransfer field warns about.
Can I book a split ticket as one booking?
No. They are separate bookings — that is the source of the saving, and the source of the risk. The run does check that every handover fits your stopover window, so what you see can be flown. What no search can do is protect you when the first flight is late.
Does Trip.com have a public flight API?
No. Trip.com has no public flights API; this Actor is the practical Trip.com flight API alternative — a documented JSON input and output over the same fare data the site shows, callable from Python, JavaScript or any MCP agent.
Can I use the Cheapest Flights Scraper with the Apify API or Python?
Yes — see the flight price API section above, or the API tab
for ready-made JavaScript, Python and curl snippets. The run-sync-get-dataset-items endpoint
returns the flights in one call.
Can I integrate it with Google Sheets, n8n, Make or Zapier?
Yes — through Apify integrations: schedule a run and send new lows to Slack, email or a sheet.
How far ahead should I search?
Long-haul fares usually settle two to four months out. Scheduled runs across that window are the most reliable way to spot a genuine drop.
Is scraping flight prices legal?
The Actor reads publicly available prices. How you use the data is your responsibility — review Trip.com's Terms of Service before running at scale.
Found a problem, or need something this Actor does not do yet? Open an issue in the Issues tab describing your scenario — issues decide what gets fixed and built next.