{
  "openapi": "3.0.1",
  "info": {
    "title": "Tripadvisor Scraper",
    "description": "Scrape Tripadvisor.com — hotels, restaurants, attractions, vacation rentals. Autocomplete, free-text location resolver, hotel search (geoId / coords / polygon), details by locationId or URL, and reviews. One row per result with photo, rating, price, Tripadvisor URL and Raw JSON.",
    "version": "1.0",
    "x-build-id": "P5SJAtzAUme30GoZ1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/one-api~tripadvisor-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-one-api-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/one-api~tripadvisor-scraper/runs": {
      "post": {
        "operationId": "runs-sync-one-api-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/one-api~tripadvisor-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-one-api-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": {
          "autocomplete_inputs": {
            "title": "Autocomplete queries (one per line)",
            "type": "array",
            "description": "Universal Tripadvisor search-box typeahead. Returns locationId + name + parent geo + photo + URL for each match. Use the searchType filter below to scope by vertical (HOTELS, RESTAURANTS, ATTRACTIONS, VACATION_RENTALS, GEO, AIRPORTS, ...). Great for resolving a free-text city/POI to a canonical Tripadvisor locationId before calling search_hotels / details_byid.",
            "items": {
              "type": "string"
            }
          },
          "autocomplete_searchType": {
            "title": "Autocomplete vertical",
            "enum": [
              "ALL",
              "HOTELS",
              "RESTAURANTS",
              "ATTRACTIONS",
              "VACATION_RENTALS",
              "GEO",
              "AIRPORTS",
              "AIRLINES",
              "CRUISES"
            ],
            "type": "string",
            "description": "Limits autocomplete to one Tripadvisor vertical. Defaults to ALL.",
            "default": "ALL"
          },
          "autocomplete_resultCount": {
            "title": "Autocomplete results per query",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "How many typeahead matches to return per input. Tripadvisor caps at 25.",
            "default": 10
          },
          "search_bylocation_inputs": {
            "title": "Free-text location to resolve + enrich (one per line)",
            "type": "array",
            "description": "Deterministic free-text resolver: takes a city/region/POI string (e.g. `Paris`, `New York City`, `Eiffel Tower`), resolves it to the canonical Tripadvisor locationId via typeahead, then enriches it with the full location detail (lat/lng, parent geo, official URL, photos). One dataset row per input.",
            "items": {
              "type": "string"
            }
          },
          "search_hotels_inputs": {
            "title": "Hotel search inputs (one per line)",
            "type": "array",
            "description": "Paginated Tripadvisor hotel search. Auto-detects each entry:\n• `60763` (digits = Tripadvisor geoId — use Autocomplete or Search-by-location to find one)\n• `40.713,-74.005,5` (lat,lng,radius_miles — circle search)\n• `40.6,-74.1;40.6,-73.9;40.8,-73.9;40.8,-74.1` (polygon — `lat,lng;lat,lng;...` with ≥3 points)\n\nReturns hotels with rating, review count, price range, ranking, address, phone, photo, and tripadvisorUrl per row. Use `search_hotels_resultCount` + `search_hotels_pages` below to control volume.",
            "items": {
              "type": "string"
            }
          },
          "search_hotels_resultCount": {
            "title": "Hotels per page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Hotels returned per page (Tripadvisor caps at 100, defaults to 30).",
            "default": 30
          },
          "search_hotels_pages": {
            "title": "Hotel-search pages per input",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of pages to fetch per hotel-search input. Page size × pages = total hotels.",
            "default": 1
          },
          "search_hotels_sortOrder": {
            "title": "Hotel sort order",
            "enum": [
              "BEST_VALUE",
              "PRICE_LOW_TO_HIGH",
              "PRICE_HIGH_TO_LOW",
              "TRAVELER_RANKING",
              "DISTANCE"
            ],
            "type": "string",
            "description": "How to sort hotel results. `BEST_VALUE` is Tripadvisor's default.",
            "default": "BEST_VALUE"
          },
          "search_hotels_priceRange": {
            "title": "Hotel price range (USD per night)",
            "type": "string",
            "description": "`min:100`, `max:500`, or `min:100,max:500`. Filter on nightly price.",
            "default": ""
          },
          "search_hotels_minRating": {
            "title": "Minimum traveler rating (0–5)",
            "type": "string",
            "description": "Filter hotels by minimum bubble rating. Empty = no filter. Example: `4` for hotels rated 4.0 or higher.",
            "default": ""
          },
          "search_hotels_currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "JPY",
              "CNY",
              "INR",
              "AED",
              "BRL",
              "MXN"
            ],
            "type": "string",
            "description": "ISO currency code used for prices in the response.",
            "default": "USD"
          },
          "details_byid_inputs": {
            "title": "Tripadvisor locationIds (one per line)",
            "type": "array",
            "description": "Pull the full location detail for a Tripadvisor locationId (city, hotel, restaurant, attraction, vacation rental). Returns placeType, lat/lng, parent geo, photos, official URL, contact info. One dataset row per locationId.",
            "items": {
              "type": "string"
            }
          },
          "details_byurl_inputs": {
            "title": "Tripadvisor URLs (one per line)",
            "type": "array",
            "description": "Pull full location detail for a Tripadvisor URL. Works on:\n• `/Hotel_Review-...-Reviews-...html`\n• `/Restaurant_Review-...html`\n• `/Attraction_Review-...html`\n• `/VacationRentalReview-...html`\nThe `-dXXXXX` segment in the path is parsed as the locationId.",
            "items": {
              "type": "string"
            }
          },
          "reviews_inputs": {
            "title": "locationIds for reviews (one per line)",
            "type": "array",
            "description": "Pull traveler reviews for a hotel / restaurant / attraction / vacation rental. Each review (author, date, rating, title, text, trip type, owner response) is pushed as its own dataset row. Use `reviews_contentType` below to set the entity vertical and `reviews_resultCount` to cap items.",
            "items": {
              "type": "string"
            }
          },
          "reviews_contentType": {
            "title": "Reviews entity type",
            "enum": [
              "HOTEL",
              "RESTAURANT",
              "ATTRACTION",
              "VACATION_RENTAL"
            ],
            "type": "string",
            "description": "Tripadvisor splits review storage by entity vertical. Pick the type that matches the locationIds you entered above.",
            "default": "HOTEL"
          },
          "reviews_resultCount": {
            "title": "Max reviews per locationId",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap total reviews fetched per locationId (1–100).",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}