{
  "openapi": "3.0.1",
  "info": {
    "title": "Trip.com Scraper - Hotels, Prices & Reviews",
    "description": "Scrape Trip.com hotels with live room prices, star ratings, review scores & sub-ratings, amenities, photos, full address & geo, policies, AI review summaries and guest reviews (with English translations). Search any destination by name, city ID or URL. Export JSON, CSV, Excel.",
    "version": "1.0",
    "x-build-id": "yjmrU7fre9ax6byjv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~trip-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~trip-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-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/scrapesage~trip-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-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": {
          "searchDestinations": {
            "title": "Search destinations",
            "type": "array",
            "description": "City / destination names to search hotels in, e.g. <code>Tokyo</code>, <code>Singapore</code>, <code>New York</code>, <code>Dubai</code>, <code>London</code>. The actor resolves popular destinations automatically. For any other city, pass its numeric Trip.com city ID in <b>City IDs</b> (read it from a Trip.com hotels URL: <code>.../hotels/list?city=<u>123</u></code>) or paste the list URL in <b>Search URLs</b>.",
            "items": {
              "type": "string"
            }
          },
          "cityIds": {
            "title": "City IDs",
            "type": "array",
            "description": "Numeric Trip.com city IDs to search (e.g. <code>73</code> = Singapore, <code>228</code> = Tokyo). Use this for any destination not covered by the built-in name list. Find an ID in the hotels list URL: <code>.../hotels/list?city=<u>ID</u></code>.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Paste Trip.com hotel <b>list</b> URLs (e.g. <code>https://us.trip.com/hotels/list?city=73</code>). Every hotel on the page is scraped. Used in addition to the destinations above.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "hotelUrls": {
            "title": "Hotel URLs",
            "type": "array",
            "description": "Paste Trip.com hotel <b>detail</b> URLs (e.g. <code>https://us.trip.com/hotels/detail/?hotelId=687474</code>) to scrape specific hotels with full details and reviews.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "hotelIds": {
            "title": "Hotel IDs",
            "type": "array",
            "description": "Numeric Trip.com hotel IDs to scrape directly (full detail + reviews).",
            "items": {
              "type": "string"
            }
          },
          "checkInDate": {
            "title": "Check-in date",
            "type": "string",
            "description": "Check-in date (YYYY-MM-DD) used to price rooms. Defaults to tomorrow."
          },
          "checkOutDate": {
            "title": "Check-out date",
            "type": "string",
            "description": "Check-out date (YYYY-MM-DD) used to price rooms. Defaults to the day after check-in."
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "type": "integer",
            "description": "Number of adults (per room) for pricing.",
            "default": 2
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "type": "integer",
            "description": "Number of children for pricing.",
            "default": 0
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "type": "integer",
            "description": "Number of rooms for pricing.",
            "default": 1
          },
          "maxHotelsPerSearch": {
            "title": "Max hotels per destination",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum hotels to collect for each destination / search URL.",
            "default": 30
          },
          "maxHotels": {
            "title": "Max hotels (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of hotels to scrape across all destinations.",
            "default": 100
          },
          "minRating": {
            "title": "Minimum review score",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Only keep hotels with a review score (0–10) at or above this value.",
            "default": 0
          },
          "minReviews": {
            "title": "Minimum number of reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep hotels with at least this many guest reviews.",
            "default": 0
          },
          "starRatings": {
            "title": "Star ratings",
            "type": "array",
            "description": "Only keep hotels with these star classes. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1 star",
                "2 stars",
                "3 stars",
                "4 stars",
                "5 stars"
              ]
            }
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep hotels whose lowest room price is at or below this amount (in the site currency, USD). 0 = no limit.",
            "default": 0
          },
          "includeHotelDetails": {
            "title": "Include full hotel details",
            "type": "boolean",
            "description": "Fetch each hotel's detail page for the full record: description, complete amenities list, address & nearby transit, all policies, comment-tag breakdown, AI review summary and sub-ratings. One extra page fetch per hotel.",
            "default": true
          },
          "includeReviews": {
            "title": "Include guest reviews",
            "type": "boolean",
            "description": "Output the most-relevant guest reviews for each hotel as separate review records — rating, sub-ratings, original text plus an English translation, room, travel type, dates, photos and the hotel's response. Requires hotel details.",
            "default": true
          },
          "maxReviewsPerHotel": {
            "title": "Max reviews per hotel",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum guest reviews to output for each hotel.",
            "default": 10
          },
          "deduplicateHotels": {
            "title": "Deduplicate hotels",
            "type": "boolean",
            "description": "Skip a hotel if it was already emitted in this run (e.g. when a hotel appears in two searches).",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new hotels)",
            "type": "boolean",
            "description": "Remember hotels returned in previous runs (in a named key-value store) and output only hotels that are NEW since the last run. Pair with Apify Schedules to watch a destination for newly listed properties. This does not conflict with the scheduler — the schedule triggers the run; monitor mode dedupes a run's results against earlier runs.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store used to remember seen hotels across runs. Use different names to track different destinations independently (lowercase letters, digits and hyphens).",
            "default": "tripcom-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many hotel pages to fetch in parallel.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxies to use. Apify Proxy (datacenter, US) works well for Trip.com; switch to residential if you hit rate limits at high volume.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}