{
  "openapi": "3.0.1",
  "info": {
    "title": "Trip.com Scraper — Hotel Prices, Rooms, Reviews & Details",
    "description": "Trip.com (携程 Ctrip international) hotel scraper: the hotels Trip.com lists for any city or area and your dates — nightly price, taxes, total, discounts, free cancellation, ratings, review counts, address, coordinates, photos — plus rooms, policies, amenities, phone and reviews on demand.",
    "version": "1.0",
    "x-build-id": "ABQd0O32hjm8LNyKb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/logiover~trip-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-logiover-trip-com-scraper",
        "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/logiover~trip-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-logiover-trip-com-scraper",
        "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/logiover~trip-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-logiover-trip-com-scraper",
        "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": {
          "destinations": {
            "title": "Destinations",
            "type": "array",
            "description": "Where to look for hotels, as you would type it into Trip.com: a city (\"Tokyo\", \"Bangkok\", \"Shanghai\"), an area or district (\"Shibuya\", \"Sukhumvit\"), a landmark or metro station (\"Shibuya Station\", \"Marina Bay Sands\"). Trip.com hotel list links (…/hotels/list?city=228…) and city IDs (\"cityId:228\") work too. Each destination is read to the end of its list unless a limit stops it.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "checkInDate": {
            "title": "Check-in date",
            "type": "string",
            "description": "YYYY-MM-DD, or +N for N days from the day of the run (e.g. +14 — handy for scheduled runs). Empty = 7 days from today, so a saved task never goes stale."
          },
          "checkOutDate": {
            "title": "Check-out date",
            "type": "string",
            "description": "YYYY-MM-DD or +N. Empty = check-in + \"Nights\"."
          },
          "nights": {
            "title": "Nights",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Length of stay when no check-out date is given (1–30). Prices come per room per night and as a total for the stay.",
            "default": 1
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Number of rooms (1–8). The nightly price is per room.",
            "default": 1
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of adult guests in total (1–10).",
            "default": 2
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "Number of children (0–6). Give their ages below; a child without an age counts as 8.",
            "default": 0
          },
          "childrenAges": {
            "title": "Children's ages",
            "type": "array",
            "description": "One age per child, 0–17 (e.g. 4 and 9). Trip.com prices family rooms and child policies by age.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CNY",
              "HKD",
              "TWD",
              "JPY",
              "KRW",
              "SGD",
              "MYR",
              "THB",
              "IDR",
              "PHP",
              "VND",
              "INR",
              "AUD",
              "NZD",
              "CAD",
              "CHF",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "HUF",
              "TRY",
              "AED",
              "SAR",
              "QAR",
              "ILS",
              "ZAR",
              "EGP",
              "BRL",
              "MXN",
              "ARS",
              "CLP",
              "COP",
              "RUB",
              "KZT",
              "MOP"
            ],
            "type": "string",
            "description": "Currency of every price in the output (Trip.com converts at its own rate; the property's own currency is reported with room rates).",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en-XX",
              "en-US",
              "en-GB",
              "zh-HK",
              "zh-TW",
              "ja-JP",
              "ko-KR",
              "de-DE",
              "fr-FR",
              "es-ES",
              "it-IT",
              "pt-BR",
              "ru-RU",
              "th-TH",
              "id-ID",
              "vi-VN",
              "ms-MY",
              "tr-TR",
              "ar-XX",
              "nl-NL",
              "pl-PL"
            ],
            "type": "string",
            "description": "Language of hotel names, areas, rating words, policies and amenities. Hotel names in the local script come with the English name next to them; Trip.com's mainland-China site (zh-CN) is a different product and is not served here.",
            "default": "en-XX"
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "top_reviewed",
              "lowest_price",
              "highest_price",
              "star_rating",
              "distance",
              "recommended"
            ],
            "type": "string",
            "description": "Which hotels come first (the \"rank\" column). The four stable orders (reviews, price, star rating, distance) are the ones to read a whole city with; Trip.com's own \"recommended\" order mixes in sponsored hotels and reshuffles between pages, so it is best for small top-N pulls.",
            "default": "top_reviewed"
          },
          "maxItems": {
            "title": "Max hotels",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many unique hotels across all destinations and links. 0 = no limit (every hotel Trip.com lists — Shanghai has ~9,400, Tokyo ~6,900, Bangkok ~5,000). Big runs need a big enough \"Maximum cost per run\".",
            "default": 1000
          },
          "maxItemsPerDestination": {
            "title": "Max hotels per destination",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Optional cap per destination, so one big city does not take the whole \"Max hotels\". 0 = no per-destination limit.",
            "default": 0
          },
          "fillGaps": {
            "title": "Second pass to catch missed hotels",
            "type": "boolean",
            "description": "After a destination's list has been read to its end, read it once more in another order (lowest price first, or highest price first when lowest price is your order) and add the hotels the first pass missed. Trip.com shuffles hotels with equal scores or prices between pages, so one pass can miss a few percent of a big city (measured on Tokyo: 3 % to 10 % depending on the order). Takes about as long as the first pass; only new hotels are saved and charged.",
            "default": false
          },
          "onlyAvailable": {
            "title": "Skip sold-out hotels",
            "type": "boolean",
            "description": "Trip.com also lists hotels that are sold out for your dates and guests (no price, tagged \"Sold out\"; they sit mostly at the end of the list). Turn this on to save only hotels that have a nightly price. Skipped hotels are not saved and not charged.",
            "default": false
          },
          "starRatings": {
            "title": "Star rating",
            "type": "array",
            "description": "Only hotels of these star classes (Trip.com's own star or diamond rating). Empty = any.",
            "items": {
              "type": "string",
              "enum": [
                "5",
                "4",
                "3",
                "2"
              ],
              "enumTitles": [
                "5 stars",
                "4 stars",
                "3 stars",
                "2 stars or less"
              ]
            },
            "default": []
          },
          "minGuestRating": {
            "title": "Minimum guest rating",
            "enum": [
              "",
              "6",
              "7",
              "8",
              "9"
            ],
            "type": "string",
            "description": "Only hotels rated at least this on Trip.com's 10-point guest score.",
            "default": ""
          },
          "minPrice": {
            "title": "Minimum price per night",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Only hotels from this nightly price (per room, before taxes and fees), in the chosen currency. 0 = no minimum.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum price per night",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Only hotels up to this nightly price (per room, before taxes and fees), in the chosen currency. 0 = no maximum.",
            "default": 0
          },
          "freeCancellation": {
            "title": "Free cancellation only",
            "type": "boolean",
            "description": "Only hotels with at least one free-cancellation rate for your dates.",
            "default": false
          },
          "breakfastIncluded": {
            "title": "Breakfast included only",
            "type": "boolean",
            "description": "Only hotels with a rate that includes breakfast.",
            "default": false
          },
          "bedTypes": {
            "title": "Bed type",
            "type": "array",
            "description": "Only hotels with rooms of these bed types. Empty = any.",
            "items": {
              "type": "string",
              "enum": [
                "double",
                "king",
                "single",
                "two_beds",
                "three_beds",
                "four_plus"
              ],
              "enumTitles": [
                "1 double bed",
                "1 king bed",
                "1 single bed",
                "2 beds",
                "3 beds",
                "4+ beds"
              ]
            },
            "default": []
          },
          "paymentType": {
            "title": "Payment",
            "enum": [
              "",
              "pay_at_hotel",
              "prepay_online",
              "no_credit_card"
            ],
            "type": "string",
            "description": "Only hotels offering this payment option.",
            "default": ""
          },
          "includeDetails": {
            "title": "Open each hotel's page (local name, phone, full address, policies, amenities)",
            "type": "boolean",
            "description": "Adds the hotel's local-language name, phone, full street address, transit note, nearby places with distances, opening year, number of rooms, description, check-in/out times, child, pet, deposit, breakfast and age policies, the full amenity list by category, popular amenities and more photos. One extra page per hotel, included in the price.",
            "default": false
          },
          "includeRooms": {
            "title": "Room types and every rate",
            "type": "boolean",
            "description": "Adds every room type (bed, size, floor, window, smoking, Wi-Fi, facilities, photos) with every rate Trip.com sells for your dates: price per night, total with taxes, taxes and fees, original price, discount labels, meal plan, cancellation terms, payment option, instant confirmation, rooms left and the price in the property's own currency. One extra request per hotel, included in the price.",
            "default": false
          },
          "maxReviewsPerHotel": {
            "title": "Reviews per hotel",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Adds up to this many guest reviews per hotel (text, date, stay date, overall and sub-ratings, traveller type, room, country, photos, the hotel's reply). 0 = no reviews. 10 reviews = one request.",
            "default": 0
          },
          "reviewsSort": {
            "title": "Reviews order",
            "enum": [
              "most_recent",
              "most_relevant",
              "rating_high_to_low",
              "rating_low_to_high"
            ],
            "type": "string",
            "description": "Which reviews come first when \"Reviews per hotel\" is set.",
            "default": "most_recent"
          },
          "hotelUrls": {
            "title": "Hotel links or IDs",
            "type": "array",
            "description": "Optional: specific hotels — Trip.com hotel links (https://www.trip.com/hotels/detail/?hotelId=72926277… or the SEO form …/shanghai-hotel-detail-72926277/…) or hotel IDs (the \"hotelId\" column of an earlier run). Each comes back with its price for your dates plus the hotel page fields; ideal for daily price tracking.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Used only as a fallback. The scraper talks to Trip.com over a direct connection first (no proxy cost); if Trip.com refuses it, it switches to the proxy chosen here (or Apify's residential pool when none is chosen) and then to the datacenter pool.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}