# Agoda Hotel & Room Scraper (`datawebot/agoda-hotel-scraper`) Actor

Scrape hotel room availability, pricing, and policies from Agoda.com. Get real-time rates, breakfast info, cancellation policies, and room details for any hotel. Supports multiple hotels, date ranges, guest configs, and currencies (USD/THB/IDR/SGD/MYR).

- **URL**: https://apify.com/datawebot/agoda-hotel-scraper.md
- **Developed by:** [Datawebot](https://apify.com/datawebot) (community)
- **Categories:** Travel, Real estate
- **Stats:** 1 total users, 0 monthly users, 50.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $4.00 / 1,000 hotel results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Hotel & Room Scraper

Scrape hotel room availability, pricing, and policies from [Agoda.com](https://www.agoda.com) — one of Asia's largest hotel booking platforms.

### What You Get

Room-level data from Agoda's internal API, including:

- **Room info**: name, type, max occupancy
- **Pricing**: current price, original price (before discount), currency
- **Policies**: breakfast included, free cancellation, pay later
- **Stay details**: check-in, check-out dates
- **Raw data**: full API response in `_raw` field

### Input

```json
{
    "hotelUrls": [
        {"url": "https://www.agoda.com/the-sukhothai-bangkok/hotel/bangkok-th.html", "name": "The Sukhothai Bangkok"},
        {"url": "https://www.agoda.com/mandarin-oriental-bangkok/hotel/bangkok-th.html", "name": "Mandarin Oriental"}
    ],
    "checkinDate": "2026-04-15",
    "checkoutDate": "2026-04-16",
    "rooms": 1,
    "adults": 2,
    "children": 0,
    "currency": "USD",
    "locale": "en-us"
}
````

#### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `hotelUrls` | array | ✅ | — | List of `{url, name}` objects |
| `checkinDate` | string | No | +7 days | Check-in date (YYYY-MM-DD) |
| `checkoutDate` | string | No | +1 night | Check-out date (YYYY-MM-DD) |
| `rooms` | integer | No | 1 | Number of rooms |
| `adults` | integer | No | 2 | Number of adults |
| `children` | integer | No | 0 | Number of children |
| `currency` | string | No | USD | Currency (USD, THB, IDR, SGD, MYR) |
| `locale` | string | No | en-us | Language/locale (en-us, th-th, id-id) |
| `headless` | boolean | No | true | Run browser headless |

### Output

Raw data from Agoda's internal API. Each item is one room option:

```json
{
    "hotelName": "The Sukhothai Bangkok",
    "hotelUrl": "https://www.agoda.com/the-sukhothai-bangkok/hotel/bangkok-th.html",
    "roomName": "Superior King",
    "roomType": "Superior",
    "price": 189.00,
    "originalPrice": 250.00,
    "currency": "USD",
    "maxOccupancy": 2,
    "breakfastIncluded": true,
    "freeCancellation": true,
    "payLater": false,
    "checkin": "2026-04-15",
    "checkout": "2026-04-16",
    "_mode": "hotel",
    "_hotel_index": 0,
    "_raw": { ... }
}
```

> **Note:** The `_raw` field contains the full room object from Agoda's API with all nested data (pricing details, images, amenities, etc.).

### How It Works

1. **URL construction** — builds Agoda URLs with check-in/out, guests, currency params
2. **Browser automation** — loads hotel page via Playwright headless Chromium
3. **API interception** — intercepts Agoda's internal `GetSecondaryData` API call
4. **Data extraction** — parses room grid data, pricing, and policies from API response

### Proxy

No proxy by default (direct connection). For large-scale scraping (>50 hotels), add a proxy to avoid rate limits.

```json
{
    "hotelUrls": [...],
    "proxyUrl": "http://user:pass@host:port"
}
```

### Billing

Billed **per hotel scraped** (1 event = 1 hotel page).

| Metric | Price |
|--------|-------|
| Per hotel | $0.004 |
| Per 1000 hotels | $4.00 |

Check the Actor's pricing tab for current rates.

### Limits

- **Max hotels per run**: no hard limit, but ~50 hotels recommended per run
- **Timeout**: 60 seconds per hotel page
- **Browser**: Playwright Chromium (headless)

### Use Cases

- **Price Comparison**: Compare room rates across hotels in a city
- **Revenue Management**: Monitor competitor pricing strategies
- **Travel Analytics**: Track hotel availability and pricing trends
- **Booking Intelligence**: Identify deals, discounts, and availability

### Changelog

#### 0.1 (2026-04-02)

- Initial release
- Hotel room scraping via Playwright API interception
- Support for multiple hotels, date ranges, guest configs
- Currency and locale options

# Actor input Schema

## `hotelUrls` (type: `array`):

List of Agoda hotel URLs. JSON array of {url, name} objects.

## `checkinDate` (type: `string`):

Check-in date in YYYY-MM-DD format. Default: 7 days from now.

## `checkoutDate` (type: `string`):

Check-out date in YYYY-MM-DD format. Default: check-in + 1 night.

## `rooms` (type: `integer`):

Number of rooms to book

## `adults` (type: `integer`):

Number of adults

## `children` (type: `integer`):

Number of children

## `currency` (type: `string`):

Currency code (e.g. USD, THB, IDR, SGD)

## `locale` (type: `string`):

Locale for language and region (e.g. en-us, th-th, id-id)

## `headless` (type: `boolean`):

Run browser in headless mode (no visible UI)

## Actor input object example

```json
{
  "rooms": 1,
  "adults": 2,
  "children": 0,
  "currency": "USD",
  "locale": "en-us",
  "headless": true
}
```

# Actor output Schema

## `rooms` (type: `string`):

Scraped room and pricing data from Agoda

## `summary` (type: `string`):

Summary of the scraping run

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("datawebot/agoda-hotel-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("datawebot/agoda-hotel-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 '{}' |
apify call datawebot/agoda-hotel-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Agoda Hotel & Room Scraper",
        "description": "Scrape hotel room availability, pricing, and policies from Agoda.com. Get real-time rates, breakfast info, cancellation policies, and room details for any hotel. Supports multiple hotels, date ranges, guest configs, and currencies (USD/THB/IDR/SGD/MYR).",
        "version": "0.1",
        "x-build-id": "nxJfXCbzcR8t1PPxl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datawebot~agoda-hotel-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datawebot-agoda-hotel-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/datawebot~agoda-hotel-scraper/runs": {
            "post": {
                "operationId": "runs-sync-datawebot-agoda-hotel-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/datawebot~agoda-hotel-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-datawebot-agoda-hotel-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",
                "required": [
                    "hotelUrls"
                ],
                "properties": {
                    "hotelUrls": {
                        "title": "Hotel URLs",
                        "type": "array",
                        "description": "List of Agoda hotel URLs. JSON array of {url, name} objects."
                    },
                    "checkinDate": {
                        "title": "Check-in Date",
                        "type": "string",
                        "description": "Check-in date in YYYY-MM-DD format. Default: 7 days from now."
                    },
                    "checkoutDate": {
                        "title": "Check-out Date",
                        "type": "string",
                        "description": "Check-out date in YYYY-MM-DD format. Default: check-in + 1 night."
                    },
                    "rooms": {
                        "title": "Rooms",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Number of rooms to book",
                        "default": 1
                    },
                    "adults": {
                        "title": "Adults",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Number of adults",
                        "default": 2
                    },
                    "children": {
                        "title": "Children",
                        "minimum": 0,
                        "maximum": 6,
                        "type": "integer",
                        "description": "Number of children",
                        "default": 0
                    },
                    "currency": {
                        "title": "Currency",
                        "type": "string",
                        "description": "Currency code (e.g. USD, THB, IDR, SGD)",
                        "default": "USD"
                    },
                    "locale": {
                        "title": "Locale",
                        "type": "string",
                        "description": "Locale for language and region (e.g. en-us, th-th, id-id)",
                        "default": "en-us"
                    },
                    "headless": {
                        "title": "Headless Mode",
                        "type": "boolean",
                        "description": "Run browser in headless mode (no visible UI)",
                        "default": true
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
