{
  "openapi": "3.0.1",
  "info": {
    "title": "Agoda Hotel Scraper — Hotels, Rooms & Reviews API",
    "description": "Scrape Agoda hotel listings with star rating, guest score, review count, nightly price and property type. Search by location, coordinates, or URL, plus location autocomplete. Opt-in room rates, availability, price calendar and guest reviews.",
    "version": "1.0",
    "x-build-id": "HhDzPwq2cR0maQNRV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~agoda-hotel-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-agoda-hotel-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/sian.agency~agoda-hotel-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-agoda-hotel-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/sian.agency~agoda-hotel-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-agoda-hotel-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": {
          "searchMode": {
            "title": "🧭 Search Mode",
            "enum": [
              "bylocation",
              "bycoordinates",
              "byurl",
              "autocomplete"
            ],
            "type": "string",
            "description": "How to specify the hotels you want.\n\n• **bylocation** — by free-text location (e.g. \"Bangkok\", \"Bali\") — paginated\n• **bycoordinates** — by lat/lng + radius (km)\n• **byurl** — from an Agoda search / city URL\n• **autocomplete** — look up locations and their numeric city IDs",
            "default": "bylocation"
          },
          "location": {
            "title": "🌍 Location (free text)",
            "type": "string",
            "description": "City, region, or landmark name. Used when Search Mode = bylocation. Example: \"Bangkok\", \"Bali\", \"Tokyo\".",
            "default": "Bangkok"
          },
          "query": {
            "title": "🔎 Autocomplete Query",
            "type": "string",
            "description": "Partial location name to look up. Used when Search Mode = autocomplete. Returns matching cities/areas with their numeric city IDs."
          },
          "latitude": {
            "title": "🌐 Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Center latitude for radial search."
          },
          "longitude": {
            "title": "🌐 Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Center longitude for radial search."
          },
          "radius": {
            "title": "📏 Radius (km)",
            "minimum": 0.1,
            "maximum": 50,
            "type": "number",
            "description": "Search radius in kilometers. Default 5 km. Range 0.1–50.",
            "default": 5
          },
          "url": {
            "title": "🔗 Agoda URL",
            "type": "string",
            "description": "Full Agoda search or city URL (https://www.agoda.com/city/…-…​.html)."
          },
          "checkIn": {
            "title": "📅 Check-in date",
            "type": "string",
            "description": "Optional check-in date (YYYY-MM-DD). When provided with checkOut, price quotes reflect those dates."
          },
          "checkOut": {
            "title": "📅 Check-out date",
            "type": "string",
            "description": "Optional check-out date (YYYY-MM-DD)."
          },
          "adults": {
            "title": "👥 Adults",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Number of adult guests (1–30). Default 2.",
            "default": 2
          },
          "rooms": {
            "title": "🛏 Rooms",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of rooms (1–20). Default 1.",
            "default": 1
          },
          "currency": {
            "title": "💱 Currency",
            "type": "string",
            "description": "ISO currency code for price quotes (e.g. USD, EUR, GBP, THB). Default USD.",
            "default": "USD"
          },
          "sortOrder": {
            "title": "↕️ Sort Order",
            "type": "string",
            "description": "Optional Agoda sort key for search results. Leave blank for Agoda's default relevance ranking."
          },
          "maxResults": {
            "title": "📊 Max results per query",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Hard cap on hotels returned per query. Auto-paginates (bylocation) until the cap is reached or the search is fully drained. Default 30. FREE tier is always capped at 25 hotels per run.",
            "default": 30
          },
          "fetchRooms": {
            "title": "🛏 Include room rates & availability (PAID)",
            "type": "boolean",
            "description": "When ON, fetches every room type with its rate-plan offers (price, cancellation policy, breakfast, occupancy) plus a nightly price-trend calendar for each hotel. Adds a RoomRateExtracted charge per room row. Disabled on FREE tier.",
            "default": false
          },
          "fetchReviews": {
            "title": "📝 Include guest reviews (PAID)",
            "type": "boolean",
            "description": "When ON, fetches guest reviews per hotel (score, title, comment, traveller type, stay dates). Adds a ReviewExtracted charge per review pushed. Disabled on FREE tier.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}