{
  "openapi": "3.0.1",
  "info": {
    "title": "TripAdvisor Hotel Reviews API",
    "description": "Scrape ALL reviews from any TripAdvisor hotel, restaurant, or attraction - a free, unlimited alternative to the official API (which returns only 3). Review text, ratings, dates, owner responses, per-review subratings, reviewer profiles, plus property details.",
    "version": "1.0",
    "x-build-id": "6NIynLQx5c0pRetGO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/factden~tripadvisor-hotel-reviews-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-factden-tripadvisor-hotel-reviews-api",
        "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/factden~tripadvisor-hotel-reviews-api/runs": {
      "post": {
        "operationId": "runs-sync-factden-tripadvisor-hotel-reviews-api",
        "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/factden~tripadvisor-hotel-reviews-api/run-sync": {
      "post": {
        "operationId": "run-sync-factden-tripadvisor-hotel-reviews-api",
        "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": "🎯 Mode",
            "enum": [
              "reviews",
              "discover"
            ],
            "type": "string",
            "description": "What do you want? **Reviews** = you have TripAdvisor URLs or Location IDs and want every review (plus each place's details). **Discover** = search by keyword and/or a city or country and get a list of places with their details. Fill the matching block below.",
            "default": "reviews"
          },
          "startUrls": {
            "title": "🔗 TripAdvisor URLs",
            "type": "array",
            "description": "TripAdvisor detail-page URLs, one per place, copy them from your browser. Works for **hotels** (`Hotel_Review`), **restaurants** (`Restaurant_Review`), **attractions** (`Attraction_Review`) and **airlines** (`Airline_Review`). A stale/merged URL self-heals to the current place. Note: airlines return reviews only, no official subratings or AI summary.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "locationIds": {
            "title": "🆔 …or Location IDs",
            "maxItems": 1000,
            "type": "array",
            "description": "TripAdvisor location IDs, the `d`-number in a URL (e.g. `1465497` from `…-d1465497-…`), for any place type. One ID per line, e.g. `1465497`, `1029199`, `190166`.",
            "items": {
              "type": "string"
            }
          },
          "maxReviews": {
            "title": "🔢 Max reviews per place",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap the reviews scraped per place (paginated, newest-first). Use a large number (e.g. `100000`) to get **all** reviews. A smaller number keeps a first run fast and cheap.",
            "default": 200
          },
          "reviewLanguages": {
            "title": "🗣️ Review languages",
            "type": "array",
            "description": "Only scrape reviews written in these languages (each has its own review count). Choose `All languages`, or pick specific ones.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "en",
                "es",
                "de",
                "fr",
                "it",
                "pt",
                "nl",
                "ru",
                "ja",
                "zh",
                "ko",
                "ar",
                "tr",
                "pl",
                "sv",
                "da",
                "no",
                "fi",
                "cs",
                "hu",
                "el",
                "he",
                "id",
                "sk",
                "sr",
                "th",
                "vi",
                "ro",
                "uk"
              ],
              "enumTitles": [
                "🌐 All languages",
                "English",
                "Spanish",
                "German",
                "French",
                "Italian",
                "Portuguese",
                "Dutch",
                "Russian",
                "Japanese",
                "Chinese",
                "Korean",
                "Arabic",
                "Turkish",
                "Polish",
                "Swedish",
                "Danish",
                "Norwegian",
                "Finnish",
                "Czech",
                "Hungarian",
                "Greek",
                "Hebrew",
                "Indonesian",
                "Slovak",
                "Serbian",
                "Thai",
                "Vietnamese",
                "Romanian",
                "Ukrainian"
              ]
            },
            "default": [
              "all"
            ]
          },
          "minRating": {
            "title": "⭐ Minimum rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Only keep reviews with at least this star rating (1-5). Set `minRating` = `maxRating` for a single rating (e.g. both 1 for complaints).",
            "default": 1
          },
          "maxRating": {
            "title": "⭐ Maximum rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Only keep reviews with at most this star rating (1-5). Leave at 5 with minRating 1 for all ratings.",
            "default": 5
          },
          "fromDate": {
            "title": "📅 Reviews from (date)",
            "type": "string",
            "description": "Lower bound (YYYY-MM-DD). Stop once reviews are older than this, perfect for a scheduled refresh. Leave empty to go as far back as available."
          },
          "toDate": {
            "title": "📅 Reviews to (date)",
            "type": "string",
            "description": "Upper bound (YYYY-MM-DD): only keep reviews on or before this date. Pair with **Reviews from** for a window, e.g. all of 2024."
          },
          "searchKeywords": {
            "title": "🔎 Keywords to search",
            "maxItems": 100,
            "type": "array",
            "description": "Used when Mode = Discover. Enter a **property name, brand, or keyword** (e.g. `Hilton`, `W Barcelona`, `Ritz Carlton`) and the actor returns the matching places directly. Type the full brand or venue word, a fragment like `Hil` will not match. One per line. Filtered to the **Place types** you select and capped by **Max places** per keyword. Scope results to a place with **City or country** below. To pull reviews for any match, take its Location ID into Reviews mode.",
            "items": {
              "type": "string"
            }
          },
          "searchLocation": {
            "title": "📍 City or country (optional)",
            "type": "string",
            "description": "Used when Mode = Discover. Scope the keyword results above to one place: enter a **city** (e.g. `Barcelona`) or a **country** (e.g. `Belgium`) and only matches there are kept, so `Hilton` + `Belgium` returns Belgian Hiltons. A **city** can also be used on its own (no keyword) to list all its places. A **country cannot be used alone**, pair it with a keyword. Use a full name like `United States`, not `US`."
          },
          "placeTypes": {
            "title": "🏨 Place types to discover",
            "type": "array",
            "description": "Which place types to pull when searching (Discover mode only).",
            "items": {
              "type": "string",
              "enum": [
                "hotels",
                "restaurants",
                "attractions"
              ],
              "enumTitles": [
                "🏨 Hotels",
                "🍽️ Restaurants",
                "🎟️ Attractions"
              ]
            },
            "default": [
              "hotels"
            ]
          },
          "maxPlaces": {
            "title": "🔢 Max places per search term",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Discover mode only: cap how many places to take per search term (split evenly across the selected types). Keeps a city search fast and predictable.",
            "default": 20
          },
          "discoveryDepth": {
            "title": "⚙️ Discovery detail",
            "enum": [
              "quick",
              "full"
            ],
            "type": "string",
            "description": "Discover mode only. **Quick** returns the fast city directory (name, rating, ranking, price, category, address, contact) with no per-place calls. **Full details** additionally fetches official subratings, the AI summary, and amenities for each place (slower).",
            "default": "quick"
          },
          "includePhotos": {
            "title": "📷 Include photos",
            "type": "boolean",
            "description": "Discover + Full details only: also fetch the photo gallery for each place (one extra request per place). Off by default to keep runs fast.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Proxy settings for outbound requests. The default (Apify Proxy, datacenter) is sufficient, the data endpoints are lightweight and not anti-bot gated.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}