{
  "openapi": "3.0.1",
  "info": {
    "title": "Trip.com Hotels, Rooms & Reviews Scraper",
    "description": "Pull structured hotel listings from trip.com with prices, room types, amenities, policies, nearby places, and full guest reviews with ratings breakdown and an AI review summary. Search by destination or paste trip.com URLs directly.",
    "version": "1.1",
    "x-build-id": "3zaagLkxOlO9mZQ2y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~trip-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-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/abotapi~trip-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-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/abotapi~trip-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "Search: type a destination name, pick dates and filters below. URL: paste trip.com hotel links copied from your browser - every link shape works (search links, hotel detail links, and the /hotels/<city>-hotels-list-<id>/ links copied from a search engine).",
            "default": "search"
          },
          "locations": {
            "title": "Destinations",
            "type": "array",
            "description": "One destination per line - just the city name, e.g. \"Tokyo\" or \"New York\". Trip.com city ids also work: a bare id (\"228\") or \"228|Tokyo\". Names are matched against a built-in index of trip.com's own destinations; for smaller towns not in the index, switch to URL mode and paste a trip.com hotel link for that place.",
            "items": {
              "type": "string"
            }
          },
          "checkIn": {
            "title": "Check-in date",
            "type": "string",
            "description": "Check-in date, format YYYY-MM-DD. Leave empty to default to 14 days from today."
          },
          "checkOut": {
            "title": "Check-out date",
            "type": "string",
            "description": "Check-out date, format YYYY-MM-DD. Leave empty to default to one night after check-in."
          },
          "adults": {
            "title": "Adults per room",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of adult guests per room.",
            "default": 2
          },
          "children": {
            "title": "Children per room",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of child guests per room.",
            "default": 0
          },
          "rooms": {
            "title": "Number of rooms",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of rooms to search for.",
            "default": 1
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CNY",
              "JPY",
              "AUD",
              "CAD",
              "SGD",
              "HKD",
              "KRW"
            ],
            "type": "string",
            "description": "Currency prices are shown and pushed in.",
            "default": "USD"
          },
          "minStarRating": {
            "title": "Minimum star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Keep only hotels rated at or above this many stars. 0 = no filter. Applied client-side after fetching each page.",
            "default": 0
          },
          "minReviewScore": {
            "title": "Minimum guest review score",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Keep only hotels scoring at or above this out of 10 from guest reviews. 0 = no filter. Applied client-side after fetching each page.",
            "default": 0
          },
          "urls": {
            "title": "Trip.com URLs",
            "type": "array",
            "description": "One or more trip.com hotel URLs, any shape: a hotel list search URL (/hotels/list?city=...), a hotel detail URL (/hotels/detail/?hotelId=...), or the SEO links trip.com and search engines use (/hotels/tokyo-hotels-list-228/, /hotels/tokyo-hotel-detail-123456/hotel-name/, landmark and brand pages). Multi-URL supported, pagination walks forward, missing dates/guests are filled from the fields above. Non-hotel links (homepage, city directories) are skipped with a warning. Dates, guests and currency in a link win over the run-level fields above. Trip.com ignores page, sort and star in a plain list link (each fetch returns a fresh slice of the destination), so use Minimum star rating and Minimum guest review score, which are also applied to hotels from pasted links. A hotelUrl key is accepted as a single-link alias. Left untouched, this field scrapes the example links below, one per link shape; clear it and paste your own to scrape only those.",
            "default": [
              "https://www.trip.com/hotels/list?city=228&cityName=Tokyo&checkIn=2026-11-15&checkOut=2026-11-16&adult=2&children=0&crn=1&curr=USD",
              "https://us.trip.com/hotels/list?city=359",
              "https://www.trip.com/hotels/tokyo-hotels-list-228/",
              "https://au.trip.com/hotels/singapore-hotels-list-73/",
              "https://www.trip.com/hotels/tokyo-asakusa/hotels-c228m15019878/",
              "https://www.trip.com/hotels/shanghai-ibis/hotels-c2b1137/",
              "https://www.trip.com/hotels/tokyo-jr-tokyo-station/hotels-c228r8254862/",
              "https://www.trip.com/hotels/detail/?hotelId=1677831",
              "https://www.trip.com/hotels/detail/?hotelId=686797&checkIn=2026-11-15&checkOut=2026-11-16&adult=2&crn=1&curr=USD",
              "https://www.trip.com/hotels/tokyo-hotel-detail-993510/imperial-hotel-tokyo/",
              "https://www.trip.com/hotels/tokyo-hotel-detail-1489108/",
              "https://www.trip.com/hotels/dali-hotel-detail-21785314/liu-minyue-garden-designer-vacation-accommodation/review.html",
              "https://www.trip.com/hotels/ho-chi-minh-city-hotel-detail-2073112/park-hyatt-saigon/photo.html"
            ],
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Fetch hotel detail pages (rooms, policies, reviews)",
            "type": "boolean",
            "description": "When ON, also fetch each hotel's detail page for amenities, policies, nearby places, full description, and guest reviews with an AI summary. When OFF, only the listing-page fields are returned (name, price, rating, image, address). Default ON since most of the field set lives on the detail page.",
            "default": true
          },
          "maxReviews": {
            "title": "Max reviews per hotel",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Cap the guest reviews attached to each hotel (the most recent ones trip.com returns on the page). Default 20, 0 to skip reviews. Reviews bill on the existing detail-enrichment event in blocks: one extra unit per 10 delivered reviews (see the Pricing tab).",
            "default": 20
          },
          "sortBy": {
            "title": "Review order",
            "enum": [
              "mostRelevant",
              "mostRecent",
              "ratingHighToLow",
              "ratingLowToHigh"
            ],
            "type": "string",
            "description": "Order of the reviews attached to each hotel, applied to the reviews the page returns, before the cap. mostRelevant keeps the site order.",
            "default": "mostRelevant"
          },
          "cutoffDate": {
            "title": "Only reviews after (date)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Keep only reviews written after this date (YYYY-MM-DD). Empty keeps all."
          },
          "maxPages": {
            "title": "Max pages per destination",
            "minimum": 0,
            "type": "integer",
            "description": "How many list pages to walk per destination (or per pasted list URL). Does not cap the total, only how many pages are fetched, defers to Max listings. Leave empty to walk every result page."
          },
          "maxListings": {
            "title": "Max listings (total)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many hotels across all destinations. This is the run's cap, defaulting to 20. Set to 0 to remove the cap entirely (an empty Max pages will then walk every result page).",
            "default": 20
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy used to fetch pages. The default below works out of the box."
          },
          "resumeFromRunId": {
            "title": "Resume from run ID",
            "type": "string",
            "description": "ID of an interrupted run whose hotels should not be re-scraped: this run continues the previous one's dedup set. Leave empty to start fresh. For recurring diff runs (new/updated only on a schedule) you don't need this - turn on Incremental mode below instead."
          },
          "incrementalMode": {
            "title": "Incremental mode (only push new or changed hotels)",
            "type": "boolean",
            "description": "ON: the actor remembers the hotels it delivered for this exact search scope (keyed automatically, or use State key below) and on each scheduled run classifies every hotel as NEW, UPDATED, UNCHANGED or EXPIRED - pushing only new and changed rows plus EXPIRED tombstones, and stamping each row with changeType, changedFields, firstSeenAt and lastSeenAt. UPDATED is decided by comparing the whole record: price, original price, taxes total, discount, rating and review counts, amenities, policies, rooms (room prices and remaining-room counts) and the reviews you requested. It does NOT compare scrapedAt, the image URLs, or any field you list under Ignore fields; list order is ignored. Use Change scope to compare only prices and room availability. OFF (default): every run returns the full result set like before.",
            "default": false
          },
          "stateKey": {
            "title": "State key (optional)",
            "type": "string",
            "description": "Name for the incremental baseline when Incremental mode is ON. Leave empty to key the baseline on a hash of the search scope automatically (recommended). Use the same key across runs to compare like with like; a different key starts a new baseline."
          },
          "emitUnchanged": {
            "title": "Also push unchanged rows",
            "type": "boolean",
            "description": "With Incremental mode ON, also push hotels that did not change (stamped changeType=UNCHANGED). Default OFF - unchanged hotels are only remembered, not pushed.",
            "default": false
          },
          "emitExpired": {
            "title": "Push EXPIRED tombstones",
            "type": "boolean",
            "description": "With Incremental mode ON, push a tombstone row (changeType=EXPIRED, last known field values) for hotels from the previous run that this run's search no longer returns - only when the search ran to completion. Default ON.",
            "default": true
          },
          "changeScope": {
            "title": "Change scope (incremental mode only)",
            "enum": [
              "all",
              "priceAndStock"
            ],
            "type": "string",
            "description": "With Incremental mode ON. 'all' (default): any change in the compared fields makes a row UPDATED. 'priceAndStock': only price changes (current, original, total with taxes, discount, currency) and per-room price, room name and remaining-room count make a row UPDATED; descriptions, amenities, badges, reviews and images never do.",
            "default": "all"
          },
          "compactUpdates": {
            "title": "Compact UPDATED rows (incremental mode only)",
            "type": "boolean",
            "description": "With Incremental mode ON, UPDATED rows carry only ids, name, link, current prices, priceChanges {field: {old, new}} and roomChanges [{roomId, change: ADDED|REMOVED|CHANGED, changes}] instead of the full record (no detail or review payload, so no detail or review charge rides on a compact row). NEW rows stay full. Default OFF.",
            "default": false
          },
          "expireAfterMissedScans": {
            "title": "Expire after N missed scans (incremental mode only)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "With Incremental mode and Push EXPIRED tombstones ON: a hotel is tombstoned only after it was missing from this many CONSECUTIVE complete scans (default 1 = the first complete scan that misses it). EXPIRED means the search no longer returned the hotel; it does not prove the hotel is unavailable, since a result-pool resample and a delisting look the same without a detail probe.",
            "default": 1
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "With Incremental mode ON, dataset fields listed here never count as a change (they are excluded from changeType/changedFields while staying in the output). Top-level names (e.g. badges) or dotted paths into a list (e.g. rooms.roomPromotions drops that key from every room, the rest of the room is still compared). Built-in defaults already cover the scrape timestamp and the image URLs (images, image), and lists whose order the site reshuffles are compared order-independently.",
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize a connector once under Apify -> Settings -> Integrations, then select it here. The connector receives a condensed, human-readable summary per item (title + key fields), not the full JSON, the complete record stays in the dataset. Leave empty to skip. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com)."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL (or id) of the Notion page under which item pages are created. Required to enable the Notion export, ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on items written to each connector per run. Does not affect the dataset.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}