{
  "openapi": "3.0.1",
  "info": {
    "title": "Tripadvisor Scraper — Reviews, Hotels, Restaurants, Attractions",
    "description": "Scrape Tripadvisor reviews and hotel, restaurant and attraction data from any Tripadvisor URL or destination: ratings, rankings, addresses, hours, owner responses.",
    "version": "0.1",
    "x-build-id": "KDfdnS4knmkLUlpEd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tortuga~tripadvisor-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tortuga-tripadvisor-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/tortuga~tripadvisor-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tortuga-tripadvisor-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/tortuga~tripadvisor-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tortuga-tripadvisor-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": [
              "reviews",
              "places"
            ],
            "type": "string",
            "description": "reviews: one item per review (rating, title, text, dates, reviewer name and location as shown, owner response, photos). places: one item per hotel, restaurant or attraction (rating, ranking, address, coordinates, phone, website, cuisines, amenities, price level).",
            "default": "reviews"
          },
          "startUrls": {
            "title": "Tripadvisor URLs",
            "type": "array",
            "description": "Any Tripadvisor country domain. Place pages (Hotel_Review-..., Restaurant_Review-..., Attraction_Review-..., AttractionProductReview-...), list pages (Hotels-g187147-..., Restaurants-g187147-..., Attractions-g187147-...) or destination pages (Tourism-g187147-...). In reviews mode a list or destination stands for its top places (see Max places per list).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchQueries": {
            "title": "Destinations",
            "type": "array",
            "description": "City, region or country names, e.g. \"Lisbon\" or \"Tuscany\". Looked up with Tripadvisor's destination search; its places of the chosen types are scraped in Tripadvisor ranking order.",
            "items": {
              "type": "string"
            }
          },
          "placeTypes": {
            "title": "Place types for destinations",
            "type": "array",
            "description": "Which lists to read for destinations and Tourism-g... pages. Empty = hotels, restaurants and attractions. List URLs (Hotels-g..., Restaurants-g...) always use their own type.",
            "items": {
              "type": "string",
              "enum": [
                "hotels",
                "restaurants",
                "attractions"
              ],
              "enumTitles": [
                "Hotels",
                "Restaurants",
                "Things to do (attractions)"
              ]
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many items in total (reviews in reviews mode, places in places mode). You pay per item, so this caps the cost.",
            "default": 100
          },
          "maxReviewsPerPlace": {
            "title": "Max reviews per place",
            "minimum": 1,
            "type": "integer",
            "description": "Reviews mode: cap per place. Tripadvisor serves every review of a place (all years, all languages).",
            "default": 100
          },
          "maxPlacesPerSearch": {
            "title": "Max places per list",
            "minimum": 1,
            "type": "integer",
            "description": "How many places (Tripadvisor ranking order) are taken from each list URL and from each destination x place type. Empty = 20 in reviews mode; in places mode no per-list cap (Max items still applies)."
          },
          "reviewLanguages": {
            "title": "Review languages",
            "type": "array",
            "description": "Only reviews written in these languages (Tripadvisor codes: en, fr, de, es, it, pt, nl, ru, ja, ko, zhCN, zhTW, sv, da, no, pl, tr, el, iw, ar, ...). Empty = all languages, newest first. Filters by the review's original language.",
            "items": {
              "type": "string"
            }
          },
          "reviewsNewerThan": {
            "title": "Only reviews newer than",
            "type": "string",
            "description": "Only reviews newer than: a date (YYYY-MM-DD) or a period such as '7 days' or '24 hours'. Reviews are read newest first across all languages and paging stops once a whole page is older (review dates are days)."
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed items",
            "type": "boolean",
            "description": "Remember what earlier runs of this search returned and output only new items or items whose price/status changed. Use with a Schedule; unchanged items are not charged. Reviews: each run checks the newest 'Max reviews per place' reviews of every place and saves only reviews not seen before. Places: compared on rating, ranking position and closed status; with this on, Max items is the number of places watched.",
            "default": false
          },
          "monitoringKey": {
            "title": "Monitoring key",
            "type": "string",
            "description": "Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input."
          },
          "includeDetails": {
            "title": "Add rating breakdown to list places",
            "type": "boolean",
            "description": "Places mode: places from lists and destinations already have rating, ranking, address, contact and cuisines/amenities. This adds the rating breakdown (excellent ... terrible counts), photo count and local-language name and address. Place URLs always get them.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy (default) works: the scraper reads Tripadvisor's app API, which does not need residential or Unblocker proxies.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}