{
  "openapi": "3.0.1",
  "info": {
    "title": "Agoda_hotel_room",
    "description": null,
    "version": "0.0",
    "x-build-id": "mB9w8ZrjBAJy11sdA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/minimal_junglefowl~agoda-hotel-room/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-minimal_junglefowl-agoda-hotel-room",
        "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/minimal_junglefowl~agoda-hotel-room/runs": {
      "post": {
        "operationId": "runs-sync-minimal_junglefowl-agoda-hotel-room",
        "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/minimal_junglefowl~agoda-hotel-room/run-sync": {
      "post": {
        "operationId": "run-sync-minimal_junglefowl-agoda-hotel-room",
        "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": {
          "searchTerms": {
            "title": "Từ khóa tìm kiếm",
            "type": "array",
            "description": "Tên khách sạn hoặc điểm đến. Hiệu quả nhất với tên cụ thể (vd: 'The Peninsula Bangkok'). Tên thành phố chung chung chỉ trả về các khách sạn top đầu.",
            "items": {
              "type": "string"
            }
          },
          "propertyUrls": {
            "title": "URL khách sạn",
            "type": "array",
            "description": "URL trang khách sạn Agoda (vd: https://www.agoda.com/the-peninsula-bangkok/hotel/bangkok-th.html). Actor tự tách hotelId. Nếu URL có sẵn checkIn/checkOut (hoặc los)/adults/rooms, actor sẽ tự dùng để lấy GIÁ THỰC TẾ cho khách sạn đó (không cần điền thêm ở dưới).",
            "items": {
              "type": "string"
            }
          },
          "hotelIds": {
            "title": "Hotel IDs",
            "type": "array",
            "description": "ID khách sạn Agoda dạng số nếu đã biết (vd: 10715). Dùng khi bạn đã có sẵn ID.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Vùng / thành phố cần tìm",
            "type": "array",
            "description": "Tên vùng/thành phố (vd: 'Hồ Chí Minh') HOẶC dán link trang tìm kiếm Agoda (vd: https://www.agoda.com/vi-vn/search?city=13170&checkIn=2026-08-01&checkOut=2026-08-03&adults=2&rooms=1&...) - link được ưu tiên vì đã có sẵn cityId, nhanh hơn; nếu link có checkIn/checkOut/adults/rooms thì TẤT CẢ khách sạn tìm được trong vùng sẽ dùng chung tiêu chí đó để lấy giá thực tế. Actor tự tìm tất cả khách sạn trong vùng, giới hạn bởi maxItemsPerLocation.",
            "items": {
              "type": "string"
            }
          },
          "maxItemsPerLocation": {
            "title": "Số khách sạn tối đa mỗi vùng",
            "minimum": 0,
            "type": "integer",
            "description": "Số khách sạn tối đa lấy cho MỖI vùng trong 'Vùng / thành phố cần tìm'. 0 = không giới hạn (có trần an toàn nội bộ ~2000 để tránh kéo cả thành phố). Ví dụ: 200.",
            "default": 50
          },
          "checkIn": {
            "title": "Ngày check-in",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Chọn ngày nhận phòng. Dùng để lấy GIÁ THỰC TẾ cho các khách sạn KHÔNG có sẵn checkIn từ URL riêng (vd Hotel IDs, Từ khóa tìm kiếm, hoặc Vùng/thành phố gõ tên thường). Bỏ trống = không lấy giá (nhanh hơn)."
          },
          "checkOut": {
            "title": "Ngày check-out",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Chọn ngày trả phòng. Nếu để trống, actor sẽ tự tính bằng Ngày check-in + Số đêm ở dưới. Chỉ áp dụng cho các khách sạn KHÔNG có sẵn checkIn/checkOut từ URL riêng."
          },
          "lengthOfStay": {
            "title": "Số đêm (khi không chọn ngày check-out)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Số đêm ở lại, dùng để tính ngày check-out khi bạn không chọn 'Ngày check-out' ở trên. Mặc định 1.",
            "default": 1
          },
          "adults": {
            "title": "Số người lớn",
            "minimum": 1,
            "type": "integer",
            "description": "Dùng cùng với Ngày check-in ở trên cho các khách sạn không có sẵn thông tin này từ URL.",
            "default": 2
          },
          "rooms": {
            "title": "Số phòng",
            "minimum": 1,
            "type": "integer",
            "description": "Dùng cùng với Ngày check-in ở trên cho các khách sạn không có sẵn thông tin này từ URL.",
            "default": 1
          },
          "language": {
            "title": "Ngôn ngữ kết quả",
            "enum": [
              "en-us",
              "vi-vn",
              "th-th",
              "ko-kr",
              "ja-jp",
              "zh-cn",
              "id-id"
            ],
            "type": "string",
            "description": "Ngôn ngữ dữ liệu trả về (tên phòng, tiện nghi, mô tả, địa điểm lân cận).",
            "default": "en-us"
          },
          "maxItems": {
            "title": "Giới hạn số bản ghi",
            "minimum": 0,
            "type": "integer",
            "description": "Số bản ghi khách sạn tối đa trên tất cả nguồn. 0 = không giới hạn. Dùng để kiểm soát chi phí.",
            "default": 0
          },
          "requestDelay": {
            "title": "Độ trễ giữa request (giây)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Số giây chờ giữa các lần gọi khách sạn liên tiếp. Tăng lên với batch lớn để giảm nguy cơ bị chặn.",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Cấu hình proxy. Nên dùng Apify Residential proxy cho quy mô lớn.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}