{
  "openapi": "3.0.1",
  "info": {
    "title": "Trip.com & Ctrip Hotel Reviews Scraper",
    "description": "Scrape Trip.com and Ctrip (携程) hotel reviews without login: text, English translation, sub-ratings, date, traveler type, room, photos, videos, hotel replies, hotelId and the hotel's aggregate score on every row. Sort, date, rating and language filters. Errors free.",
    "version": "0.1",
    "x-build-id": "G6s6KLMUQf2lr5a7d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~tripcom-hotel-reviews/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-tripcom-hotel-reviews",
        "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/scrapewise~tripcom-hotel-reviews/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-tripcom-hotel-reviews",
        "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/scrapewise~tripcom-hotel-reviews/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-tripcom-hotel-reviews",
        "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": {
          "hotelUrls": {
            "title": "Hotel links or ids",
            "type": "array",
            "description": "Hotels, one per line: a Trip.com hotel page from any country site (www.trip.com, us.trip.com, th.trip.com...), a Ctrip hotel page (for example hotels.ctrip.com/hotels/1286148.html) or just the numeric hotel id (for example 687592). Trip.com and Ctrip share hotel ids, so Ctrip hotels return their Chinese reviews too. Each hotel returns its reviews and an optional summary row. Leave empty to run an example hotel. Also accepts 'startUrls', 'urls', 'hotelIds' or 'hotelId'.",
            "items": {
              "type": "string"
            }
          },
          "maxReviewsPerHotel": {
            "title": "Max reviews per hotel",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many reviews for each hotel (default 20). 0 means all reviews: Trip.com pages through every review, 100 per request, and popular hotels have tens of thousands. You pay per review delivered, so this is the main cost control. Also accepts 'maxReviews' or 'maxItems' from other review scrapers.",
            "default": 20
          },
          "onlyNewReviews": {
            "title": "Only new reviews since the last run",
            "type": "boolean",
            "description": "For scheduled runs. Remembers which reviews of each hotel (and filter set) were already seen, in a named key-value store in your account ('tripcom-hotel-reviews-only-new'), and delivers only reviews posted since: seen ones are not delivered, not charged and do not count toward 'Max reviews per hotel'. Reads newest first. The first run delivers up to your limit; the hotel summary row comes only on the first run and on runs with new reviews, so a quiet day costs nothing. Delete the store to start over. Also accepts 'onlyNew'.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "mostRelevant",
              "mostRecent",
              "ratingHighToLow",
              "ratingLowToHigh"
            ],
            "type": "string",
            "description": "Order in which reviews are read, as on the hotel page: Most relevant (default), Most recent, Rating high to low or Rating low to high. With a per-hotel limit it also decides which reviews you get, for example Rating low to high with 50 returns the 50 worst reviews.",
            "default": "mostRelevant"
          },
          "fromDate": {
            "title": "Reviews from date",
            "type": "string",
            "description": "Keep only reviews posted on or after this date: YYYY-MM-DD (for example 2026-01-01) or a number of days back (30 = the last 30 days). Good for incremental syncs. If you leave 'Sort by' untouched, reviews are read newest first so the run stops as soon as it passes this date. Leave empty for no date filter. Also accepts 'cutoffDate' or 'reviewsFrom'."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Keep only reviews rated at least this much on Trip.com's 10-point scale (1 to 10), for example 8 to collect praise. Skipped reviews are not charged. Leave empty for no minimum."
          },
          "maxRating": {
            "title": "Maximum rating",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Keep only reviews rated at most this much on Trip.com's 10-point scale (1 to 10), for example 6 to collect complaints. Skipped reviews are not charged. Leave empty for no maximum."
          },
          "reviewFilter": {
            "title": "Review type",
            "enum": [
              "all",
              "positive",
              "negative",
              "withPhotos"
            ],
            "type": "string",
            "description": "Trip.com's own review filter: All (default), Positive only, Negative only, or only reviews With photos or video. Applied by Trip.com before the reviews are read, so it is faster than a rating filter.",
            "default": "all"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Only reviews written in this language, as a name or two-letter code (for example English, Chinese, Japanese, Korean, Thai, French, or en, zh, ja). Empty means every language. Use 'Translate reviews to' instead if you want every review readable in one language."
          },
          "translateTo": {
            "title": "Translate reviews to",
            "type": "string",
            "description": "Two-letter language code to translate reviews into, for example en. Trip.com translates only some reviews itself; with this set, every review in another language gets translatedText in this language (Trip.com's own translation when it exists, otherwise a free machine translation). Same price. Empty means only Trip.com's own translations."
          },
          "includeHotelSummary": {
            "title": "Include hotel summary",
            "type": "boolean",
            "description": "On (default): adds one row per hotel with the overall rating, the four sub-ratings, total reviews, review tags, traveler types, languages and Trip.com's AI review summary. Charged as one item per hotel. Turn off to receive only reviews.",
            "default": true
          },
          "reviewInsights": {
            "title": "Review insights (sentiment and themes)",
            "type": "boolean",
            "description": "Adds a sentiment label and score (positive, neutral, negative, from -1 to 1) to every review, and one free 'insights' row per hotel: rating breakdown, average rating and positive/negative share month by month, the most repeated complaint and praise themes with short example quotes, and how often and how fast the hotel replies. Computed in the run from the reviews delivered, with a keyword lexicon and the rating: no AI model, no external service, no extra charge. With 'Translate reviews to' set, themes come from the translated text. Also read from includeInsights, aiInsights or sentimentAnalysis.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The default Apify Proxy works. Keep the default.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}