# Agoda API Scraper (`rl1987/agoda-scraper`) Actor

Scrapes Agoda accommodation search results, pricing and property details via Agoda's public GraphQL endpoints (requests-based, no browser).

- **URL**: https://apify.com/rl1987/agoda-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:** Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 dataset rows

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

### What does Agoda API Scraper do?

**Agoda API Scraper** extracts hotel and accommodation data — live pricing, review scores, photos, facilities and static property details — from [Agoda](https://www.agoda.com) without a browser. It talks directly to the same public GraphQL search endpoints `www.agoda.com/search` itself calls, so runs are fast and don't need to render pages. Give it a destination (or a list of property IDs) and your stay dates, and get back structured JSON, ready for the Apify API, scheduling and integrations.

See `agoda_api_scraping.md` for the underlying endpoint reverse-engineering notes.

### Why use Agoda API Scraper?

- **Price monitoring** — track nightly/total rates for specific properties or a whole city over time.
- **Market research** — pull review scores, star ratings and facility data across a destination for competitor analysis.
- **Lead generation / travel apps** — feed structured accommodation data into your own product without maintaining a browser-based scraper.

### How to use Agoda API Scraper

1. Enter a **Destination** (e.g. `"Bangkok"`) — it's resolved to Agoda's internal city ID automatically. Or paste specific **Property IDs** to skip search entirely.
2. Set **Check-in** / **Check-out** dates, **Rooms**/**Adults**/**Children ages** and a **Currency**.
3. Optionally turn on **Include static details** for address/review-breakdown/useful-info per property.
4. Run the Actor and download results from the **Dataset** tab (JSON, CSV, Excel, …).

### Input

See the **Input** tab for the full schema. Key fields:

| Field | Description |
|---|---|
| `search` | Free-text destination, e.g. `"Bangkok"` |
| `cityId` | Exact numeric Agoda city ID (skips destination resolution) |
| `propertyIds` | Specific property IDs (bypasses search; static content only, no live pricing) |
| `checkin` / `checkout` | Stay dates (`YYYY-MM-DD`) |
| `adults` / `rooms` / `childrenAges` | Occupancy |
| `currency` | Display currency |
| `sortBy` | `Ranking`, `Price` or `AllGuestsReviewScore` |
| `includeDetails` | Adds a `details` object per property |
| `maxItems` | Result cap |

### Output

Each dataset item is one accommodation:

```json
{
  "propertyId": 14654101,
  "name": "Solaria Nishitetsu Hotel Bangkok",
  "url": "https://www.agoda.com/solaria-nishitetsu-hotel-bangkok/hotel/bangkok-th.html",
  "propertyType": "Hotel",
  "starRating": 4,
  "address": { "country": "Thailand", "countryCode": "TH", "city": "Bangkok", "area": "Sukhumvit" },
  "latitude": 13.74, "longitude": 100.56,
  "reviewScore": 9.2,
  "reviewCount": 1523,
  "facilityHighlights": ["Free Wi-Fi", "Swimming pool", "Airport transfer"],
  "images": ["https://pix8.agoda.net/hotelImages/..."],
  "price": {
    "currency": "USD",
    "perNight": 125.83,
    "perNightBeforeDiscount": 125.83,
    "perStay": 251.65,
    "freeCancellation": false,
    "payLaterEligible": false
  }
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

#### Main data fields

| Field | Meaning |
|---|---|
| `propertyId` | Agoda's internal numeric property ID |
| `name` / `url` | Display name and canonical Agoda page |
| `starRating`, `reviewScore`, `reviewCount` | Rating summary |
| `address`, `latitude`, `longitude` | Location |
| `price` | Cheapest available offer for the given dates/occupancy |
| `images`, `facilityHighlights` | Media and top amenities |
| `details` (optional) | Address detail, review breakdown, useful info (check-in time, property age, extras) |

### Pricing / cost estimation

This Actor makes 1 request per page of ~25 results (plus 1 request per 20 properties if "Include static details" is on) — no browser rendering, so compute-unit usage per item is very low compared to browser-based scrapers. Check the **Actor pricing** tab for the current pricing model.

### Tips

- Leave `includeDetails` off for the fastest, cheapest runs when you only need pricing/ratings.
- Use `propertyIds` directly if you already know which properties you want — it skips destination resolution and search pagination entirely.
- Prices reflect Agoda's live availability at request time; re-run periodically for price-tracking use cases (see the Apify **Scheduler**).

### FAQ, disclaimers and support

This Actor scrapes publicly available data from Agoda for personal or business research purposes; use it in accordance with Agoda's Terms of Service and applicable law. Agoda may change its API at any time, which can affect this Actor's behavior — please report issues on the Issues tab. Need something custom? Reach out for tailored scraping solutions.

# Actor input Schema

## `search` (type: `string`):

Place name (city, region, landmark) resolved via Agoda's own destination autocomplete. The easiest way to start — e.g. "Bangkok". Leave City ID empty if you use this.

## `cityId` (type: `integer`):

Advanced: exact numeric Agoda city id, e.g. 9395 for Bangkok. Use only if you already know the id; otherwise just fill in Destination above.

## `propertyIds` (type: `array`):

Scrape specific properties by their numeric Agoda property ID (bypasses search, returns static details only — no live pricing). Add one ID per line, e.g. 10636. When set, Destination/City ID is ignored.

## `checkin` (type: `string`):

Arrival date. Defaults to 30 days from the run date.

## `checkout` (type: `string`):

Departure date. Defaults to check-in + 1 night.

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

Number of rooms to book for.

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

Number of adult guests.

## `childrenAges` (type: `array`):

Add one child age (in years) per line, e.g. 5 then 9 for two children. Leave empty for no children.

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

Currency for displayed prices.

## `language` (type: `string`):

Locale for localized text (names, facilities).

## `sortBy` (type: `string`):

Order of the returned accommodations.

## `includeDetails` (type: `boolean`):

Add a `details` object per property: address, review breakdown and useful info (check-in/out times, property age, extras). Costs one extra request per batch of 20 properties in search mode.

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

Maximum number of accommodations to return.

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

Proxy settings. Apify Proxy recommended.

## Actor input object example

```json
{
  "search": "Bangkok",
  "propertyIds": [],
  "rooms": 1,
  "adults": 2,
  "childrenAges": [],
  "currency": "USD",
  "language": "en-us",
  "sortBy": "Ranking",
  "includeDetails": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `accommodations` (type: `string`):

All scraped accommodation rows as JSON.

## `accommodationsCsv` (type: `string`):

Same rows exported as CSV.

## `input` (type: `string`):

The input this run was started with.

## `consoleRun` (type: `string`):

Open this run in the Apify Console.

# 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 = {
    "search": "Bangkok",
    "propertyIds": [],
    "rooms": 1,
    "adults": 2,
    "childrenAges": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/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 = {
    "search": "Bangkok",
    "propertyIds": [],
    "rooms": 1,
    "adults": 2,
    "childrenAges": [],
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/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 '{
  "search": "Bangkok",
  "propertyIds": [],
  "rooms": 1,
  "adults": 2,
  "childrenAges": []
}' |
apify call rl1987/agoda-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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