{
  "openapi": "3.0.1",
  "info": {
    "title": "Trip.com Hotel Data Scraper with Advanced Filters",
    "description": "Powerful Trip.com hotel/accomendation data scraper & API. Collect prices (original, current, total), ratings, reviews, room types, amenities, images, promotions. Apply advanced filters, monitor markets, build dashboards, or call via REST & schedule. Exports JSON or CSV fast.",
    "version": "1.2",
    "x-build-id": "9LjkeGpH6HjYR7UNS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hotels-scrapers~trip-hotel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hotels-scrapers-trip-hotel-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/hotels-scrapers~trip-hotel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hotels-scrapers-trip-hotel-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/hotels-scrapers~trip-hotel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hotels-scrapers-trip-hotel-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": {
          "country": {
            "title": "Country",
            "enum": [
              "",
              "US",
              "GB",
              "DE",
              "FR",
              "IT",
              "ES",
              "PT",
              "NL",
              "BE",
              "SE",
              "DK",
              "FI",
              "IE",
              "PL",
              "CZ",
              "HU",
              "GR",
              "TR",
              "EE",
              "RU",
              "CN",
              "HK",
              "TW",
              "MO",
              "JP",
              "KR",
              "TH",
              "VN",
              "MY",
              "SG",
              "ID",
              "PH",
              "IN",
              "NP",
              "KH",
              "LA",
              "UZ",
              "AM",
              "AE",
              "SA",
              "IL",
              "EG",
              "AU",
              "NZ",
              "FJ",
              "CA",
              "MX",
              "BR",
              "DO",
              "TZ",
              "SK"
            ],
            "type": "string",
            "description": "Pick a country. When cityId and searchWord are empty, the scraper falls back to the country's representative city (e.g. FR → Paris).",
            "default": ""
          },
          "searchWord": {
            "title": "Destination (city / landmark name)",
            "type": "string",
            "description": "Free-text destination. Examples: 'London', 'Paris', 'Tokyo', 'New York'. Trip.com resolves this against its database. Ignored if cityId is set; takes precedence over the country's default city."
          },
          "cityId": {
            "title": "City ID (overrides country & searchWord)",
            "minimum": 0,
            "type": "integer",
            "description": "Trip.com internal city ID. Found in any Trip.com search URL as city=<id>. Examples: London=338, Tokyo=228, Paris=192, New York=633."
          },
          "countryId": {
            "title": "Country ID (advanced override)",
            "minimum": 0,
            "type": "integer",
            "description": "Trip.com internal country ID. Normally left at 0 — derived from cityId or the chosen country.",
            "default": 0
          },
          "checkIn": {
            "title": "Check-in date",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Check-in date (YYYY-MM-DD). Required when searching by filters."
          },
          "checkOut": {
            "title": "Check-out date",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Check-out date (YYYY-MM-DD). Must be after check-in."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of adult guests (1–10).",
            "default": 2
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of child guests. When > 0, provide one age per child in childAges.",
            "default": 0
          },
          "childAges": {
            "title": "Children ages",
            "type": "array",
            "description": "One age per child when children > 0. Example: [5, 8].",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 17
            },
            "default": []
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Number of rooms to book (Trip.com `crn` param).",
            "default": 1
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "JPY",
              "CNY",
              "HKD",
              "SGD",
              "AUD",
              "CAD",
              "CHF",
              "KRW",
              "TWD",
              "THB",
              "MYR",
              "IDR",
              "PHP",
              "VND",
              "INR",
              "AED",
              "SAR",
              "NOK",
              "SEK",
              "DKK",
              "NZD",
              "ZAR",
              "BRL",
              "MXN",
              "RUB",
              "TRY",
              "PLN",
              "CZK",
              "HUF",
              "RON",
              "ILS"
            ],
            "type": "string",
            "description": "Display / filter currency used for prices. Passed to Trip.com as both barCurr and curr.",
            "default": "USD"
          },
          "locale": {
            "title": "Locale",
            "enum": [
              "en-US",
              "en-GB",
              "en-XX",
              "en-HK",
              "en-SG",
              "en-AU",
              "en-CA",
              "zh-CN",
              "zh-HK",
              "zh-TW",
              "ja-JP",
              "ko-KR",
              "th-TH",
              "vi-VN",
              "ms-MY",
              "id-ID",
              "fr-FR",
              "de-DE",
              "es-ES",
              "it-IT",
              "pt-PT",
              "nl-NL",
              "ru-RU",
              "tr-TR",
              "pl-PL",
              "ar-SA"
            ],
            "type": "string",
            "description": "Trip.com UI locale. Affects language of listing cards and which regional rates appear.",
            "default": "en-US"
          },
          "lowPrice": {
            "title": "Minimum price / night",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price per night in the selected currency. 0 = no minimum.",
            "default": 0
          },
          "highPrice": {
            "title": "Maximum price / night",
            "minimum": -1,
            "type": "integer",
            "description": "Maximum price per night in the selected currency. -1 = no maximum (Trip.com sentinel).",
            "default": -1
          },
          "starRatings": {
            "title": "Star ratings",
            "type": "array",
            "description": "Filter by official star category. Multiple selections act as OR.",
            "items": {
              "type": "string",
              "enum": [
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "≤ 2 stars",
                "3 stars",
                "4 stars",
                "5 stars"
              ]
            },
            "default": []
          },
          "guestRatingMin": {
            "title": "Minimum guest rating",
            "enum": [
              "0",
              "7",
              "8",
              "9",
              "10"
            ],
            "type": "string",
            "description": "Trip.com guest rating threshold.",
            "default": "0"
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "recommended",
              "price_asc",
              "price_desc",
              "distance",
              "reviews",
              "stars_desc"
            ],
            "type": "string",
            "description": "Result ordering. Encoded into Trip.com listFilters category 17.",
            "default": "recommended"
          },
          "breakfastIncluded": {
            "title": "Breakfast included",
            "type": "boolean",
            "description": "Only show rooms where breakfast is bundled (Trip.com listFilters 5|1).",
            "default": false
          },
          "freeCancellation": {
            "title": "Free cancellation",
            "type": "boolean",
            "description": "Only show rooms with free-cancellation policy (Trip.com listFilters 23|10).",
            "default": false
          },
          "payAtHotel": {
            "title": "Pay at hotel",
            "type": "boolean",
            "description": "Only show rooms where payment can be made at the hotel (Trip.com listFilters 7|1).",
            "default": false
          },
          "domestic": {
            "title": "Domestic booking",
            "type": "boolean",
            "description": "Leave false for international travellers. Setting true unlocks CN-only domestic rates when scraping a China city.",
            "default": false
          },
          "travelPurpose": {
            "title": "Travel purpose",
            "enum": [
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Travel intent hint passed to Trip.com. Affects recommendation ranking only.",
            "default": "0"
          },
          "limitPerPage": {
            "title": "Hotels per page",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of hotels to scrape per search URL.",
            "default": 100
          },
          "totalLimit": {
            "title": "Total hotels limit",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Total maximum across all URLs.",
            "default": 100
          },
          "filterArgs": {
            "title": "Search URLs",
            "type": "array",
            "description": "List of Trip.com hotel search URLs (https://trip.com/hotels/list?...) or raw query strings starting with '?'.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}