{
  "openapi": "3.0.1",
  "info": {
    "title": "Advanced Trip.com Scraper",
    "description": "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).",
    "version": "0.1",
    "x-build-id": "jRV5hyXqlijsQqKYy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dtrungtin~advanced-trip-com-actor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dtrungtin-advanced-trip-com-actor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/dtrungtin~advanced-trip-com-actor/runs": {
      "post": {
        "operationId": "runs-sync-dtrungtin-advanced-trip-com-actor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/dtrungtin~advanced-trip-com-actor/run-sync": {
      "post": {
        "operationId": "run-sync-dtrungtin-advanced-trip-com-actor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchType": {
            "title": "What to search",
            "enum": [
              "flights",
              "trains",
              "cars",
              "attractions",
              "flightHotel",
              "privateTours",
              "groupTours",
              "cruises",
              "tripPlanner"
            ],
            "type": "string",
            "description": "The Trip.com section to search with the parameters below. Ignored when only Start URLs are given.",
            "default": "flights"
          },
          "origin": {
            "title": "Origin / from",
            "type": "string",
            "description": "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": {
            "title": "Destination / to / location / keyword",
            "type": "string",
            "description": "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": {
            "title": "Start date",
            "type": "string",
            "description": "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": {
            "title": "End / return date",
            "type": "string",
            "description": "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": {
            "title": "Start URLs",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of adult travellers (flights, Flight + Hotel).",
            "default": 1
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Number of children aged 2–11 (flights, Flight + Hotel).",
            "default": 0
          },
          "infants": {
            "title": "Infants",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Number of infants under 2 (flights, Flight + Hotel). Each infant needs an adult.",
            "default": 0
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Number of hotel rooms (Flight + Hotel).",
            "default": 1
          },
          "cabinClass": {
            "title": "Cabin class",
            "enum": [
              "economy",
              "premiumEconomy",
              "business",
              "first"
            ],
            "type": "string",
            "description": "Flight cabin class.",
            "default": "economy"
          },
          "directFlightsOnly": {
            "title": "Direct flights only",
            "type": "boolean",
            "description": "Keep only non-stop flights.",
            "default": false
          },
          "pickupTime": {
            "title": "Car pick-up time",
            "type": "string",
            "description": "HH:mm, local time at the pick-up location.",
            "default": "10:00"
          },
          "dropoffTime": {
            "title": "Car drop-off time",
            "type": "string",
            "description": "HH:mm, local time at the drop-off location.",
            "default": "10:00"
          },
          "driverAge": {
            "title": "Driver age",
            "minimum": 18,
            "maximum": 99,
            "type": "integer",
            "description": "Age of the main driver. Ages 30–60 get Trip.com's standard prices; younger or older drivers may see surcharges or fewer cars.",
            "default": 30
          },
          "includeDetails": {
            "title": "Scrape detail pages",
            "type": "boolean",
            "description": "Attractions & tours: open every product's detail page to add packages, itinerary, inclusions, cancellation policy, departure calendar and reviews. Slower and more expensive.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of items stored across all searches and URLs. 0 = no limit.",
            "default": 100
          },
          "currency": {
            "title": "Currency",
            "type": "string",
            "description": "ISO currency code for prices (e.g. USD, EUR, GBP, SGD, VND).",
            "default": "USD"
          },
          "locale": {
            "title": "Language / locale",
            "enum": [
              "en-US",
              "en-GB",
              "en-SG",
              "en-AU",
              "en-XX"
            ],
            "type": "string",
            "description": "Trip.com locale. Detail-page text extraction is tuned for English.",
            "default": "en-US"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of browser pages open at the same time. Keep it low to avoid Trip.com rate limits.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxies help when Trip.com starts showing captchas. Residential proxies work best; datacenter proxies are fine for small runs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debug": {
            "title": "Debug mode",
            "type": "boolean",
            "description": "Verbose logs and page-text snapshots in the key-value store.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}