# Agoda Hotel Scraper (`moving_beacon-owner1/agoda-hotel-scraper`) Actor

Agoda Hotel Scraper extracts hotel listings from Agoda search pages, collecting prices, ratings, reviews, locations, images, and hotel links. It supports pagination, lazy-loaded results, custom stay dates, and exports structured data to the Apify dataset.

- **URL**: https://apify.com/moving\_beacon-owner1/agoda-hotel-scraper.md
- **Developed by:** [Jamshaid Arif](https://apify.com/moving_beacon-owner1) (community)
- **Categories:** Travel, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Scraper (Apify Actor)

Renders Agoda search-result pages with a ,
scrolls to load lazy listing cards, and extracts structured hotel data into the
actor's dataset.

### What it collects

Per hotel card: `name`, `price`, `currency`, `priceText` (raw label), `originalPrice`
(crossed-out price, if discounted), `reviewScore`, `reviewCount` (number) +
`reviewCountText`, `starRating`, `bookedBadge` ("Booked X times today"), `area`,
`hotelUrl`, `hotelId`, `imageUrl`, plus `sourceUrl` and `scrapedAt` (UTC ISO).

It paginates through results by clicking Agoda's **Next** button (the "Page 1 of 43"
pager), scrolling each page to lazy-load all cards, bounded by `maxPages` / `maxItems`.

### Input

| Field | Type | Default | Notes |
|---|---|---|---|
| `startUrls` | array of URLs | Seoul search | Agoda search-result URLs. Run a search on agoda.com and copy the URL. |
| `maxItems` | integer | 100 | Cap across all URLs. |
| `maxPages` | integer | 5 | Result pages to paginate per URL (clicks Next). |
| `checkIn` / `checkOut` | string `YYYY-MM-DD` | — | Optional; sets the priced stay (length of stay is computed). |
| `adults` / `rooms` / `children` | integer | 2 / 1 / 0 | Occupancy params merged into the URL. |
| `scrolls` | integer | 6 | Lazy-load scroll iterations per page. |
| `scrollPauseSecs` | integer | 1 | Pause after each scroll. |
| `cardWaitSecs` | integer | 20 | How long to wait for the first cards. |
| `navigationTimeoutSecs` | integer | 45 | Page-load timeout. |
| `proxyConfiguration` | proxy | Apify proxy on | **Residential recommended** — datacenter IPs get rate-limited. |
| `headless` | boolean | true | Uncheck for local debugging. |

#### Example input

```json
{
  "startUrls": [{ "url": "https://www.agoda.com/search?city=14690" }],
  "maxItems": 60,
  "checkIn": "2026-08-01",
  "checkOut": "2026-08-03",
  "adults": 2,
  "rooms": 1,
  "scrolls": 8,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

### Output (one dataset item per hotel)

```json
{
  "name": "LOTTE CITY HOTEL GIMPO AIRPORT",
  "priceText": "$118",
  "price": "118",
  "currency": "$",
  "originalPrice": "210",
  "reviewScore": "8.7",
  "reviewCount": 3254,
  "reviewCountText": "3,254 reviews",
  "starRating": "4",
  "bookedBadge": "Booked 12 times today",
  "area": "Gimpo, Seoul",
  "hotelUrl": "https://www.agoda.com/...",
  "hotelId": "112233",
  "imageUrl": "https://...",
  "sourceUrl": "https://www.agoda.com/search?city=14690&...",
  "scrapedAt": "2026-06-28T09:30:00+00:00"
}
```

# Actor input Schema

## `startUrls` (type: `array`):

Agoda search-result page URLs, e.g. https://www.agoda.com/search?city=14690 (city 14690 = Seoul). Open Agoda, run a search, and copy the URL.

## `maxItems` (type: `integer`):

Maximum number of hotels to collect across all URLs.

## `maxPages` (type: `integer`):

How many result pages to paginate through (clicks Next). Agoda shows ~'Page 1 of 43'.

## `checkIn` (type: `string`):

Optional. If set, prices reflect this stay.

## `checkOut` (type: `string`):

Optional. Used with check-in to compute length of stay.

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

Number of adult guests (added to the search URL).

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

Number of rooms (added to the search URL).

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

Number of children (added to the search URL).

## `scrolls` (type: `integer`):

Number of lazy-load scrolls per page. More scrolls load more cards but take longer.

## `scrollPauseSecs` (type: `integer`):

Wait time after each scroll so new cards can load.

## `cardWaitSecs` (type: `integer`):

How long to wait for the first listing cards to appear before scrolling.

## `navigationTimeoutSecs` (type: `integer`):

Maximum time to wait for a page (or next page) to load.

## `proxyConfiguration` (type: `object`):

Proxy settings. Residential proxies are recommended — Agoda may rate-limit datacenter IPs.

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

Uncheck only for local debugging.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.agoda.com/search?city=14690"
    }
  ],
  "maxItems": 100,
  "maxPages": 5,
  "adults": 2,
  "rooms": 1,
  "children": 0,
  "scrolls": 6,
  "scrollPauseSecs": 1,
  "cardWaitSecs": 20,
  "navigationTimeoutSecs": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "headless": true
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.agoda.com/search?city=14690"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/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 = {
    "startUrls": [{ "url": "https://www.agoda.com/search?city=14690" }],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/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 '{
  "startUrls": [
    {
      "url": "https://www.agoda.com/search?city=14690"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call moving_beacon-owner1/agoda-hotel-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/BKvdbOCXsybspq9yf/builds/sWirXNbeeWNgr31Kg/openapi.json
