{
  "openapi": "3.0.1",
  "info": {
    "title": "Expedia Hotel Data Scraper",
    "description": "Collect hotel names, descriptions, overall ratings, and review counts from Expedia property pages.",
    "version": "1.0",
    "x-build-id": "kBqA7B1TKyflF4gCE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchfinch~expedia-hotel-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchfinch-expedia-hotel-data-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/fetchfinch~expedia-hotel-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fetchfinch-expedia-hotel-data-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/fetchfinch~expedia-hotel-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fetchfinch-expedia-hotel-data-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": "Data to collect",
            "enum": [
              "hotel",
              "reviews"
            ],
            "type": "string",
            "description": "Hotel details is the reliable default. Reviews mode uses Expedia's GraphQL endpoint and may be rate limited.",
            "default": "hotel"
          },
          "startUrl": {
            "title": "Expedia hotel URL",
            "type": "string",
            "description": "One Expedia Hotel-Information page URL.",
            "default": "https://www.expedia.com/Vienna-Hotels-Holiday-Inn-Vienna-City.h2530.Hotel-Information"
          },
          "startUrls": {
            "title": "Additional hotel URLs",
            "maxItems": 1,
            "type": "array",
            "description": "A single URL is accepted per run. The code enforces this limit to control run time and proxy costs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "hotelId": {
            "title": "Expedia hotel ID",
            "pattern": "^[0-9]+$",
            "type": "string",
            "description": "Numeric Expedia hotel ID. If provided, this takes precedence over the ID in the URL."
          },
          "hotelName": {
            "title": "Hotel name override",
            "type": "string",
            "description": "Optional name override when using hotelId-only input."
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 15,
            "maximum": 180,
            "type": "integer",
            "description": "The hotel page can take over a minute to return through the Unlocker.",
            "default": 120
          },
          "maxRetries": {
            "title": "Retries for temporary failures",
            "minimum": 0,
            "maximum": 1,
            "type": "integer",
            "description": "At most one retry is allowed per hotel, even if a larger value is supplied.",
            "default": 1
          },
          "proxyConfiguration": {
            "title": "Apify proxy fallback",
            "type": "object",
            "description": "Used only when the actor's Bright Data Web Unlocker credentials are not configured.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "proxyUrl": {
            "title": "Custom proxy URL",
            "type": "string",
            "description": "Optional proxy URL for a run. When provided, it overrides the actor's Web Unlocker configuration."
          },
          "proxyUrls": {
            "title": "Custom proxy URLs",
            "type": "array",
            "description": "Optional secret list of proxy URLs; one is selected per retry."
          },
          "results_wanted": {
            "title": "Maximum reviews (reviews mode)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Only used in experimental reviews mode.",
            "default": 20
          },
          "max_pages": {
            "title": "Maximum review pages (reviews mode)",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "Only used in experimental reviews mode.",
            "default": 1
          },
          "review_sort": {
            "title": "Review order (reviews mode)",
            "enum": [
              "none",
              "most_relevant",
              "most_recent",
              "highest_rating",
              "lowest_rating"
            ],
            "type": "string",
            "description": "Sort order for the one experimental review page.",
            "default": "most_recent"
          },
          "pageSize": {
            "title": "Reviews requested (reviews mode)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum of 20 reviews per request in experimental reviews mode.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}