{
  "openapi": "3.0.1",
  "info": {
    "title": "Tripadvisor Scraper - Hotels, Restaurants, Attractions, Reviews",
    "description": "Scrape Tripadvisor reviews of hotels, restaurants and attractions (rating, full text, trip type, date of stay, sub-ratings, owner response) and lists of places by city (rating, review count, ranking, price, address, coordinates). Monitor mode outputs only new reviews.",
    "version": "0.1",
    "x-build-id": "UhCNqf0Yczz9sGyq7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rjmacarthy~tripadvisor-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rjmacarthy-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/rjmacarthy~tripadvisor-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rjmacarthy-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/rjmacarthy~tripadvisor-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rjmacarthy-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 row per review of the pages in \"Tripadvisor URLs\". \"places\": one row per place for the \"Locations\" or list URLs.",
            "default": "reviews"
          },
          "urls": {
            "title": "Tripadvisor URLs",
            "type": "array",
            "description": "Reviews mode: hotel, restaurant or attraction pages (URLs containing Hotel_Review, Restaurant_Review or Attraction_Review). Places mode: list pages such as https://www.tripadvisor.com/Hotels-g189158-Lisbon_Lisbon_District_Central_Portugal-Hotels.html (Hotels-, Restaurants- or Attractions- URLs). Any Tripadvisor country domain works; data is read from tripadvisor.com in English.",
            "items": {
              "type": "string"
            }
          },
          "maxReviews": {
            "title": "Max reviews per place",
            "minimum": 0,
            "type": "integer",
            "description": "Newest reviews first. One Tripadvisor page holds 10 reviews (15 for restaurants). 0 = every review (can be thousands).",
            "default": 50
          },
          "minDate": {
            "title": "Only reviews published on or after",
            "type": "string",
            "description": "Optional, YYYY-MM-DD. Paging stops at the first older review, so you only pay for the pages needed."
          },
          "languages": {
            "title": "Review languages",
            "type": "array",
            "description": "Optional, e.g. [\"en\", \"pt\"]: keep only reviews originally written in these languages (2-letter codes). Empty = all languages. Tripadvisor.com shows non-English reviews machine-translated into English; the \"language\" field always holds the original language and \"isMachineTranslated\" says whether the text is a translation. The filter is applied after download, so a rare language needs more pages.",
            "items": {
              "type": "string"
            }
          },
          "monitorMode": {
            "title": "Monitor mode",
            "enum": [
              "all",
              "new"
            ],
            "type": "string",
            "description": "For scheduled runs: \"new\" remembers every review it outputs and next time outputs only newer ones, stopping at the first known review (usually after 1 page per place).",
            "default": "all"
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Separate memory for each monitor. Use one name per schedule (e.g. \"my-hotels-and-rivals\").",
            "default": "default"
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Places mode: destinations as you would type them on Tripadvisor, e.g. \"Lisbon\", \"Paris\", \"New York City\". The best match is used (one extra page request per location); check \"resolvedLocation\" in the run summary.",
            "items": {
              "type": "string"
            }
          },
          "placeType": {
            "title": "Place type",
            "enum": [
              "hotels",
              "restaurants",
              "attractions"
            ],
            "type": "string",
            "description": "Places mode, for \"Locations\". A list URL already says what it lists.",
            "default": "hotels"
          },
          "maxItems": {
            "title": "Max places per location",
            "minimum": 0,
            "type": "integer",
            "description": "Places mode. One list page holds 30 places. 0 = no limit.",
            "default": 100
          },
          "includeSponsored": {
            "title": "Include sponsored places",
            "type": "boolean",
            "description": "Places mode: also output paid placements (flagged \"isSponsored\"). They can be outside the location you asked for.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Pages in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Tripadvisor pages fetched at the same time. Each page takes about 3-15 seconds.",
            "default": 5
          },
          "maxZyteRequests": {
            "title": "Max page requests per run",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Safety cap on pages fetched per run. 0 = automatic (the pages your limits need plus 20%; 2,000 when a limit is 0). You are charged per row output, never per page. Free Apify plan: capped at 5 pages per run (upgrade to any paid plan for unlimited runs).",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}