{
  "openapi": "3.0.1",
  "info": {
    "title": "Agoda Hotel Listings Extractor",
    "description": "Agoda scraper that pulls hotel listings from any Agoda city search, with nightly prices, star ratings, guest review scores, coordinates and photos, so revenue managers and travel researchers can track rates without checking Agoda by hand.",
    "version": "0.0",
    "x-build-id": "flF3WVXRBvPxyI9hR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kawsar~agoda-hotel-listings-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kawsar-agoda-hotel-listings-extractor",
        "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/kawsar~agoda-hotel-listings-extractor/runs": {
      "post": {
        "operationId": "runs-sync-kawsar-agoda-hotel-listings-extractor",
        "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/kawsar~agoda-hotel-listings-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-kawsar-agoda-hotel-listings-extractor",
        "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": "Destinations",
            "type": "array",
            "description": "City or destination names to search on Agoda, one per line. Each name is resolved to an Agoda city automatically, so 'New York', 'Bangkok' or 'Dubai' all work.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Agoda search URLs",
            "type": "array",
            "description": "Paste Agoda search result URLs, one per line. Dates, guests and rooms are read from the URL when present, and anything missing falls back to the settings below.",
            "items": {
              "type": "string"
            }
          },
          "cityIds": {
            "title": "Agoda city IDs",
            "type": "array",
            "description": "Numeric Agoda city IDs, one per line, for repeat runs where you already know the ID. New York is 318, Bangkok is 9395, Dubai is 2994.",
            "items": {
              "type": "string"
            }
          },
          "checkIn": {
            "title": "Check-in date",
            "type": "string",
            "description": "Check-in date in YYYY-MM-DD format. Leave empty to search 30 days from today."
          },
          "checkOut": {
            "title": "Check-out date",
            "type": "string",
            "description": "Check-out date in YYYY-MM-DD format. Leave empty to use check-in plus the number of nights below."
          },
          "nights": {
            "title": "Nights",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Length of stay used when no check-out date is given.",
            "default": 1
          },
          "adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of adults per room. Affects which rates Agoda returns.",
            "default": 2
          },
          "children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Number of children in the booking.",
            "default": 0
          },
          "childAges": {
            "title": "Child ages",
            "type": "array",
            "description": "Age of each child, one per line. Required by Agoda whenever the children count is above zero.",
            "items": {
              "type": "string"
            }
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of rooms to price.",
            "default": 1
          },
          "currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "AUD",
              "CAD",
              "JPY",
              "SGD",
              "THB",
              "INR",
              "AED",
              "BDT",
              "MYR",
              "IDR",
              "PHP",
              "KRW",
              "CNY",
              "HKD",
              "NZD",
              "CHF",
              "SAR"
            ],
            "type": "string",
            "description": "Currency for all returned prices.",
            "default": "USD"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en-gb",
              "en-us",
              "es-es",
              "de-de",
              "fr-fr",
              "it-it",
              "pt-br",
              "ja-jp",
              "ko-kr",
              "zh-cn",
              "zh-tw",
              "th-th",
              "id-id",
              "ms-my",
              "vi-vn",
              "ru-ru",
              "ar-ae",
              "tr-tr",
              "hi-in"
            ],
            "type": "string",
            "description": "Locale used for hotel names, area names and review snippets.",
            "default": "en-gb"
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "recommended",
              "priceLowToHigh",
              "priceHighToLow",
              "guestRating",
              "secretDeals"
            ],
            "type": "string",
            "description": "Ordering applied by Agoda before the listings are collected.",
            "default": "recommended"
          },
          "maxResults": {
            "title": "Max hotels per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit of hotels collected for each destination. Keeps runtime and compute units predictable.",
            "default": 100
          },
          "minStarRating": {
            "title": "Minimum star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Keep only properties at or above this star rating. Set to 0 for no star filter.",
            "default": 0
          },
          "minReviewScore": {
            "title": "Minimum guest review score",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Keep only properties scoring at or above this guest rating out of 10. Set to 0 for no review filter.",
            "default": 0
          },
          "minPricePerNight": {
            "title": "Minimum price per night",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest nightly rate to include, in the selected currency. Set to 0 to skip.",
            "default": 0
          },
          "maxPricePerNight": {
            "title": "Maximum price per night",
            "minimum": 0,
            "type": "integer",
            "description": "Highest nightly rate to include, in the selected currency. Set to 0 to skip.",
            "default": 0
          },
          "accommodationTypeIds": {
            "title": "Accommodation type IDs",
            "type": "array",
            "description": "Restrict results to Agoda accommodation types, one ID per line. 34 is Hotel, 29 is Apartment, 37 is Resort, 33 is Hostel, 32 is Guesthouse, 28 is Villa.",
            "items": {
              "type": "string"
            }
          },
          "facilityIds": {
            "title": "Facility IDs",
            "type": "array",
            "description": "Restrict results to properties with these Agoda facilities, one ID per line. 93 is Swimming pool, 92 is Gym, 90 is Internet, 80 is Car park, 24 is Pets allowed, 17 is Airport transfer.",
            "items": {
              "type": "string"
            }
          },
          "includeUnavailable": {
            "title": "Include sold out properties",
            "type": "boolean",
            "description": "Keep properties with no availability for the chosen dates. Useful for full market coverage, turn off for a bookable-only list.",
            "default": true
          },
          "includeImages": {
            "title": "Include photos",
            "type": "boolean",
            "description": "Collect photo URLs for each property.",
            "default": true
          },
          "maxImages": {
            "title": "Max photos per hotel",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many photo URLs to keep per property.",
            "default": 5
          },
          "includeReviewSnippets": {
            "title": "Include guest review snippets",
            "type": "boolean",
            "description": "Add short quoted guest reviews and location topic snippets to each record.",
            "default": false
          },
          "includeLandmarks": {
            "title": "Include nearby landmarks",
            "type": "boolean",
            "description": "Add nearby transport stops, top landmarks and beaches with distances in metres.",
            "default": true
          },
          "keepEmptyFields": {
            "title": "Keep empty fields",
            "type": "boolean",
            "description": "By default a field is left out when Agoda has no value for it, for example a crossed out price on a hotel that is not discounted. Turn this on to keep every field with a null instead, which suits loading into a fixed database schema.",
            "default": false
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Timeout for a single request to Agoda.",
            "default": 60
          },
          "timeoutSecs": {
            "title": "Run timeout (seconds)",
            "minimum": 60,
            "maximum": 3600,
            "type": "integer",
            "description": "Overall time budget for the run. The actor stops cleanly and keeps everything collected so far when the budget is spent.",
            "default": 600
          },
          "maxRetries": {
            "title": "Retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a failed Agoda request before moving on.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Select proxies to use for requests. Helps avoid IP blocking and rate limits. Datacenter proxies are fastest; Residential proxies are harder to detect."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}