{
  "openapi": "3.0.1",
  "info": {
    "title": "Tripadvisor Hotel Scraper — Hotels, Reviews · Travel Data API",
    "description": "Scrape Tripadvisor hotel listings with price, rating, ranking and optional reviews. Five search modes (geoId, location text, lat/lng, bounding box, URL/ID). Hospitality KPIs (avg rating, price/rank distribution) + HTML report.",
    "version": "1.0",
    "x-build-id": "cODNo7rehP3XA2UNG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~tripadvisor-hotel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-tripadvisor-hotel-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/sian.agency~tripadvisor-hotel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-tripadvisor-hotel-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/sian.agency~tripadvisor-hotel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-tripadvisor-hotel-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": {
          "searchMode": {
            "title": "🧭 Search Mode",
            "enum": [
              "bygeoid",
              "bylocation",
              "bycoordinates",
              "byboundingbox",
              "byid",
              "byurl"
            ],
            "type": "string",
            "description": "How to specify the hotels you want.\n\n• **bygeoid** — by Tripadvisor numeric geo ID (e.g. 187147 for Paris)\n• **bylocation** — by free-text location (e.g. \"Paris\", \"Tokyo\")\n• **bycoordinates** — by lat/lng + radius (km)\n• **byboundingbox** — by north,east,south,west bbox\n• **byid** — fetch one hotel by locationId\n• **byurl** — fetch one hotel by Tripadvisor URL",
            "default": "bylocation"
          },
          "location": {
            "title": "🌍 Location (free text)",
            "type": "string",
            "description": "City, region, or country name. Used when Search Mode = bylocation. Example: \"Paris\", \"New York\", \"Bali\"."
          },
          "geoId": {
            "title": "📍 Geo ID",
            "minimum": 1,
            "type": "integer",
            "description": "Numeric Tripadvisor geo ID. Example: 187147 = Paris, 60763 = New York City, 294229 = Bali."
          },
          "latitude": {
            "title": "🌐 Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Center latitude for radial search."
          },
          "longitude": {
            "title": "🌐 Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Center longitude for radial search."
          },
          "radius": {
            "title": "📏 Radius (km)",
            "minimum": 0.1,
            "maximum": 50,
            "type": "number",
            "description": "Search radius in kilometers. Default 5 km. Range 0.1–50.",
            "default": 5
          },
          "boundingBox": {
            "title": "🗺 Bounding Box (n,e,s,w)",
            "type": "string",
            "description": "Geographic bounding box as four comma-separated decimal degrees: north,east,south,west. Example: \"48.90,2.42,48.81,2.22\"."
          },
          "locationId": {
            "title": "🆔 Hotel ID",
            "minimum": 1,
            "type": "integer",
            "description": "Tripadvisor numeric hotel ID (the value after \"-d\" in any hotel review URL)."
          },
          "locationIds": {
            "title": "📋 Bulk Hotel IDs (PAID)",
            "uniqueItems": true,
            "type": "array",
            "description": "Array of numeric hotel IDs for bulk detail extraction. PAID tier only.",
            "items": {
              "type": "string"
            }
          },
          "url": {
            "title": "🔗 Hotel URL",
            "type": "string",
            "description": "Full Tripadvisor hotel URL (https://www.tripadvisor.com/Hotel_Review-g…-d…)."
          },
          "urls": {
            "title": "📋 Bulk Hotel URLs (PAID)",
            "uniqueItems": true,
            "type": "array",
            "description": "Array of Tripadvisor hotel URLs for bulk detail extraction. PAID tier only.",
            "items": {
              "type": "string"
            }
          },
          "checkIn": {
            "title": "📅 Check-in date",
            "type": "string",
            "description": "Optional check-in date (YYYY-MM-DD). When provided with checkOut, price quotes reflect those dates."
          },
          "checkOut": {
            "title": "📅 Check-out date",
            "type": "string",
            "description": "Optional check-out date (YYYY-MM-DD)."
          },
          "adults": {
            "title": "👥 Adults",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Number of adult guests (1–16). Default 2.",
            "default": 2
          },
          "rooms": {
            "title": "🛏 Rooms",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Number of rooms (1–8). Default 1.",
            "default": 1
          },
          "currency": {
            "title": "💱 Currency",
            "type": "string",
            "description": "ISO currency code for price quotes (e.g. USD, EUR, GBP). Default USD.",
            "default": "USD"
          },
          "maxResults": {
            "title": "📊 Max results per query",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Hard cap on hotels returned per query. Auto-paginates until the cap is reached or the search is fully drained. Default 30 = one API page. FREE tier is always capped at 25 hotels per run.",
            "default": 30
          },
          "fetchReviews": {
            "title": "📝 Include reviews (PAID)",
            "type": "boolean",
            "description": "When ON, fetches up to 20 reviews per hotel (1 extra API call per hotel). Adds a ReviewExtracted charge per review pushed. Disabled on FREE tier. Hard upstream cap: 20 reviews per hotel.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}