{
  "openapi": "3.0.1",
  "info": {
    "title": "Agoda Scraper",
    "description": "Scrape Agoda.com — hotels, vacation rentals, room offers, traveler reviews, calendar price grids, plus flight search and flight details. 11 endpoints in one actor; one row per result with photo, rating, price, Agoda URL and Raw JSON.",
    "version": "1.0",
    "x-build-id": "zUjteahtYUN2XWMfZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/one-api~agoda-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-one-api-agoda-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/one-api~agoda-scraper/runs": {
      "post": {
        "operationId": "runs-sync-one-api-agoda-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/one-api~agoda-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-one-api-agoda-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": {
          "autocomplete_inputs": {
            "title": "Autocomplete queries (one per line)",
            "type": "array",
            "description": "Universal Agoda search-box typeahead. Returns destinations (city / region / neighborhood / POI) plus individual properties matching the query — each hit carries `cityId`, `objectId`, `name`, `type`, `latitude`, `longitude`, and `numberOfHotels`. Use the top `cityId` as input to /search/* or /property/price-grid.",
            "items": {
              "type": "string"
            }
          },
          "autocomplete_resultCount": {
            "title": "Autocomplete results per query",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many typeahead matches to return per input (1-50).",
            "default": 10
          },
          "search_bylocation_inputs": {
            "title": "Free-text locations for hotel search (one per line)",
            "type": "array",
            "description": "Free-text city / region / neighborhood. Resolves to an Agoda `cityId` via autocomplete, then runs a citySearch for the requested check-in window. One dataset row per hotel returned.",
            "items": {
              "type": "string"
            }
          },
          "search_bycoordinates_inputs": {
            "title": "Coordinates for hotel search — `lat,lng` (one per line)",
            "type": "array",
            "description": "Decimal lat/lng — e.g. `13.7563,100.5018` for Bangkok. Reverse-geocodes to the nearest Agoda city then runs a citySearch. Note: Agoda's search response does not expose per-property lat/lng, so the `radius` filter is advisory only.",
            "items": {
              "type": "string"
            }
          },
          "search_bycoordinates_radius": {
            "title": "Coordinate-search radius (km)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Advisory only — Agoda's city-scoped response is not post-filtered.",
            "default": 25
          },
          "search_byurl_inputs": {
            "title": "Agoda search URLs (one per line)",
            "type": "array",
            "description": "Agoda search-page URLs:\n• `/search?city=<id>&checkIn=...&checkOut=...&adults=...&rooms=...` (uses `city` id directly)\n• `/city/<slug>.html` or `/country/<slug>.html` (slug → autocomplete → cityId)\nDate / occupancy params below override what's embedded in the URL.",
            "items": {
              "type": "string"
            }
          },
          "search_checkIn": {
            "title": "Check-in date (YYYY-MM-DD)",
            "type": "string",
            "description": "Applied to bylocation / bycoordinates / byurl hotel searches. Defaults to +30 days from today if empty.",
            "default": ""
          },
          "search_checkOut": {
            "title": "Check-out date (YYYY-MM-DD)",
            "type": "string",
            "description": "Applied to bylocation / bycoordinates / byurl hotel searches. Defaults to +32 days from today if empty.",
            "default": ""
          },
          "search_adults": {
            "title": "Adults",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Adults per room for hotel search.",
            "default": 2
          },
          "search_children": {
            "title": "Children",
            "minimum": 0,
            "maximum": 12,
            "type": "integer",
            "description": "Children per room for hotel search. Set Child Ages below when > 0.",
            "default": 0
          },
          "search_childAges": {
            "title": "Child ages (comma-separated, e.g. `5,8`)",
            "type": "string",
            "description": "Required when Children > 0.",
            "default": ""
          },
          "search_rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of rooms requested for hotel search.",
            "default": 1
          },
          "search_resultCount": {
            "title": "Hotels per page",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Items returned per page (1-200, default 30).",
            "default": 30
          },
          "search_pages": {
            "title": "Pages per hotel-search input",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Number of pages to fetch per input. Page size × pages = total hotels.",
            "default": 1
          },
          "search_sortOrder": {
            "title": "Hotel sort order",
            "enum": [
              "Best_Match",
              "Lowest_Price",
              "Highest_Price",
              "Top_Guest_Ratings",
              "Secret_Deals"
            ],
            "type": "string",
            "description": "How to sort hotel results. `Best_Match` is Agoda's default.",
            "default": "Best_Match"
          },
          "search_currency": {
            "title": "Currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "JPY",
              "CNY",
              "INR",
              "AED",
              "BRL",
              "MXN",
              "SGD",
              "THB"
            ],
            "type": "string",
            "description": "ISO currency code used for displayed prices.",
            "default": "USD"
          },
          "details_byid_inputs": {
            "title": "Agoda propertyIds (one per line)",
            "type": "array",
            "description": "Full hotel / property detail for any Agoda `propertyId`. Returns name, address, star rating, guest review score, photo gallery, amenities, room types, lat/lng, parent city, and live nightly pricing. One row per propertyId.",
            "items": {
              "type": "string"
            }
          },
          "details_byurl_inputs": {
            "title": "Agoda hotel URLs (one per line)",
            "type": "array",
            "description": "Canonical Agoda hotel-page URL — `/<slug>/hotel/<city>-<country>.html`. The id is parsed out of the page (`-h<propertyId>/...` or extracted from `hotel_id=` attribute).",
            "items": {
              "type": "string"
            }
          },
          "details_checkIn": {
            "title": "Check-in date for details (YYYY-MM-DD)",
            "type": "string",
            "description": "Applied to /details/byid and /details/byurl to pull live pricing for the window. Empty → +30 days.",
            "default": ""
          },
          "details_checkOut": {
            "title": "Check-out date for details (YYYY-MM-DD)",
            "type": "string",
            "description": "Empty → +32 days.",
            "default": ""
          },
          "details_cityId": {
            "title": "Agoda cityId (optional, for /details/byid)",
            "type": "string",
            "description": "Pass if known (e.g. `9395` = Bangkok). Resolved via autocomplete. Defaults to Bangkok if omitted.",
            "default": ""
          },
          "reviews_inputs": {
            "title": "propertyIds for reviews (one per line)",
            "type": "array",
            "description": "Pull traveler reviews for an Agoda property. Each review (reviewer, date, rating, title, body, positives/negatives, owner response) is pushed as its own dataset row.",
            "items": {
              "type": "string"
            }
          },
          "reviews_resultCount": {
            "title": "Reviews per page",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Reviews returned per page (1-50, default 10).",
            "default": 10
          },
          "reviews_pages": {
            "title": "Review pages per propertyId",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Pages of reviews to fetch per propertyId.",
            "default": 1
          },
          "reviews_sortOrder": {
            "title": "Reviews sort order",
            "enum": [
              "most_helpful",
              "most_relevant",
              "newest",
              "highest_score",
              "lowest_score"
            ],
            "type": "string",
            "description": "How to sort returned reviews.",
            "default": "most_helpful"
          },
          "rooms_inputs": {
            "title": "propertyIds for room offers (one per line)",
            "type": "array",
            "description": "Pull all bookable room / rate-plan offers for a property in the requested check-in window. Each master room (name, beds, max occupancy, cheapest price, images, facilities) becomes one row.",
            "items": {
              "type": "string"
            }
          },
          "rooms_checkIn": {
            "title": "Rooms check-in date (YYYY-MM-DD)",
            "type": "string",
            "description": "Empty → +30 days.",
            "default": ""
          },
          "rooms_checkOut": {
            "title": "Rooms check-out date (YYYY-MM-DD)",
            "type": "string",
            "description": "Empty → +32 days.",
            "default": ""
          },
          "rooms_adults": {
            "title": "Adults for room offers",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Adults per room for the /property/rooms call.",
            "default": 2
          },
          "rooms_rooms": {
            "title": "Rooms requested",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Number of rooms for the /property/rooms call.",
            "default": 1
          },
          "price_grid_inputs": {
            "title": "Price-grid inputs — `propertyId,cityId` (one per line)",
            "type": "array",
            "description": "Calendar-view nightly prices across a date window. Each line: `propertyId,cityId` (comma-separated). cityId is required (use /autocomplete to resolve). Each date in the window becomes one dataset row.",
            "items": {
              "type": "string"
            }
          },
          "price_grid_startDate": {
            "title": "Price-grid start date (YYYY-MM-DD)",
            "type": "string",
            "description": "Empty = today.",
            "default": ""
          },
          "price_grid_endDate": {
            "title": "Price-grid end date (YYYY-MM-DD)",
            "type": "string",
            "description": "Empty = +60 days from start.",
            "default": ""
          },
          "price_grid_los": {
            "title": "Price-grid length of stay (nights)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Length of stay in nights — Agoda quotes a per-night rate for stays of this length.",
            "default": 1
          },
          "price_grid_currency": {
            "title": "Price-grid currency",
            "enum": [
              "USD",
              "EUR",
              "GBP",
              "CAD",
              "AUD",
              "JPY",
              "CNY",
              "INR",
              "AED",
              "BRL",
              "MXN",
              "SGD",
              "THB"
            ],
            "type": "string",
            "description": "ISO currency code for the calendar prices.",
            "default": "USD"
          },
          "flights_search_inputs": {
            "title": "Flight searches — `ORIGIN-DESTINATION,YYYY-MM-DD[,YYYY-MM-DD]` (one per line)",
            "type": "array",
            "description": "3-letter IATA codes plus departure date (and optional return date for round-trip). Examples:\n• `BKK-SIN,2026-08-10` (one-way)\n• `JFK-LAX,2026-09-15,2026-09-22` (round-trip)\nEach matching flight result becomes one dataset row with `searchId`, `resultId`, airline, total duration, price, stops, departure / arrival times.",
            "items": {
              "type": "string"
            }
          },
          "flights_search_adults": {
            "title": "Flight adults",
            "minimum": 1,
            "maximum": 9,
            "type": "integer",
            "description": "Adult passengers for flight search.",
            "default": 1
          },
          "flights_search_children": {
            "title": "Flight children",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Child passengers for flight search.",
            "default": 0
          },
          "flights_search_infants": {
            "title": "Flight infants",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Infant passengers for flight search.",
            "default": 0
          },
          "flights_search_cabin": {
            "title": "Cabin class",
            "enum": [
              "Economy",
              "Premium_Economy",
              "Business",
              "First"
            ],
            "type": "string",
            "description": "Cabin class filter for the flight search.",
            "default": "Economy"
          },
          "flights_search_sortOrder": {
            "title": "Flight sort order",
            "enum": [
              "best",
              "price",
              "duration"
            ],
            "type": "string",
            "description": "How to sort flight results.",
            "default": "best"
          },
          "flights_search_resultCount": {
            "title": "Flights per page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Max flight results to keep per search input (1-100, default 30).",
            "default": 30
          },
          "flights_details_inputs": {
            "title": "Flight detail inputs — `searchId,resultId` OR a flight share URL (one per line)",
            "type": "array",
            "description": "Pull full booking-option detail for a specific flight result. Two input styles:\n• `searchId,resultId` (comma-separated values returned by /flights/search)\n• `/flights/<O>-<D>/<YYYY-MM-DD>/<sharedToken>` style URL (the actor re-runs the search and matches the token)",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}