# 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:** 12 total users, 2 monthly users, 100.0% runs succeeded, 0 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 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 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

Download the OpenAPI definition: https://api.apify.com/v2/acts/3L9klZQ4uGmnmZNd7/builds/zUjteahtYUN2XWMfZ/openapi.json
