# Advanced Trip.com Scraper (`dtrungtin/advanced-trip-com-actor`) Actor

Scrape Trip.com flights, trains, car rentals, attractions & tours, Flight + Hotel packages, private and group tours, cruises and Trip.Planner insights: prices, schedules, ratings and more (hotels excluded).

- **URL**: https://apify.com/dtrungtin/advanced-trip-com-actor.md
- **Developed by:** [Tin](https://apify.com/dtrungtin) (community)
- **Stats:** 4 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Advanced Trip.com Scraper do?

**Advanced Trip.com Scraper** extracts travel data from **every section of [Trip.com](https://www.trip.com) except hotels**, all from one Actor:

- ✈️ **Flights**: one-way and round-trip itineraries with airlines, flight numbers, stops, layovers, cabin class, fares and taxes
- 🚄 **Trains**: timetables and fares for China, the UK, Europe, South Korea, Japan and more
- 🚗 **Cars**: car rental offers per supplier, including price per day, total, deposit, cancellation policy and pick-up desk
- 🎡 **Attractions & Tours**: attractions (address, opening hours, rating) and bookable tickets, day tours and passes
- 🏨✈️ **Flight + Hotel**: package deals with the bundled flight and per-person savings
- 🧭 **Private Tours** and 👥 **Group Tours**: multi-day tours with itinerary, price calendar and what's included
- 🛳️ **Cruises**: voyages with ship, cruise line, route, ports of call and every sailing date with its price
- 🗺️ **Trip.Planner**: suggested trip length, where to stay, and destinations "frequently explored together"

Type a route or destination (or paste a Trip.com URL) and get **clean, structured JSON**. Running on the Apify platform gives you API access, scheduling, integrations (Google Sheets, Slack, Zapier, Make, webhooks), proxy rotation and run monitoring out of the box.

### Why use Advanced Trip.com Scraper?

- **Fare monitoring**: track flight, train and cruise prices on a schedule and get alerts when they drop.
- **Market research**: compare car rental suppliers, tour operators or cruise lines across destinations.
- **Travel content and apps**: feed itineraries, attractions and tours into your website, chatbot or trip-planning product.
- **Pricing intelligence** for OTAs, travel agencies and tour operators benchmarking against Trip.com.
- **One tool for everything**: no need to maintain nine separate scrapers.

### How to scrape Trip.com

1. Open the Actor's **Input** tab.
2. Pick **What to search** (for example *Flights*).
3. Fill in **Origin**, **Destination** and **Start date**. City names ("Hanoi", "London") and IATA codes ("HAN", "LON") both work.
4. Optionally set travellers, cabin class, a return date, or **Max results**.
5. Click **Start** and download your results as JSON, CSV, Excel or HTML, or read them via the API.

You can also paste Trip.com result or detail URLs into **Start URLs**, for example a flight results page, a car rental list or a tour detail page, and the Actor picks the right scraper automatically.

### Input

All fields are explained in the Input tab. The same few fields are reused across sections:

| Field         | Flights             | Trains         | Cars             | Attractions    | Flight + Hotel | Tours                 | Cruises          | Trip.Planner |
| ------------- | ------------------- | -------------- | ---------------- | -------------- | -------------- | --------------------- | ---------------- | ------------ |
| `origin`      | from                | from           | –                | –              | from           | departure city filter | departure port   | –            |
| `destination` | to                  | to             | pick-up location | city / keyword | to             | country / city        | region / keyword | destination  |
| `startDate`   | departure           | travel date    | pick-up          | –              | check-in       | earliest departure    | earliest sailing | trip start   |
| `endDate`     | return (round trip) | return journey | drop-off         | –              | check-out      | latest departure      | latest sailing   | trip end     |

Example input for a round-trip flight search:

```json
{
    "searchType": "flights",
    "origin": "London",
    "destination": "NYC",
    "startDate": "2026-11-10",
    "endDate": "2026-11-17",
    "adults": 2,
    "cabinClass": "economy",
    "maxItems": 100
}
```

Example input for Japanese group tours with full details:

```json
{
    "searchType": "groupTours",
    "destination": "Japan",
    "includeDetails": true,
    "maxItems": 20
}
```

### Output

Every item has a `type` (`flight`, `train`, `car`, `attraction`, `flightHotel`, `tour`, `cruise`, `tripPlan`) and a `scrapedAt` timestamp. The Output tab has a dedicated table view for each section. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

A flight item (shortened):

```json
{
    "type": "flight",
    "tripType": "one-way",
    "departureAirportCode": "HAN",
    "arrivalAirportCode": "DMK",
    "departureDateTime": "2026-10-20 12:20:00",
    "arrivalDateTime": "2026-10-20 14:10:00",
    "duration": "1h 50m",
    "stops": 0,
    "airlines": ["Thai AirAsia"],
    "flightNumbers": ["FD641"],
    "cabinClass": "Economy class",
    "price": 70,
    "taxes": 54.9,
    "currency": "USD",
    "seatsLeft": 9,
    "segments": [{ "flightNumber": "FD641", "aircraft": "Airbus A320", "departureTerminal": "T2" }],
    "url": "https://www.trip.com/flights/showfarefirst?dcity=han&acity=bkk&ddate=2026-10-20&triptype=ow&class=y&quantity=1"
}
```

A cruise item (shortened):

```json
{
    "type": "cruise",
    "name": "8 days · Caribbean · Miami - Puerto Plata - Saint Thomas - Road Town - Great Stirrup Cay - Miami",
    "cruiseLine": "Norwegian Cruise Line",
    "shipName": "Norwegian Aqua",
    "nights": 7,
    "departurePort": "Miami",
    "portsOfCall": ["Puerto Plata", "Saint Thomas", "Road Town", "Great Stirrup Cay"],
    "price": 520,
    "currency": "USD",
    "priceBasis": "per person",
    "sailings": [
        { "date": "2026-12-06", "price": 561 },
        { "date": "2026-12-13", "price": 520 }
    ],
    "url": "https://www.trip.com/cruises/line-96489-miami-caribbean-7night-norwegian-aqua-ncl/?departure=2026-12-13"
}
```

### Data fields

| Section        | Main fields                                                                                                                                                                                                                 |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Flights        | route, departure/arrival times, duration, stops, layovers, airlines, flight numbers, aircraft, terminals, cabin, price, taxes, seats left, fare features                                                                    |
| Trains         | train number(s), stations, times, duration, changes, fares per class (price, seats left), supplier, sale status                                                                                                             |
| Cars           | vehicle, group, SIPP code, seats, doors, luggage, transmission, supplier & rating, price per day/total, deposit, cancellation, mileage and other features, pick-up desk & hours                                             |
| Attractions    | name, category, city, address, coordinates, rating, reviews, opening hours, ranking, price, booked count; with details: highlights, packages, itinerary, cancellation policy, reviews                                       |
| Flight + Hotel | hotel, stars, score, location, room, per-person and total price, savings, cancellation, bundled outbound/return flight                                                                                                      |
| Tours          | name, private/group, duration, departure city, destinations, level, price, booked count, highlights, features; with details: day-by-day itinerary, what's included, departure dates & prices, group size, language, reviews |
| Cruises        | voyage, cruise line, ship & rating, region, nights, ports, sailings with prices, what's included                                                                                                                            |
| Trip.Planner   | destination, suggested days, where to stay (areas & share of travellers), destinations explored together, AI itinerary status                                                                                               |

### How much does it cost to scrape Trip.com?

Trip.com only works in a real browser, so the Actor uses headless Chrome. Most searches finish in **under a minute**. A typical run with the default 2 GB of memory uses roughly **0.02–0.05 compute units** per search, which fits comfortably in Apify's free monthly credit. Detail pages (`includeDetails`) add a few seconds each. Results that come from Trip.com's paginated APIs (trains, attractions, tours, cruises) are the cheapest per item.

### Tips and advanced options

- **Use IATA codes** (e.g. `HAN`, `LON`, `NYC`) for flights and Flight + Hotel to skip the city lookup step.
- **Limit results** with `maxItems`; the Actor stops as soon as the limit is reached.
- **Keep concurrency low** (1–3). Trip.com rate-limits aggressive scraping.
- **Proxies**: if you see captcha errors, switch to Apify residential proxies.
- **Currency**: set `currency` (USD, EUR, GBP, SGD, …) to get prices in your currency.
- **Round trips**: flight round trips list outbound options priced at the round-trip total (`priceIncludesReturn: true`). For trains, `endDate` adds a separate return search.
- **Detail pages** (`includeDetails`) are parsed from English page text, so keep an English `locale` for the best results.

### FAQ, disclaimers and support

**Is it legal to scrape Trip.com?** This Actor only extracts publicly available information that any visitor can see, and it does not collect personal data. You are responsible for complying with Trip.com's Terms of Service and the laws that apply to you. If unsure, consult a lawyer.

**Why aren't hotels supported?** This Actor intentionally covers every Trip.com section except hotels.

**Known limitations**

- Round-trip flights list outbound options only; the return leg is chosen on Trip.com after picking an outbound flight.
- Trip.com currently blocks AI itinerary generation in Trip.Planner for anonymous visitors. The Actor still returns suggested trip length, where to stay and nearby destinations, and reports `aiItineraryStatus`.
- Prices are live and can change at any time. Some sections show "from" prices per person.

**Feedback**: found a bug or need another field? Open an issue in the **Issues** tab. Need a custom solution or a higher-volume setup? Get in touch via the Actor's contact options.

# Actor input Schema

## `searchType` (type: `string`):

The Trip.com section to search with the parameters below. Ignored when only Start URLs are given.

## `origin` (type: `string`):

Flights & Flight + Hotel: departure city or IATA code (e.g. "HAN", "London"). Trains: departure station or city (e.g. "Shanghai", "London", "Seoul"). Cruises: departure port (e.g. "Miami"). Tours: optional departure city filter.

## `destination` (type: `string`):

Flights & Flight + Hotel: arrival city or IATA code. Trains: arrival station or city. Cars: pick-up location (airport, city or station). Attractions: city or keyword (e.g. "Tokyo", "Disneyland"). Tours: country, region or city (e.g. "Japan", "Bali"). Cruises: region or keyword (e.g. "Caribbean", "Alaska"). Trip.Planner: city or country.

## `startDate` (type: `string`):

YYYY-MM-DD. Flights: departure date. Trains: travel date. Cars: pick-up date. Flight + Hotel: check-in date. Tours: earliest departure. Cruises: earliest sailing. Trip.Planner: trip start (optional). Flights, trains, cars and Flight + Hotel default to 14 days from today when empty.

## `endDate` (type: `string`):

YYYY-MM-DD, optional. Flights: return date (makes it a round trip). Trains: return journey date. Cars: drop-off date (default: 3 days after pick-up). Flight + Hotel: check-out date (default: 3 nights). Tours & Cruises: latest departure. Trip.Planner: trip end (sets the number of days).

## `startUrls` (type: `array`):

Trip.com URLs to scrape directly: flight results (/flights/showfarefirst?...), train lists (/trains/.../list?...), car rental lists (/carhire/online/list?...), attraction lists & product pages (/things-to-do/list?..., /things-to-do/detail/...), Flight + Hotel lists (/packages/list?...), tour lists & detail pages (/package-tours/list/..., /package-tours/detail/...) and /cruises. Hotel pages are not supported.

## `adults` (type: `integer`):

Number of adult travellers (flights, Flight + Hotel).

## `children` (type: `integer`):

Number of children aged 2–11 (flights, Flight + Hotel).

## `infants` (type: `integer`):

Number of infants under 2 (flights, Flight + Hotel). Each infant needs an adult.

## `rooms` (type: `integer`):

Number of hotel rooms (Flight + Hotel).

## `cabinClass` (type: `string`):

Flight cabin class.

## `directFlightsOnly` (type: `boolean`):

Keep only non-stop flights.

## `pickupTime` (type: `string`):

HH:mm, local time at the pick-up location.

## `dropoffTime` (type: `string`):

HH:mm, local time at the drop-off location.

## `driverAge` (type: `integer`):

Age of the main driver. Ages 30–60 get Trip.com's standard prices; younger or older drivers may see surcharges or fewer cars.

## `includeDetails` (type: `boolean`):

Attractions & tours: open every product's detail page to add packages, itinerary, inclusions, cancellation policy, departure calendar and reviews. Slower and more expensive.

## `maxItems` (type: `integer`):

Maximum number of items stored across all searches and URLs. 0 = no limit.

## `currency` (type: `string`):

ISO currency code for prices (e.g. USD, EUR, GBP, SGD, VND).

## `locale` (type: `string`):

Trip.com locale. Detail-page text extraction is tuned for English.

## `maxConcurrency` (type: `integer`):

Maximum number of browser pages open at the same time. Keep it low to avoid Trip.com rate limits.

## `proxyConfiguration` (type: `object`):

Proxies help when Trip.com starts showing captchas. Residential proxies work best; datacenter proxies are fine for small runs.

## `debug` (type: `boolean`):

Verbose logs and page-text snapshots in the key-value store.

## Actor input object example

```json
{
  "searchType": "flights",
  "origin": "HAN",
  "destination": "BKK",
  "adults": 1,
  "children": 0,
  "infants": 0,
  "rooms": 1,
  "cabinClass": "economy",
  "directFlightsOnly": false,
  "pickupTime": "10:00",
  "dropoffTime": "10:00",
  "driverAge": 30,
  "includeDetails": false,
  "maxItems": 100,
  "currency": "USD",
  "locale": "en-US",
  "maxConcurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debug": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchType": "flights",
    "origin": "HAN",
    "destination": "BKK",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dtrungtin/advanced-trip-com-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchType": "flights",
    "origin": "HAN",
    "destination": "BKK",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("dtrungtin/advanced-trip-com-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchType": "flights",
  "origin": "HAN",
  "destination": "BKK",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call dtrungtin/advanced-trip-com-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dtrungtin/advanced-trip-com-actor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Vbo4oMUHS9P6kngXa/builds/jRV5hyXqlijsQqKYy/openapi.json
