{
  "openapi": "3.0.1",
  "info": {
    "title": "Trip.com Scraper",
    "description": "Extract Trip.com hotels with live prices for your check-in and check-out dates: nightly and total price, star level, guest rating with cleanliness, location and service sub-scores, addresses, coordinates and guest reviews. Export data, run via API or schedule runs.",
    "version": "0.1",
    "x-build-id": "7LpLSPoqW32Khj6AI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lergassy~tripcom-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lergassy-tripcom-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/lergassy~tripcom-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lergassy-tripcom-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/lergassy~tripcom-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lergassy-tripcom-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": {
          "mode": {
            "title": "🧭 What to scrape",
            "enum": [
              "auto",
              "hotels",
              "details"
            ],
            "type": "string",
            "description": "<b>Hotels in a city</b> – the hotel list with live prices for your dates. <b>Hotel details</b> – address, rating and price range for hotel URLs. <b>Auto</b> decides by what you paste.",
            "default": "auto"
          },
          "cityId": {
            "title": "🌍 Trip.com city ID",
            "type": "integer",
            "description": "Numeric Trip.com city id — the exact way to pick a destination. Open the city on trip.com and copy the number from the URL: <code>/hotels/bali-hotels-list-<b>723</b>/</code>."
          },
          "cityName": {
            "title": "City name (label)",
            "type": "string",
            "description": "City to search, for the destinations Trip.com links from its own pages (Bali, Bangkok, Tokyo, Singapore, Hong Kong, London, Paris, New York and about twenty more). Trip.com has no public search by name, so anything else must be given as <b>City ID</b> below."
          },
          "checkIn": {
            "title": "📅 Check-in date",
            "type": "string",
            "description": "Date of arrival as <code>YYYY-MM-DD</code>. Prices only appear when both dates are set."
          },
          "checkOut": {
            "title": "📅 Check-out date",
            "type": "string",
            "description": "Date of departure as <code>YYYY-MM-DD</code>."
          },
          "startUrls": {
            "title": "🔗 Trip.com URLs",
            "type": "array",
            "description": "Hotel list URLs (<code>trip.com/hotels/list?city=…</code>) or single hotel URLs (<code>trip.com/hotels/detail/?hotelId=…</code>). Mix freely.",
            "items": {
              "type": "string"
            }
          },
          "maxHotels": {
            "title": "💯 Max hotels",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many hotels per city or list URL.",
            "default": 40
          },
          "includeHotelDetails": {
            "title": "Fetch hotel details for every result ($)",
            "type": "boolean",
            "description": "Open each hotel page for the full address, postcode, country, star level and price range. Slower and billed per hotel detail.",
            "default": false
          },
          "includeReviews": {
            "title": "⭐ Collect guest reviews ($)",
            "type": "boolean",
            "description": "Open each hotel page and collect the guest reviews published on it, with text, author and date.",
            "default": false
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Guests per room.",
            "default": 2
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Children per room.",
            "default": 0
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of rooms to price.",
            "default": 1
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "SGD",
              "IDR",
              "THB",
              "MYR",
              "PHP",
              "VND",
              "AUD",
              "JPY",
              "HKD",
              "CNY",
              "INR",
              "AED"
            ],
            "type": "string",
            "description": "Currency for the prices.",
            "default": "USD"
          },
          "maxPages": {
            "title": "Max list pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many pages of the hotel list to walk.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Trip.com is served worldwide; the shared datacenter proxy is enough. Switch to residential only if you see repeated failures.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}