{
  "openapi": "3.0.1",
  "info": {
    "title": "Booking_hotel_room",
    "description": null,
    "version": "0.0",
    "x-build-id": "oBTFAeJEQRgKHRFOP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/minimal_junglefowl~booking-hotel-room/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-minimal_junglefowl-booking-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~booking-hotel-room/runs": {
      "post": {
        "operationId": "runs-sync-minimal_junglefowl-booking-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~booking-hotel-room/run-sync": {
      "post": {
        "operationId": "run-sync-minimal_junglefowl-booking-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 Chum Boutique Hue').",
            "items": {
              "type": "string"
            }
          },
          "propertyUrls": {
            "title": "URL khách sạn",
            "type": "array",
            "description": "URL trang khách sạn Booking.com (vd: https://www.booking.com/hotel/vn/the-chum-boutique.html). Nếu URL có sẵn checkin/checkout/group_adults/no_rooms, actor tự lấy GIÁ THỰC TẾ cho khách sạn đó.",
            "items": {
              "type": "string"
            }
          },
          "hotelIds": {
            "title": "Hotel IDs",
            "type": "array",
            "description": "ID khách sạn Booking.com dạng số nếu đã biết (vd: 10214414). 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: 'Huế') HOẶC dán link trang tìm kiếm Booking.com (vd: https://www.booking.com/searchresults.html?ss=Hue). Actor tự tìm tất cả khách sạn trong vùng đó, giới hạn bởi maxItemsPerLocation. Mỗi lần tải (~25 khách sạn) cần 1 request riêng, nên số vùng x maxItemsPerLocation lớn sẽ tốn nhiều thời gian/request hơn.",
            "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' (vd 200). Actor tự gọi nhiều lần với các tổ hợp lọc hạng sao/sắp xếp khác nhau để gom đủ số lượng này (mỗi ~25 khách sạn cần 1 request). 0 = không giới hạn (dừng ở trần an toàn 200). Mặc định 50.",
            "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. 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
          },
          "currency": {
            "title": "Tiền tệ",
            "type": "string",
            "description": "Mã tiền tệ hiển thị giá (vd: USD, VND, EUR). Mặc định USD.",
            "default": "USD"
          },
          "language": {
            "title": "Ngôn ngữ kết quả",
            "enum": [
              "en-us",
              "vi",
              "th",
              "ko",
              "ja",
              "zh-cn",
              "id"
            ],
            "type": "string",
            "description": "Ngôn ngữ dữ liệu trả về (tên phòng, tiện nghi, mô tả, review...).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}