# Agoda Scraper (`one-api/agoda-scraper`) Actor

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.

- **URL**: https://apify.com/one-api/agoda-scraper.md
- **Developed by:** [ONE API](https://apify.com/one-api) (community)
- **Categories:** Travel
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Agoda Scraper

Scrape **Agoda.com** — hotels, vacation rentals, room offers, traveler reviews, calendar price grids, plus flight search and flight details — from a single Actor. Eleven purpose-built endpoints in one place, backed by [realtyapi.io](https://realtyapi.io)'s real-time Agoda API.

⭐️ Found this useful? Please leave 5 stars! Issues / requests: 📬 **oneapi.project@gmail.com**

---

### What you can do

| Section | What it does | Input format |
|---|---|---|
| 🔍 **Autocomplete** | Agoda typeahead — resolves any partial query to `cityId` / `objectId` + name + parent country + lat/lng + numberOfHotels. Mixes destinations and individual properties in one feed. | free text, one per line |
| 🏙️ **Search Hotels by Location** | Free-text location → paginated hotel list with `propertyId`, name, star rating, guest score, review count, price-from, address, photo, and Agoda URL per row. | `Bangkok`, `Phuket`, etc. |
| 📍 **Search Hotels by Coordinates** | Decimal `lat,lng` → reverse-geocoded city → hotel list. | `13.7563,100.5018` |
| 🔗 **Search Hotels by URL** | Agoda search-page URL → hotel list. Works on `/search?city=<id>...`, `/city/<slug>.html`, `/country/<slug>.html`. | full Agoda URL |
| ℹ️ **Property Details by ID** | Full property detail for any `propertyId` — name, address, star rating, guest review score, photos, amenities, rooms, lat/lng, live nightly pricing. | digits (propertyId), one per line |
| 🔗 **Property Details by URL** | Same detail by parsing the hotel page URL (`/<slug>/hotel/<city>-<country>.html`). | full Agoda URL |
| ⭐ **Property Reviews** | Traveler reviews per propertyId — reviewer, date, rating, title, body, positives/negatives, owner response. One row per review. | digits, one per line |
| 🛏️ **Property Room Offers** | All bookable master rooms / rate-plans for a property + check-in window — name, beds, max occupancy, cheapest price, images, facilities, offers. | digits, one per line |
| 💰 **Property Price Grid** | Calendar nightly prices across a date window. One row per check-in date. | `propertyId,cityId` per line |
| ✈️ **Flights — Search** | Flight search by IATA pair + date (one-way or round-trip). One row per flight with `searchId`, `resultId`, airline, duration, stops, price. | `BKK-SIN,2026-08-10` or `JFK-LAX,2026-09-15,2026-09-22` |
| 🛫 **Flights — Details** | Full booking-option detail for a specific flight result (re-uses `searchId` + `resultId`, or re-runs from a flight share URL). | `searchId,resultId` or `/flights/<O>-<D>/<date>/<token>` |

Fill any combination of sections in a single run — leave the others empty.

---

### Output

Each autocomplete hit / hotel / detail / review / room / price-grid date / flight is pushed as **one dataset row**, flattened to friendly columns plus a `Raw` column with the full upstream JSON for power users.

| Mode | Property / City ID | Name | Stars | Guest Score | ## Reviews | Price | City | Photos | Agoda URL |
|---|---|---|---|---|---|---|---|---|---|
| `autocomplete` | 9395 | Bangkok | — | — | 12450 | — | Bangkok, Thailand | — | https://www.agoda.com/... |
| `search/bylocation` | 542404 | Radisson Blu Plaza Bangkok | 5.0 | 8.8 | 9764 | USD 110 | Bangkok | https://pix8.agoda.net/... | https://www.agoda.com/radisson-blu-plaza-bangkok/... |
| `details/byid` | 8027370 | PLOY Hostel | 2.0 | — | — | — | Bangkok | https://pix8.agoda.net/... | https://www.agoda.com/ploy-hostel_2/... |
| `reviews` | 8027370 | Great stay | 9 | 9 | — | — | TH | — | — |
| `rooms` | 8027370 | Deluxe Twin | — | — | — | USD 45 | — | https://... | — |
| `price_grid` | 8027370 | 2026-08-10 | — | — | — | USD 38 | 9395 | — | — |
| `flights/search` | abc123 | Singapore Airlines | — | — | — | USD 220 | BKK | — | https://www.agoda.com/flights/... |

For nested fields (full photo galleries, amenity groups, full review text, all rate plans, segment-level flight info), the complete upstream JSON is in the `Raw` column.

---

### Sample input

```json
{
    "autocomplete_inputs": ["Bangkok", "Singapore"],
    "autocomplete_resultCount": 10,

    "search_bylocation_inputs": ["Bangkok", "Phuket"],
    "search_bycoordinates_inputs": ["13.7563,100.5018"],
    "search_byurl_inputs": ["https://www.agoda.com/city/bangkok-th.html"],
    "search_checkIn": "2026-08-10",
    "search_checkOut": "2026-08-12",
    "search_adults": 2,
    "search_rooms": 1,
    "search_resultCount": 30,
    "search_pages": 1,
    "search_sortOrder": "Best_Match",
    "search_currency": "USD",

    "details_byid_inputs": ["8027370", "542404"],
    "details_byurl_inputs": ["https://www.agoda.com/ploy-hostel_2/hotel/bangkok-th.html"],
    "details_checkIn": "2026-08-10",
    "details_checkOut": "2026-08-12",

    "reviews_inputs": ["8027370"],
    "reviews_resultCount": 10,
    "reviews_pages": 1,
    "reviews_sortOrder": "most_helpful",

    "rooms_inputs": ["8027370"],
    "rooms_checkIn": "2026-08-10",
    "rooms_checkOut": "2026-08-12",
    "rooms_adults": 2,
    "rooms_rooms": 1,

    "price_grid_inputs": ["8027370,9395"],
    "price_grid_los": 1,
    "price_grid_currency": "USD",

    "flights_search_inputs": ["BKK-SIN,2026-08-10"],
    "flights_search_cabin": "Economy",
    "flights_search_sortOrder": "best",
    "flights_search_resultCount": 30
}
````

***

### Hotel-search filters

- **`search_resultCount`** — hotels per page (1-200, default 30).
- **`search_pages`** — pages per input (1-20).
- **`search_sortOrder`** — `Best_Match`, `Lowest_Price`, `Highest_Price`, `Top_Guest_Ratings`, `Secret_Deals`.
- **`search_currency`** — `USD`, `EUR`, `GBP`, `CAD`, `AUD`, `JPY`, `CNY`, `INR`, `AED`, `BRL`, `MXN`, `SGD`, `THB`.
- **Occupancy** — `search_adults`, `search_children` (+ `search_childAges`), `search_rooms`.

### Flight-search filters

- **Cabin** — `Economy`, `Premium_Economy`, `Business`, `First`.
- **Sort** — `best`, `price`, `duration`.
- **Passengers** — `flights_search_adults`, `flights_search_children`, `flights_search_infants`.

***

### Pricing

**Pay per result** — **$3 per 1,000 items** pushed (the same flat rate across every tier). Failed inputs return a row with `Summary: ERROR: ...` and are billed the same as a successful row.

To cap spend, set `Max paid dataset items` on the run page.

***

### Tips

- **Don't know a cityId / propertyId?** Run the **Autocomplete** section first — the resulting rows give you the canonical id to drop into any of the search / details / price-grid endpoints.
- **One free-text city → hotel list?** Use **Search by Location** — it does typeahead resolve + citySearch in one call.
- **Got an Agoda search URL?** Drop it into **Search by URL** — works on `/city/...`, `/country/...`, and `/search?city=...`.
- **Calendar pricing?** Price-grid needs both `propertyId` AND `cityId` per line — get cityId from Autocomplete first.
- **Round-trip flights?** Append a return date: `JFK-LAX,2026-09-15,2026-09-22`.
- **Flights detail without a fresh search?** Pass `searchId,resultId` from a recent `/flights/search` row, or a flight share URL like `/flights/BKK-SIN/2026-08-10/<token>` — the actor will re-run the search and match the token.

# Actor input Schema

## `autocomplete_inputs` (type: `array`):

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.

## `autocomplete_resultCount` (type: `integer`):

How many typeahead matches to return per input (1-50).

## `search_bylocation_inputs` (type: `array`):

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.

## `search_bycoordinates_inputs` (type: `array`):

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.

## `search_bycoordinates_radius` (type: `integer`):

Advisory only — Agoda's city-scoped response is not post-filtered.

## `search_byurl_inputs` (type: `array`):

Agoda search-page URLs:
• `/search?city=<id>&checkIn=...&checkOut=...&adults=...&rooms=...` (uses `city` id directly)
• `/city/<slug>.html` or `/country/<slug>.html` (slug → autocomplete → cityId)
Date / occupancy params below override what's embedded in the URL.

## `search_checkIn` (type: `string`):

Applied to bylocation / bycoordinates / byurl hotel searches. Defaults to +30 days from today if empty.

## `search_checkOut` (type: `string`):

Applied to bylocation / bycoordinates / byurl hotel searches. Defaults to +32 days from today if empty.

## `search_adults` (type: `integer`):

Adults per room for hotel search.

## `search_children` (type: `integer`):

Children per room for hotel search. Set Child Ages below when > 0.

## `search_childAges` (type: `string`):

Required when Children > 0.

## `search_rooms` (type: `integer`):

Number of rooms requested for hotel search.

## `search_resultCount` (type: `integer`):

Items returned per page (1-200, default 30).

## `search_pages` (type: `integer`):

Number of pages to fetch per input. Page size × pages = total hotels.

## `search_sortOrder` (type: `string`):

How to sort hotel results. `Best_Match` is Agoda's default.

## `search_currency` (type: `string`):

ISO currency code used for displayed prices.

## `details_byid_inputs` (type: `array`):

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.

## `details_byurl_inputs` (type: `array`):

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).

## `details_checkIn` (type: `string`):

Applied to /details/byid and /details/byurl to pull live pricing for the window. Empty → +30 days.

## `details_checkOut` (type: `string`):

Empty → +32 days.

## `details_cityId` (type: `string`):

Pass if known (e.g. `9395` = Bangkok). Resolved via autocomplete. Defaults to Bangkok if omitted.

## `reviews_inputs` (type: `array`):

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.

## `reviews_resultCount` (type: `integer`):

Reviews returned per page (1-50, default 10).

## `reviews_pages` (type: `integer`):

Pages of reviews to fetch per propertyId.

## `reviews_sortOrder` (type: `string`):

How to sort returned reviews.

## `rooms_inputs` (type: `array`):

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.

## `rooms_checkIn` (type: `string`):

Empty → +30 days.

## `rooms_checkOut` (type: `string`):

Empty → +32 days.

## `rooms_adults` (type: `integer`):

Adults per room for the /property/rooms call.

## `rooms_rooms` (type: `integer`):

Number of rooms for the /property/rooms call.

## `price_grid_inputs` (type: `array`):

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.

## `price_grid_startDate` (type: `string`):

Empty = today.

## `price_grid_endDate` (type: `string`):

Empty = +60 days from start.

## `price_grid_los` (type: `integer`):

Length of stay in nights — Agoda quotes a per-night rate for stays of this length.

## `price_grid_currency` (type: `string`):

ISO currency code for the calendar prices.

## `flights_search_inputs` (type: `array`):

3-letter IATA codes plus departure date (and optional return date for round-trip). Examples:
• `BKK-SIN,2026-08-10` (one-way)
• `JFK-LAX,2026-09-15,2026-09-22` (round-trip)
Each matching flight result becomes one dataset row with `searchId`, `resultId`, airline, total duration, price, stops, departure / arrival times.

## `flights_search_adults` (type: `integer`):

Adult passengers for flight search.

## `flights_search_children` (type: `integer`):

Child passengers for flight search.

## `flights_search_infants` (type: `integer`):

Infant passengers for flight search.

## `flights_search_cabin` (type: `string`):

Cabin class filter for the flight search.

## `flights_search_sortOrder` (type: `string`):

How to sort flight results.

## `flights_search_resultCount` (type: `integer`):

Max flight results to keep per search input (1-100, default 30).

## `flights_details_inputs` (type: `array`):

Pull full booking-option detail for a specific flight result. Two input styles:
• `searchId,resultId` (comma-separated values returned by /flights/search)
• `/flights/<O>-<D>/<YYYY-MM-DD>/<sharedToken>` style URL (the actor re-runs the search and matches the token)

## Actor input object example

```json
{
  "autocomplete_inputs": [
    "Bangkok",
    "Singapore"
  ],
  "autocomplete_resultCount": 10,
  "search_bylocation_inputs": [
    "Bangkok",
    "Phuket"
  ],
  "search_bycoordinates_inputs": [
    "13.7563,100.5018"
  ],
  "search_bycoordinates_radius": 25,
  "search_byurl_inputs": [
    "https://www.agoda.com/city/bangkok-th.html"
  ],
  "search_checkIn": "",
  "search_checkOut": "",
  "search_adults": 2,
  "search_children": 0,
  "search_childAges": "",
  "search_rooms": 1,
  "search_resultCount": 30,
  "search_pages": 1,
  "search_sortOrder": "Best_Match",
  "search_currency": "USD",
  "details_byid_inputs": [
    "8027370",
    "542404"
  ],
  "details_byurl_inputs": [
    "https://www.agoda.com/ploy-hostel_2/hotel/bangkok-th.html"
  ],
  "details_checkIn": "",
  "details_checkOut": "",
  "details_cityId": "",
  "reviews_inputs": [
    "8027370"
  ],
  "reviews_resultCount": 10,
  "reviews_pages": 1,
  "reviews_sortOrder": "most_helpful",
  "rooms_inputs": [
    "8027370"
  ],
  "rooms_checkIn": "",
  "rooms_checkOut": "",
  "rooms_adults": 2,
  "rooms_rooms": 1,
  "price_grid_inputs": [
    "8027370,9395"
  ],
  "price_grid_startDate": "",
  "price_grid_endDate": "",
  "price_grid_los": 1,
  "price_grid_currency": "USD",
  "flights_search_inputs": [
    "BKK-SIN,2026-08-10"
  ],
  "flights_search_adults": 1,
  "flights_search_children": 0,
  "flights_search_infants": 0,
  "flights_search_cabin": "Economy",
  "flights_search_sortOrder": "best",
  "flights_search_resultCount": 30,
  "flights_details_inputs": []
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "autocomplete_inputs": [
        "Bangkok",
        "Singapore"
    ],
    "search_bylocation_inputs": [
        "Bangkok",
        "Phuket"
    ],
    "search_bycoordinates_inputs": [
        "13.7563,100.5018"
    ],
    "search_byurl_inputs": [
        "https://www.agoda.com/city/bangkok-th.html"
    ],
    "details_byid_inputs": [
        "8027370",
        "542404"
    ],
    "details_byurl_inputs": [
        "https://www.agoda.com/ploy-hostel_2/hotel/bangkok-th.html"
    ],
    "reviews_inputs": [
        "8027370"
    ],
    "rooms_inputs": [
        "8027370"
    ],
    "price_grid_inputs": [
        "8027370,9395"
    ],
    "flights_search_inputs": [
        "BKK-SIN,2026-08-10"
    ],
    "flights_details_inputs": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("one-api/agoda-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "autocomplete_inputs": [
        "Bangkok",
        "Singapore",
    ],
    "search_bylocation_inputs": [
        "Bangkok",
        "Phuket",
    ],
    "search_bycoordinates_inputs": ["13.7563,100.5018"],
    "search_byurl_inputs": ["https://www.agoda.com/city/bangkok-th.html"],
    "details_byid_inputs": [
        "8027370",
        "542404",
    ],
    "details_byurl_inputs": ["https://www.agoda.com/ploy-hostel_2/hotel/bangkok-th.html"],
    "reviews_inputs": ["8027370"],
    "rooms_inputs": ["8027370"],
    "price_grid_inputs": ["8027370,9395"],
    "flights_search_inputs": ["BKK-SIN,2026-08-10"],
    "flights_details_inputs": [],
}

# Run the Actor and wait for it to finish
run = client.actor("one-api/agoda-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "autocomplete_inputs": [
    "Bangkok",
    "Singapore"
  ],
  "search_bylocation_inputs": [
    "Bangkok",
    "Phuket"
  ],
  "search_bycoordinates_inputs": [
    "13.7563,100.5018"
  ],
  "search_byurl_inputs": [
    "https://www.agoda.com/city/bangkok-th.html"
  ],
  "details_byid_inputs": [
    "8027370",
    "542404"
  ],
  "details_byurl_inputs": [
    "https://www.agoda.com/ploy-hostel_2/hotel/bangkok-th.html"
  ],
  "reviews_inputs": [
    "8027370"
  ],
  "rooms_inputs": [
    "8027370"
  ],
  "price_grid_inputs": [
    "8027370,9395"
  ],
  "flights_search_inputs": [
    "BKK-SIN,2026-08-10"
  ],
  "flights_details_inputs": []
}' |
apify call one-api/agoda-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=one-api/agoda-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
