{
  "openapi": "3.0.1",
  "info": {
    "title": "Trip.com Reviews Scraper — Ctrip Hotel Guest Reviews & Ratings",
    "description": "Trip.com and Ctrip (携程) hotel guest reviews by URL or id. One row per review: 0-10 rating, 4 sub-scores, text, stay date, room, travel type, reviewer country, photos, hotel reply, source. Free hotel row: stars, address, scores. Filters before billing: language, max score (negative reviews). 酒店点评",
    "version": "1.0",
    "x-build-id": "FsMlEWLWq6sxgrRd6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kestrel~trip-com-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kestrel-trip-com-reviews-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/kestrel~trip-com-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kestrel-trip-com-reviews-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/kestrel~trip-com-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kestrel-trip-com-reviews-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": {
          "startUrls": {
            "title": "Trip.com hotel URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "Trip.com hotel pages, e.g. [\"https://www.trip.com/hotels/lisbon-hotel-detail-2561632/valverde-hotel/\"]; any trip.com country subdomain (us., uk., …) works. The numeric id sits after hotel-detail- in the URL, so no page is read; a URL without it is read once for its hotelId. Hotel names are not accepted: find the hotel on trip.com and pass its URL or id. Give at least one of startUrls or hotelIds.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "hotelIds": {
            "title": "Trip.com hotel ids",
            "uniqueItems": true,
            "type": "array",
            "description": "Trip.com's numeric hotel ids, e.g. [\"2561632\"] — the number after hotel-detail- in any hotel URL, and the hotel_id on an earlier run's rows. Use to re-read the same hotels every day. An id Trip.com does not know is reported in a status row as an error and costs nothing.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxReviewsPerHotel": {
            "title": "Max reviews per hotel",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "The main cost control: reviews delivered per hotel, e.g. 50; default 200 (up to $0.80 per hotel at $0.004 a review). 0 = every review the hotel has (at most 20,000 per hotel per run; large hotels run to thousands, so 0 can cost $10+). Reviews come in reviewsSort order: 50 with \"most_recent\" = the 50 newest. languages applies BEFORE this cap (filtered by Trip.com); maxRating and requireText AFTER it — pair maxRating with reviewsSort \"lowest_rated\".",
            "default": 200
          },
          "reviewsSort": {
            "title": "Order",
            "enum": [
              "most_recent",
              "highest_rated",
              "lowest_rated",
              "most_relevant"
            ],
            "type": "string",
            "description": "\"most_recent\" (default), \"highest_rated\", \"lowest_rated\" or \"most_relevant\" — Trip.com's own orders. Use \"lowest_rated\" with maxReviewsPerHotel 50 for \"the 50 worst reviews\" or with maxRating for complaints; \"most_recent\" for a scheduled feed (each run re-reads the newest N — dedupe on review_id).",
            "default": "most_recent"
          },
          "languages": {
            "title": "Review languages",
            "uniqueItems": true,
            "type": "array",
            "description": "Review languages to keep, by name, e.g. [\"English\"] or [\"English\", \"Chinese\"]; empty (default) = every language. Known names: English, Chinese, Japanese, Korean, German, French, Spanish, Russian, Thai, Turkish, any name the free hotel row lists for that hotel, or a Trip.com language id. Filtered by Trip.com before fetching, so skipped reviews cost nothing. Trip.com carries many Chinese reviews from Ctrip (携程): this is how to keep or drop them. An unknown name ends the run, nothing charged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxRating": {
            "title": "Only reviews at or below this score",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Only reviews at or below this score on Trip.com's 0-10 scale, e.g. 6 for complaints; 0 (default) = every score. Use for \"negative reviews\", \"complaints\", \"what guests dislike\". Reviews above the score are never delivered or charged, but they count against maxReviewsPerHotel: set reviewsSort \"lowest_rated\" so the cap is spent on low scores.",
            "default": 0
          },
          "requireText": {
            "title": "Only reviews with a written comment",
            "type": "boolean",
            "description": "true = deliver and pay only for reviews with written text (Trip.com reviews almost always have some; this guards the rest). Default false. Applied after maxReviewsPerHotel.",
            "default": false
          },
          "includeHotelRow": {
            "title": "Include a hotel row",
            "type": "boolean",
            "description": "true (default) = also one free row per hotel (type \"hotel\"): name, stars, address, city, country (from one extra request to the hotel page), overall rating and rating word, the four sub-scores, review_count, and the languages and travel types its reviews come in, with counts. Never charged. For \"hotel ratings without the reviews\" keep this true and set maxReviewsPerHotel 1 (one review, $0.004).",
            "default": true
          },
          "locale": {
            "title": "Site locale",
            "type": "string",
            "description": "Trip.com locale for labels, e.g. \"en-US\" (default), \"en-GB\", \"ja-JP\", \"ko-KR\", \"zh-HK\", \"de-DE\". Sets the language of rating words and travel types only; review text is delivered as written, never translated, with language on every row. Not a filter: use languages to choose review languages.",
            "default": "en-US"
          },
          "sessions": {
            "title": "Parallel sessions",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Parallel proxy sessions (egress IPs), 1 to 16, default 4. More is faster; each is paced separately by perIp. Leave the default unless runs are throttled.",
            "default": 4
          },
          "perIp": {
            "title": "Requests per second per IP",
            "minimum": 0.1,
            "maximum": 3,
            "type": "number",
            "description": "Requests per second per session, 0.1 to 3, default 1 (Trip.com tolerated bursts of 20 from one IP in testing). Lower it only if a run is throttled.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy, default {\"useApifyProxy\": true}; the default datacenter group works for Trip.com. A refused call answers 200 with no review block — the actor detects that shape and retries on a fresh IP, so a throttled hotel is never reported as having no reviews. No browser, no login, no client-side token.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}