{
  "openapi": "3.0.1",
  "info": {
    "title": "Agoda Hotels Scraper",
    "description": "Agoda hotels by city or by URL: search a destination for every hotel with prices, or get full details and every room rate for your dates, price calendar, any currency. From $2.20 per 1,000 listings.",
    "version": "0.1",
    "x-build-id": "yvTxIGlRaAwzaqKX7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidyharvest~agoda-hotels-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidyharvest-agoda-hotels-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/tidyharvest~agoda-hotels-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tidyharvest-agoda-hotels-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/tidyharvest~agoda-hotels-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tidyharvest-agoda-hotels-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": {
          "hotelUrls": {
            "title": "Hotels (URL, ID or name)",
            "type": "array",
            "description": "One Agoda hotel per line: page URL, numeric hotel ID, or hotel name. Leave empty if you only search destinations.",
            "items": {
              "type": "string"
            }
          },
          "matchesPerName": {
            "title": "Hotels per name search",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "When a line is a hotel name, how many matching hotels to use (best matches first). 1 = just the top match.",
            "default": 1
          },
          "destinations": {
            "title": "Destinations (city names)",
            "type": "array",
            "description": "One city per line, for example Bangkok or Lisbon, Portugal (or city:10647 with an Agoda city ID). Returns the city's hotels with the cheapest price for your stay. No check-in date given = priced for a stay 14 days from now.",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Destination order",
            "enum": [
              "recommended",
              "price_low_to_high",
              "price_high_to_low",
              "review_high_to_low",
              "stars_high_to_low",
              "most_reviewed",
              "closest_to_center"
            ],
            "type": "string",
            "description": "Order of the hotels in a destination search.",
            "default": "recommended"
          },
          "maxHotelsPerDestination": {
            "title": "Max hotels per destination",
            "minimum": 1,
            "type": "integer",
            "description": "Cap for each city and each check-in date (45 hotels per page of results).",
            "default": 100
          },
          "includeDetails": {
            "title": "Full details for every hotel found",
            "type": "boolean",
            "description": "Off: one light row per hotel (name, stars, area, score, price). On: the full hotel record with all room rates, billed as a full hotel row.",
            "default": false
          },
          "checkIn": {
            "title": "Check-in date",
            "type": "string",
            "description": "Add a stay to get live room prices. Leave empty for hotel details only (no prices)."
          },
          "nights": {
            "title": "Nights",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Length of stay (1-30).",
            "default": 1
          },
          "minReviewScore": {
            "title": "Minimum guest score (0-10)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Skip hotels scoring lower."
          },
          "checkInDates": {
            "title": "More check-in dates (price calendar)",
            "type": "array",
            "description": "Extra check-in dates, YYYY-MM-DD, one per line. Each hotel gets one row per date, so you can track prices across dates.",
            "items": {
              "type": "string"
            }
          },
          "checkInFrom": {
            "title": "Check-in range: from",
            "type": "string",
            "description": "With 'to', prices every check-in date in the range."
          },
          "checkInTo": {
            "title": "Check-in range: to",
            "type": "string",
            "description": "Last check-in date of the range."
          },
          "stepDays": {
            "title": "Range step (days)",
            "minimum": 1,
            "type": "integer",
            "description": "Days between check-in dates in the range (7 = weekly).",
            "default": 1
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Adults per room.",
            "default": 2
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of children.",
            "default": 0
          },
          "childAges": {
            "title": "Children's ages",
            "type": "array",
            "description": "One age per child, one per line (needed for exact family pricing).",
            "items": {
              "type": "string"
            }
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Number of rooms.",
            "default": 1
          },
          "currency": {
            "title": "Show prices in",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "AUD",
              "CAD",
              "SGD",
              "THB",
              "JPY",
              "IDR",
              "MYR",
              "PHP",
              "INR",
              "KRW",
              "HKD",
              "TWD",
              "CNY",
              "CHF",
              "NZD",
              "SEK",
              "NOK",
              "DKK",
              "PLN",
              "CZK",
              "HUF",
              "TRY",
              "ZAR",
              "BRL",
              "MXN",
              "ILS"
            ],
            "type": "string",
            "description": "Agoda quotes in US dollars; other currencies are converted at the day's European Central Bank rate (the rate is added to each row).",
            "default": "USD"
          },
          "market": {
            "title": "Price market (country)",
            "enum": [
              "",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "GB",
              "AU",
              "CA",
              "SG",
              "TH",
              "JP",
              "IN",
              "MY",
              "ID",
              "PH",
              "VN",
              "KR",
              "HK",
              "TW",
              "AE",
              "BR",
              "MX"
            ],
            "type": "string",
            "description": "Agoda shows prices in the currency of the visitor's country, and the price can differ by market. Pick a country to get the prices (and currency) a visitor from there would see.",
            "default": ""
          },
          "includeRoomTypes": {
            "title": "Include room types",
            "type": "boolean",
            "description": "Room type list with size, beds, occupancy and amenities.",
            "default": true
          },
          "includePhotos": {
            "title": "Include photo links",
            "type": "boolean",
            "description": "Hotel photo URLs.",
            "default": true
          },
          "onlyAvailable": {
            "title": "Only hotels with rooms for the dates",
            "type": "boolean",
            "description": "Skip hotel rows that have no bookable room for the stay.",
            "default": false
          },
          "maxPricePerNight": {
            "title": "Max price per night",
            "minimum": 0,
            "type": "number",
            "description": "Skip hotels whose cheapest rate per night is above this (in the chosen currency). Needs a check-in date."
          },
          "minStars": {
            "title": "Minimum star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Skip hotels with fewer stars."
          },
          "maxItems": {
            "title": "Max rows in total",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on rows for the whole run (also caps your cost). 0 or empty = no limit."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Agoda refuses most cloud IPs, so the default is Apify proxy (datacenter first, residential only if that is blocked).",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}