{
  "openapi": "3.0.1",
  "info": {
    "title": "🔥 Trip.com Hotels Scraper — Prices & Reviews",
    "description": "🚀 Scrape Trip.com hotels by city name or search URL: prices, star ratings, guest scores, reviews, rooms, facilities, photos, addresses. Deep pagination — ask for 1,000, get 1,000. 🤖 LLM- and agent-optimized: one uniform JSON row per hotel, priced per hotel, ready for RAG and MCP pipelines.",
    "version": "1.0",
    "x-build-id": "OX5zGkSilNsj1wRkE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/bebity~trip-com-hotels-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-bebity-trip-com-hotels-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/bebity~trip-com-hotels-scraper/runs": {
      "post": {
        "operationId": "runs-sync-bebity-trip-com-hotels-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/bebity~trip-com-hotels-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-bebity-trip-com-hotels-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",
        "required": [
          "searchMode"
        ],
        "properties": {
          "searchMode": {
            "title": "Search mode",
            "enum": [
              "byFilters",
              "byUrls"
            ],
            "type": "string",
            "description": "Choose how you want to find hotels. <b>By filters</b> — pick a destination + dates + filters and the actor builds the trip.com search URL for you. <b>By URLs</b> — paste trip.com URLs (search results, hotel details, or hotel IDs) you've already crafted.",
            "default": "byFilters"
          },
          "urls": {
            "title": "Trip.com URLs",
            "type": "array",
            "description": "<b>Used only when Search mode = By URLs.</b> Paste any combination of:<br>• Search-results URLs (<code>/hotels/{slug}-hotels-list-{cityId}/</code> or <code>/hotels/list?cityId=N&checkin=…&listFilters=…</code>) — returns up to 12 hotels each<br>• Hotel detail URLs (<code>/hotels/{slug}-hotel-detail-{hotelId}/</code> or <code>/hotels/detail/?hotelId=N&…</code>)<br>• Bare hotel IDs (<code>375477</code>) — promoted to a detail URL automatically",
            "items": {
              "type": "string"
            }
          },
          "scrapeDetails": {
            "title": "Scrape detail pages",
            "type": "boolean",
            "description": "If on, the actor fetches each hotel's detail page (rooms, facilities, amenities, photos, FAQ, surroundings). <b>About 10× more expensive</b> than the lite mode. Defaults off so first runs are cheap and fast.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many hotels are scraped. Set to a low value (e.g. 10) for the first test run, then ramp up.",
            "default": 100
          },
          "destination": {
            "title": "Destination",
            "type": "string",
            "description": "<b>Used only when Search mode = By filters.</b> City to search. Accepts a city name (<code>Paris</code>, <code>Bangkok</code>), a numeric trip.com city ID (<code>192</code> for Paris), or a trip.com SERP URL we'll parse the cityId from. Ambiguous names produce a <code>failed</code> row with <code>reason: 'destination-unresolved'</code>."
          },
          "checkIn": {
            "title": "Check-in date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Check-in date. Format <code>YYYY-MM-DD</code>. Must be today or later."
          },
          "checkOut": {
            "title": "Check-out date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Check-out date. Format <code>YYYY-MM-DD</code>. <b>Must be at least 1 day after check-in.</b>"
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Number of adult guests (1–30).",
            "default": 2
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of child guests (0–10). When greater than 0, fill <code>childrenAges</code> with one age per child.",
            "default": 0
          },
          "childrenAges": {
            "title": "Children ages",
            "type": "array",
            "description": "Required when <code>children > 0</code>. One integer per child, each 0–17.",
            "items": {
              "type": "integer"
            },
            "default": []
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Number of rooms requested (1–30). Maps to trip.com's <code>crn</code> URL parameter.",
            "default": 1
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "recommended",
              "topReviewed",
              "priceAsc",
              "priceDesc",
              "starsDesc"
            ],
            "type": "string",
            "description": "Sort the search results.",
            "default": "recommended"
          },
          "stars": {
            "title": "Star rating",
            "type": "array",
            "description": "Multi-select hotel stars (1–5). Empty = no star filter.",
            "items": {
              "type": "integer"
            },
            "default": []
          },
          "priceMin": {
            "title": "Minimum price (per room per night)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price per room per night, excluding taxes & fees, in the selected currency."
          },
          "priceMax": {
            "title": "Maximum price (per room per night)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price per room per night, excluding taxes & fees, in the selected currency."
          },
          "minScore": {
            "title": "Minimum review score",
            "enum": [
              "6",
              "7",
              "8"
            ],
            "type": "string",
            "description": "Minimum guest review score. Trip.com exposes three thresholds: Pleasant (6+), Good (7+), Very Good (8+)."
          },
          "propertyType": {
            "title": "Property type",
            "uniqueItems": true,
            "type": "array",
            "description": "Multi-select property type buckets. Empty = no property-type filter. Trip.com's UI groups specific sub-types into these three user-facing buckets.",
            "items": {
              "type": "string",
              "enum": [
                "Hotels",
                "HomesAndApts",
                "Hostels"
              ],
              "enumTitles": [
                "Hotels (incl. resorts)",
                "Homes & apartments (incl. villas)",
                "Hostels (incl. inns)"
              ]
            },
            "default": []
          },
          "mealPlan": {
            "title": "Meal plan",
            "enum": [
              "any",
              "breakfast",
              "dinner",
              "breakfastDinner"
            ],
            "type": "string",
            "description": "Meal plan included in the rate.",
            "default": "any"
          },
          "freeCancellation": {
            "title": "Free cancellation only",
            "type": "boolean",
            "description": "Restrict to properties offering free cancellation.",
            "default": false
          },
          "paymentOption": {
            "title": "Payment option",
            "enum": [
              "any",
              "prepayOnline",
              "payLater",
              "payAtHotel"
            ],
            "type": "string",
            "description": "Restrict to properties offering the chosen payment terms.",
            "default": "any"
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "JPY",
              "AUD",
              "CAD",
              "NZD",
              "CHF",
              "CNY",
              "HKD",
              "SGD",
              "THB",
              "KRW",
              "MYR",
              "INR",
              "BRL",
              "MXN"
            ],
            "type": "string",
            "description": "Currency for price fields.",
            "default": "USD"
          },
          "locale": {
            "title": "Locale",
            "enum": [
              "en-US",
              "en-GB",
              "fr-FR",
              "de-DE",
              "es-ES",
              "it-IT",
              "pt-PT",
              "ja-JP",
              "ko-KR",
              "zh-CN",
              "zh-HK",
              "th-TH",
              "vi-VN"
            ],
            "type": "string",
            "description": "Site locale for content language.",
            "default": "en-US"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy. Defaults to residential. Override only if you know why.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}