{
  "openapi": "3.0.1",
  "info": {
    "title": "Tripadvisor Reviews Scraper",
    "description": "Scrape every Tripadvisor review for any hotel, restaurant, attraction or tour. Just add URLs and get the rating, title, full text, language, stay date, trip type, photos, helpful votes, owner responses and reviewer profile. Filter by language, rating or keyword. $0.40 per 1,000 reviews.",
    "version": "1.0",
    "x-build-id": "3RHhdA2qtX0oZ0AQ5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/boncross~tripadvisor-reviews/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-boncross-tripadvisor-reviews",
        "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/boncross~tripadvisor-reviews/runs": {
      "post": {
        "operationId": "runs-sync-boncross-tripadvisor-reviews",
        "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/boncross~tripadvisor-reviews/run-sync": {
      "post": {
        "operationId": "run-sync-boncross-tripadvisor-reviews",
        "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": {
          "locations": {
            "title": "Tripadvisor URLs or location ids",
            "type": "array",
            "description": "The places to scrape. Paste the address of any Tripadvisor hotel, restaurant, attraction or tour page, or just the numeric location id. Destination pages (the ones with a g-number and no place) have no review list of their own.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (bulk upload)",
            "type": "array",
            "description": "Tripadvisor page addresses, with the option to load them in bulk from a file, a Google Sheet or a remote list. Use this when you have more links than you want to paste. Combined with anything in the list above.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxReviewsPerLocation": {
            "title": "Maximum reviews per place",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many reviews for each place. Set it high to take everything; the scraper reaches the last review a place has. Set 0 for no reviews at all when you only want questions or tips (turn on includeQuestions or includeTips below); 0 with both off stops the run straight away.",
            "default": 100
          },
          "maxItems": {
            "title": "Maximum results for the whole run",
            "minimum": 0,
            "type": "integer",
            "description": "A run-wide ceiling across every target. The per-target limits apply to each one separately, so ten targets at 50 each returns 500; set this to cap the total. It counts every row charged for: reviews, and questions and tips when those are switched on (reviews come first for each place). Zero means no run-wide limit. Rows that report an input the actor could not resolve are not counted here and are never charged for.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "recent",
              "relevant"
            ],
            "type": "string",
            "description": "Newest first reads the review list in date order. Tripadvisor's own order leads with the reviews it promotes.",
            "default": "recent"
          },
          "reviewLanguages": {
            "title": "Languages",
            "type": "array",
            "description": "Keep only reviews written in these languages, as two-letter codes such as en, fr, de, es, it, pt, ja. Tips follow the same list when they are switched on. Leave empty for every language.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "ratings": {
            "title": "Ratings",
            "type": "array",
            "description": "Keep only reviews with these star ratings, from 1 to 5. Leave empty for all ratings.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "containsText": {
            "title": "Contains keyword",
            "type": "string",
            "description": "Keep only reviews mentioning this word or phrase, for example breakfast or rooftop bar.",
            "default": ""
          },
          "reviewedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "Keep only reviews published on or after this date, as YYYY-MM-DD. Questions and tips, when switched on, follow the same date. Pair it with newest first and the run stops as soon as it has passed the date.",
            "default": ""
          },
          "onlyWithOwnerResponse": {
            "title": "Only reviews with an owner response",
            "type": "boolean",
            "description": "Keep only reviews the business has replied to.",
            "default": false
          },
          "tripTypes": {
            "title": "Trip types",
            "type": "array",
            "description": "Keep only reviews from these kinds of trip: FAMILY, COUPLES, SOLO, BUSINESS or FRIENDS. Applied by Tripadvisor itself, so filtered runs cost less. Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "stayMonths": {
            "title": "Months of visit",
            "type": "array",
            "description": "Keep only reviews whose visit fell in these months, as numbers from 1 to 12. Applied by Tripadvisor itself, so filtered runs cost less. Useful for seasonal comparisons.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "recentDays": {
            "title": "Only the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "A shortcut for the published-after date. Set 30 to take only the last month of reviews.",
            "default": 0
          },
          "startOffset": {
            "title": "Start from review number",
            "minimum": 0,
            "type": "integer",
            "description": "Skip this many reviews before collecting. Use it to resume a large job.",
            "default": 0
          },
          "machineTranslate": {
            "title": "Include Tripadvisor's translations",
            "type": "boolean",
            "description": "When on, reviews written in other languages come back with Tripadvisor's translation applied. Turn it off to keep the original wording only.",
            "default": true
          },
          "includeReviewerProfile": {
            "title": "Include reviewer details",
            "type": "boolean",
            "description": "When off, reviewer name, username, id, avatar and hometown are left empty. Turn it off if you do not want personal data in your dataset.",
            "default": true
          },
          "includeLocationFacts": {
            "title": "Add the place's own rating and review count",
            "type": "boolean",
            "description": "Adds one extra request per place so every review row also carries the place's name, overall rating and total review count.",
            "default": true
          },
          "includeQuestions": {
            "title": "Add questions and answers",
            "type": "boolean",
            "description": "Adds one row per traveller question asked about the place, newest first, each carrying every answer it received (text, date, upvotes and who answered), the asker and the question's language. Question rows carry dataType \"question\" and are charged per question; review rows are unchanged.",
            "default": false
          },
          "maxQuestionsPerLocation": {
            "title": "Maximum questions per place",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many questions for each place when questions are switched on. Set it high to take every question a place has.",
            "default": 100
          },
          "includeTips": {
            "title": "Add traveller tips",
            "type": "boolean",
            "description": "Adds one row per short tip travellers left with their review (\"go early\", \"book the river-view room\"), newest first, with the month of the visit, the tip's author and the id of the review it came with. Tip rows carry dataType \"tip\" and are charged per tip; review rows are unchanged.",
            "default": false
          },
          "maxTipsPerLocation": {
            "title": "Maximum tips per place",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many tips for each place when tips are switched on. Set it high to take every tip a place has.",
            "default": 100
          },
          "onlyNewReviews": {
            "title": "Only reviews not seen in earlier runs",
            "type": "boolean",
            "description": "Skip reviews already returned by a previous run. Needs a de-duplication store name.",
            "default": false
          },
          "dedupStoreName": {
            "title": "De-duplication store name",
            "type": "string",
            "description": "Name of a key-value store that remembers which reviews have already been returned, so a scheduled run gives you only what is new.",
            "default": ""
          },
          "delayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional pause before each call, in milliseconds. 0 (the default) runs as fast as the parallel limit allows.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many requests run at once across the whole run. The default is the fastest level measured clean; lower it only if a run reports refusals or errors.",
            "default": 32
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}