{
  "openapi": "3.0.1",
  "info": {
    "title": "Tripadvisor Scraper API - Reviews, Hotels, Restaurants & Search",
    "description": "Scrape Tripadvisor at scale: reviews, hotels, restaurants, attractions. Two modes — paste a URL to extract reviews, or search by keyword + location to discover places (with optional reviews). Rating distribution, sub-ratings, owner responses, photos. Enterprise infrastructure. No login.",
    "version": "0.0",
    "x-build-id": "vNWcboNro51jqVtUf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/santhej~tripadvisor-scraper-pro/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-santhej-tripadvisor-scraper-pro",
        "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/santhej~tripadvisor-scraper-pro/runs": {
      "post": {
        "operationId": "runs-sync-santhej-tripadvisor-scraper-pro",
        "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/santhej~tripadvisor-scraper-pro/run-sync": {
      "post": {
        "operationId": "run-sync-santhej-tripadvisor-scraper-pro",
        "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": {
          "urls": {
            "title": "Tripadvisor URLs (reviews mode)",
            "maxItems": 100,
            "type": "array",
            "description": "Paste one or more Tripadvisor place URLs (hotels, restaurants, attractions, vacation rentals). The actor will pull reviews for each. Leave empty if you want search mode instead.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search keyword (search mode)",
            "type": "string",
            "description": "Keyword to search for on Tripadvisor — e.g. 'italian restaurants', 'luxury hotels', 'museums'. Combined with 'locationName' to discover places. Leave empty if you're using 'urls' mode."
          },
          "locationName": {
            "title": "Location (search mode)",
            "type": "string",
            "description": "Location to search in. MUST be in 3-part format 'City,Region,Country' — examples: 'New York,New York,United States', 'London,England,United Kingdom', 'Paris,Ile-de-France,France', 'Tokyo,Tokyo,Japan', 'Rome,Lazio,Italy'. Used together with 'searchQuery'. If empty, defaults to United States (overall)."
          },
          "locationCode": {
            "title": "Location code (alternative to locationName)",
            "type": "string",
            "description": "Numeric country/region code (e.g. '2840' for United States, '2826' for UK). Used only if 'locationName' is empty. ISO-style country codes from DataForSEO's location API."
          },
          "maxPlaces": {
            "title": "Max places to return (search mode)",
            "minimum": 1,
            "maximum": 700,
            "type": "integer",
            "description": "How many places to return from the search. Each charges 1 'place' event ($0.003). Default 20, max 700.",
            "default": 20
          },
          "includeReviewsForSearchedPlaces": {
            "title": "Also fetch reviews for searched places",
            "type": "boolean",
            "description": "If checked AND using search mode: for each place found, also pull reviews (up to 'maxReviewsPerPlace' each). Each review charges 1 'review' event ($0.0003).",
            "default": false
          },
          "maxReviewsPerPlace": {
            "title": "Max reviews per place",
            "minimum": 1,
            "maximum": 4490,
            "type": "integer",
            "description": "Maximum number of reviews to fetch per place. Applies to both 'urls' mode and 'includeReviewsForSearchedPlaces'. Default 50, max 4490 (Tripadvisor's per-place limit).",
            "default": 50
          },
          "priority": {
            "title": "Speed vs cost",
            "enum": [
              "standard",
              "high"
            ],
            "type": "string",
            "description": "'standard' = cheaper, may take up to 45 min for results. 'high' = ~1-minute turnaround, 2× the backend cost (your charges to Apify users are the same — just our internal margin shifts). Use 'high' for interactive use.",
            "default": "high"
          },
          "languageCode": {
            "title": "Language code",
            "type": "string",
            "description": "ISO 639-1 language code for search results (e.g. 'en', 'es', 'fr', 'de'). Affects which Tripadvisor regional version is queried.",
            "default": "en"
          },
          "maxBudgetUsd": {
            "title": "Max budget for this run (USD)",
            "minimum": 0.01,
            "type": "number",
            "description": "Optional safety cap. If set, the actor refuses to start runs whose estimated max charges exceed this. Leave empty for no cap."
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "If set, the actor POSTs a JSON run summary to this URL on completion. Useful for n8n, Make.com, Zapier, Slack."
          },
          "demoMode": {
            "title": "Demo / health-check mode",
            "type": "boolean",
            "description": "If checked, runs a health check WITHOUT making API calls. Useful to verify config without spending credits.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}