# Agoda Hotel Prices Scraper: Stays by Date (`mrbridge/agoda-hotel-prices-scraper`) Actor

Agoda scraper for hotel prices over a grid of stays. Give destinations, check-in dates and stay lengths, get one row per property and stay: price of the whole booking and of one night, with and without taxes, struck-through price, free cancellation, rooms left, review score, search rank.

- **URL**: https://apify.com/mrbridge/agoda-hotel-prices-scraper.md
- **Developed by:** [MrBridge](https://apify.com/mrbridge) (community)
- **Categories:** Travel, E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Agoda Hotel Prices Scraper

This Agoda scraper reads hotel prices from [Agoda](https://www.agoda.com/) search results across a grid of stays. It searches each destination at every check-in date and length of stay, returning one row per property and stay. You need no Agoda account, login, cookie or API key. Export the run's default dataset as JSON, CSV or Excel.

The prefill searches Bangkok, with check-in 30 days after the run day and a stay of 2 nights. A test run on 2026-11-23, `UBZXOHgwdrgZsqK8x`, returned 20 rows in USD from one page and stopped at `maxItems`. The rows include property and location details, review numbers, four prices, cancellation and payment flags, rooms left and the read time.

### What is Agoda Hotel Prices Scraper?

The Actor reads Agoda search results for each stay. One search covers one stay and one sort order, reading pages of up to 45 properties. Each returned property gets one row for that stay. If several searches find the same property for the same stay, only the first sort order that serves it returns its row.

#### What data can I extract with it?

A row combines the stay and occupancy with the property's search rank and sort order. Property fields cover its identity, type, star rating and location. Review data is numeric only: scores and counts for all reviews shown by Agoda, plus separate scores and counts for reviews written on Agoda.

Four price columns cover the whole booking or one night, with taxes included or excluded. Fees are included in both. A struck price and discount appear when available. Offer fields cover free cancellation and its deadline, later payment, payment at the property and rooms left. Each row also has a sold-out flag and `scrapedAt`, the time it was read.

#### How can I use the results?

- Compare property prices in one city across many check-in dates.
- Measure how the length of stay changes the nightly price.
- Compare the same dates and lengths of stay across several cities.
- Calculate the share of offers with free cancellation or a struck price within a search.

### How to use it

1. Open the Actor and choose destinations or Agoda search URLs. Type city names as you would in the Agoda search box. Add the country when a name occurs in several countries.
2. Enter the check-in dates and lengths of stay. Set the occupancy, currency, sort orders and sold-out option as needed. Use `startUrls` to add a stay from a specific Agoda search page.
3. Set `maxItems` and start the run. The Actor stops after delivering that many rows.

This sample input makes one search and stops the run at 20 rows.

```json
{
  "destinations": [
    "Bangkok"
  ],
  "checkInDates": [
    "+30"
  ],
  "nights": [
    2
  ],
  "maxItems": 20
}
```

### Input

| Field | Type | Default | What it does |
| --- | --- | --- | --- |
| `destinations` | list of text | none | City names as typed in the Agoda search box, 1 to 10. Each one is resolved to the first city Agoda suggests, then searched at every check-in date and length of stay below. When a name matches cities in several countries, the run log names the other countries: add the country to the name to choose another one. Check destinationResolved in the rows. |
| `startUrls` | list of URLs | none | Agoda search pages (https://www.agoda.com/search), 1 to 20, with city, checkIn and los (or checkOut) in the URL. Each URL is one stay: its own dates and occupancy. The check-in dates and lengths of stay below do not apply to them, and the currency below replaces the one of the URL. |
| `checkInDates` | list of text | none | Required with destinations, 1 to 30 dates. Each date is YYYY-MM-DD or +N for N days after the day of the run (UTC), for example +30. A date in the past, or more than 500 days after the day of the run (+0 to +500), stops the run with an input error. |
| `nights` | list of integers | `[1]` | 1 to 3 lengths of stay, each from 1 to 30 nights. Every check-in date is searched with every length. |
| `adults` | integer | `2` | Adults of the stay, from 1 to 30. |
| `childrenAges` | list of integers | `[]` | The age of each child on the check-in day, 0 to 17, at most 10 children. Empty for no child. |
| `rooms` | integer | `1` | Rooms of the stay, from 1 to 30, at most one per adult. |
| `currency` | text | `"USD"` | Currency of the prices. If Agoda renders another one, the rows keep the currency it rendered and the run log says so. |
| `sortOrders` | list of text | `["popularity"]` | 1 to 2 orders, each read as its own search of each stay: popularity (Agoda's default order) and price (nightly price before taxes, lowest first). More orders give more distinct properties per stay. A property found by several orders is returned once, with the rank of the first order. |
| `includeSoldOut` | boolean | `false` | Also return the properties shown as sold out for the stay, without a price. Off by default. |
| `maxPropertiesPerStay` | integer | `100` | Properties read at most for each search (one stay and one sort order), from 1 to 450. Agoda serves 45 properties per page, so 100 reads 3 pages at most. |
| `maxItems` | integer | `1000` | Hard cap on the rows returned and billed, from 1 to 10000. The run stops once that many rows are delivered. A run makes at most 60 searches: (destinations x check-in dates x lengths of stay + search URLs) x sort orders. |

The number of searches is `(destinations x check-in dates x lengths of stay + start URLs) x sort orders`. Thus, 2 destinations x 5 dates x 3 lengths x 2 orders gives 60 searches, the maximum. The sample input gives `(1 x 1 x 1 + 0) x 1 = 1` search.

A plan above 60 searches is refused at input, before any request. One `BAD_INPUT` row in the `errors` dataset lists every input problem. No search runs and no result row is returned. A past check-in date or one more than 500 days ahead is also an input error.

### Output

| Column | Type | What it holds |
| --- | --- | --- |
| `offerId` | string | Identifier of the row: <propertyId>|<checkIn>|<nights>. |
| `destination` | string or null | The destination searched (the input text), null for a search URL. |
| `destinationResolved` | object or null | The city the destination resolved to: name, cityId and country (two-letter code). For a search URL, the city id only. |
| `checkIn` | string | Check-in date, YYYY-MM-DD. |
| `checkOut` | string | Check-out date, YYYY-MM-DD. |
| `nights` | integer | Length of stay in nights. |
| `adults` | integer | Adults of the search. |
| `children` | integer | Children of the search. |
| `rooms` | integer | Rooms of the search. |
| `currency` | string | Currency of the prices as rendered by Agoda. |
| `rank` | integer | Position of the property in the search of its sort order, 1 first. |
| `sortOrder` | string | The sort order whose search returned the property first. |
| `propertyId` | integer | Agoda property id. |
| `name` | string or null | Property name. |
| `url` | string or null | Property page with the dates, the occupancy and the currency. |
| `propertyType` | string or null | Property type as Agoda names it, for example Hotel. |
| `accommodationTypeId` | integer or null | Agoda accommodation type id (raw value). |
| `stars` | number or null | Star rating, null when not rated. |
| `area` | string or null | Area of the city the property is in. |
| `city` | string or null | City of the property. |
| `countryCode` | string or null | Two-letter country code of the property. |
| `latitude` | number or null | Latitude of the property, in decimal degrees. |
| `longitude` | number or null | Longitude of the property, in decimal degrees. |
| `reviewScore` | number or null | Score of all the reviews Agoda shows, out of 10, null without reviews. |
| `reviewCount` | integer or null | Number of reviews behind reviewScore. |
| `agodaReviewScore` | number or null | Score of the reviews written on Agoda only, out of 10. |
| `agodaReviewCount` | integer or null | Number of reviews behind agodaReviewScore. |
| `priceTotal` | number or null | Price of the whole booking, all rooms and all nights, taxes and fees included. |
| `priceTotalExclTaxes` | number or null | Price of the whole booking, all rooms and all nights, taxes excluded, fees included. |
| `pricePerNight` | number or null | Price of one night, all rooms, taxes and fees included. |
| `pricePerNightExclTaxes` | number or null | Price of one night, all rooms, taxes excluded, fees included. |
| `priceOriginal` | number or null | Struck-through price of the stay, only when above priceTotal. |
| `discountPct` | integer or null | Discount of priceTotal against priceOriginal, in percent. |
| `freeCancellation` | boolean or null | True when the offer can be cancelled for free. |
| `freeCancellationUntil` | string or null | Last moment of the free cancellation, as Agoda gives it (local time with its offset). |
| `payLater` | boolean or null | True when the stay can be paid later. |
| `payAtHotel` | boolean or null | True when the stay can be paid at the property. |
| `roomsLeft` | integer or null | Rooms of the offer still available. |
| `isSoldOut` | boolean | True for a property sold out for the stay (returned with includeSoldOut only, without prices). |
| `scrapedAt` | string | ISO time the row was read. |

A column is null when Agoda shows nothing for it. Missing or zero prices are also null.

This sample row came from an offline test run on stored pages, with its run day pinned to 2026-11-23. That run made 4 requests to the stored pages and returned 9 rows.

```json
{
  "offerId": "81182503|2026-12-23|2",
  "destination": "Bangkok",
  "destinationResolved": {
    "name": "Bangkok",
    "cityId": 9395,
    "country": "TH"
  },
  "checkIn": "2026-12-23",
  "checkOut": "2026-12-25",
  "nights": 2,
  "adults": 2,
  "children": 0,
  "rooms": 1,
  "currency": "USD",
  "rank": 1,
  "sortOrder": "popularity",
  "propertyId": 81182503,
  "name": "Andaz One Bangkok, By Hyatt",
  "url": "https://www.agoda.com/andaz-one-bangkok/hotel/bangkok-th.html?checkIn=2026-12-23&los=2&rooms=1&adults=2&children=0&currency=USD",
  "propertyType": "Hotel",
  "accommodationTypeId": 34,
  "stars": 5,
  "area": "Sukhumvit",
  "city": "Bangkok",
  "countryCode": "TH",
  "latitude": 13.727556228637695,
  "longitude": 100.54545593261719,
  "reviewScore": 9.2,
  "reviewCount": 86,
  "agodaReviewScore": 9.2,
  "agodaReviewCount": 63,
  "priceTotal": 819.14,
  "priceTotalExclTaxes": 695.96,
  "pricePerNight": 409.57,
  "pricePerNightExclTaxes": 347.98,
  "priceOriginal": null,
  "discountPct": null,
  "freeCancellation": true,
  "freeCancellationUntil": "2026-12-20T00:00:00.000+07:00",
  "payLater": true,
  "payAtHotel": false,
  "roomsLeft": 31,
  "isSoldOut": false,
  "scrapedAt": "2026-11-23T12:00:00.000Z"
}
```

### Prices

Every row carries four prices in its rendered currency:

- `priceTotal`: the whole booking, all rooms and nights, with taxes and fees.
- `priceTotalExclTaxes`: the whole booking without taxes, with fees included.
- `pricePerNight`: one night for all rooms, with taxes and fees.
- `pricePerNightExclTaxes`: one night for all rooms without taxes, with fees included.

Prices are rounded to 2 decimals. `priceOriginal` holds a struck-through stay price only when it exceeds `priceTotal`. `discountPct` then gives the discount of `priceTotal` against it in whole percent. Otherwise, both are null.

Two test runs on 2026-11-23, `djlbVoThUExIGjUpb` and `eS0VXNsx41P6BB3h2`, compared Los Angeles stays of 2 nights in EUR. They used 1 room for 2 adults against 2 rooms for 4 adults. Across the 56 properties found by both, the median ratio of the 2-room `priceTotal` to the 1-room value was 2.0. The ratio was between 1.7 and 2.3 for 48 of 56 properties.

In each run, `priceTotal` equalled `pricePerNight` x `nights` on 100 rows of 100. These were observations from those test runs, not a rule the Actor enforces. Both values are read from Agoda, and neither is computed from the other.

### Sort orders

You can request `popularity`, Agoda's default order, and `price`, which sorts by nightly price before taxes, lowest first. Each order is a separate search of each stay.

In test run `FITnYtp2t07kA9JaX` on 2026-11-23, `pricePerNightExclTaxes` was non-decreasing on 142 pairs of 142 under `price`. By comparison, `priceTotal` was ordered on 110 pairs and `pricePerNight` on 111. That Bangkok run used build 0.1.4 and an extra sort order that build 0.1.5 no longer offers.

A property is returned once per stay. The first order serving it supplies its `rank` and `sortOrder`, so a later order can return fewer rows. `rank` counts listed properties that were not returned, including sold-out properties left out and duplicates from earlier orders. Ranks therefore have gaps.

In test run `Y94hD9CVEztS9fwJ9` on 2026-11-23, each of 5 Bangkok dates returned 200 rows, with ranks reaching 219 to 224. That meant 19 to 24 gaps per search, about 10 percent.

### Destinations and search URLs

A destination searches the first city Agoda suggests for the name. If the suggestions include cities in other countries, the run log names those countries once. Add a country to choose another city.

On 2026-11-23, test run `hQx8nOrqmJnIh7aD8` searched `Cambridge` as Cambridge in GB. All 20 rows had `countryCode` `GB`, while the log named US, NZ and CA. Test run `df8TqLa9y21Pgzauq` searched `Los Angeles` as Los Angeles (CA) in US, and its log named CL. A name with no city produces one `NOT_FOUND` error row and no search. Check `destinationResolved` for the searched city's name, city id and two-letter country.

Use 1 to 20 `startUrls` for Agoda search pages containing `city`, `checkIn` and `los` or `checkOut`. A locale prefix such as `/en-gb/search` is accepted. Each URL defines one stay. Its occupancy comes from the URL when present, otherwise from the input.

Other URL parameters, including filters, are dropped. The input currency replaces the URL currency with one warning. Form dates and lengths do not apply to these URLs. They are added to the destination grid and searched once per sort order.

### Limits

- `maxPropertiesPerStay` ranges from 1 to 450 and defaults to 100. Agoda serves 45 properties per page, so 100 reads at most 3 pages. A search reads at most 10 pages or 450 properties.
- Sold-out properties count toward the per-search cap only when `includeSoldOut` is on.
- A run allows at most 60 searches. A larger plan is refused before any request.
- On every non-empty page, the Actor checks Agoda's answered check-in day against the requested day. A different day yields no rows from that page, adds one `SCHEMA_CHANGED` error and ends the search on `error`. Empty pages are not checked. An unreadable day skips the check and produces one log message.
- Rows contain no review text or author, host name, host type, street address, image or rooms list.
- `offerId` excludes occupancy. Search URLs differing only in occupancy for the same city, date and length share rows and a coverage entry. The second URL's rows are skipped as duplicates.
- Version 1 supports 2 sort orders and 2 currencies.

### Speed and memory

Default memory is 256 MB, with a maximum of 1,024 MB. In the build 0.1.4 test runs of 2026-11-23, measured peak memory ranged from 45 MB in `hQx8nOrqmJnIh7aD8` to 71 MB in `Y94hD9CVEztS9fwJ9`.

Run `Y94hD9CVEztS9fwJ9` returned 1,000 rows in 192 s over 27 pages, about 7.1 s per page, with one forced reboot. The extra-order run `FITnYtp2t07kA9JaX` returned 380 rows in 99 s over 13 pages, or 7.6 s per page.

### Billing

The `stay-offer` event is charged once per returned row, meaning one property for one stay. The Actor start event is charged once per run. Error rows never trigger `stay-offer`.

`maxItems` caps both rows returned and rows billed. See the Pricing tab for amounts.

### Run summary and early stops

Every run writes an `OUTPUT` record to its key-value store. It starts with `source` and `input`, followed by request and page counters: `requestsMade`, `requestsByStatus`, `pagesRead`, `lastPageRead`, `pagesPlanned` and `pagesRereadAfterResume`. Row counters cover `offersRead`, `offersInvalid`, `filteredOut`, `duplicatesSkipped`, `offersEmitted` and `offersCharged`. Next come `errorsByKind`, `stoppedBy`, `walksFailed`, `failedWalks`, `soldOutSkipped`, `searchCoverage` and `requestsBlocked`, which counts answers refused by the source.

This sample came from the same offline test run on stored pages. It made no request to Agoda.

```json
{
  "source": "Agoda",
  "input": {
    "destinations": [
      "Bangkok"
    ],
    "startUrls": [],
    "checkInDates": [
      "2026-12-23"
    ],
    "nights": [
      2
    ],
    "adults": 2,
    "childrenAges": [],
    "rooms": 1,
    "currency": "USD",
    "sortOrders": [
      "popularity"
    ],
    "includeSoldOut": false,
    "maxPropertiesPerStay": 100,
    "maxItems": 20
  },
  "requestsMade": 4,
  "requestsByStatus": {
    "200": 4
  },
  "pagesRead": 3,
  "lastPageRead": 3,
  "pagesPlanned": 10,
  "pagesRereadAfterResume": 0,
  "offersRead": 12,
  "offersInvalid": 0,
  "filteredOut": 1,
  "duplicatesSkipped": 2,
  "offersEmitted": 9,
  "offersCharged": 9,
  "errorsByKind": {},
  "stoppedBy": null,
  "walksFailed": 0,
  "failedWalks": [],
  "soldOutSkipped": 1,
  "searchCoverage": [
    {
      "search": "Bangkok / 2026-12-23 / 2 nights / popularity",
      "announced": 6395,
      "rows": 9,
      "pagesRead": 3,
      "endedBy": "lastPage"
    }
  ],
  "route": "offline-fixtures",
  "exitCountry": null,
  "requestsBlocked": 0
}
```

Each `searchCoverage` entry records the search, announced property count, returned rows, pages read and ending reason. `announced` can greatly exceed what a run reads. In test run `UBZXOHgwdrgZsqK8x` on 2026-11-23, Agoda announced 6,364 Bangkok properties for a 2-night stay, while the run stopped at 20 rows through `maxItems`.

`endedBy` has 7 values:

- `lastPage`: Agoda returned an empty page, every announced property was read, or the last page was reached.
- `noNewProperty`: a page brought no property not already seen in that search.
- `maxPropertiesPerStay`: the per-search property cap was reached.
- `pageCap`: 10 pages were read and Agoda had more.
- `runStopped`: the run stopped before the search finished, for example at `maxItems`.
- `error`: the search ended on an error row.
- `beforeResume`: the search finished before a platform restart, and its original ending reason was not kept.

`stoppedBy` keeps the first reason the run stopped with work left. It is null when all requested work finished. Its 8 values are:

- `null`: all requested work was done.
- `maxItems`: the returned-row cap was reached.
- `chargeLimit`: the run's maximum charge was reached.
- `deadline`: the internal time limit was reached before the platform timeout.
- `circuitOpen`: the source refused 3 answers in a row.
- `pageBudget`: the run's request budget was spent. Rows already returned are kept.
- `badInput`: the source answered that a request was invalid. This differs from the initial input check.
- `fetchFailed`: the last search ended on an unreadable page, even after its retry.

`walksFailed` and `failedWalks` count only searches ending on `FETCH_FAILED`. A search refused by the source appears in `errorsByKind` and `searchCoverage[].endedBy`, not in those counters.

If every search ends on `error` and no row is returned, the run ends FAILED with exit code 1. `OUTPUT` is still written, and one log line points to the `errors` dataset. A run with no planned search because of an input error or unresolved destinations is not such a failure.

After a platform migration, the run resumes from saved state without returning or billing existing dataset rows again. Searches finished before the restart show `endedBy` `beforeResume` and `announced` null. In test run `Y94hD9CVEztS9fwJ9` on 2026-11-23, one forced reboot produced 0 duplicate `offerId` values, and the resumed run reported 278 rows already emitted. An outside dataset count around the reboot showed 265 rows. Dataset counts lag behind pushed rows, so that count does not establish an exact reboot point.

The `errors` dataset holds one never-billed row per error, with these 8 kinds:

- `BAD_INPUT`: an input problem, or the source refused a request as invalid.
- `TARGET_BLOCKED`: the source refused the request.
- `RATE_LIMITED`: the source asked to slow down.
- `FETCH_FAILED`: a page remained unreadable after its retry.
- `UPSTREAM_ERROR`: the source was unavailable.
- `SCHEMA_CHANGED`: the answer had an unexpected format or was for another day.
- `LISTING_INVALID`: a property entry could not be read.
- `NOT_FOUND`: no city matched a destination, or a resource was missing.

### Personal data

Rows contain no host name, reviewer name, review text or street address. `name` is only the property name as Agoda publishes it. Keep only the columns you need for your analysis.

### Legal and responsible use

The source is Agoda at https://www.agoda.com/. Its terms may restrict automated access or reuse. Check those terms and the law that applies to your use. You remain responsible for how you collect and use the data. MrBridge has no partnership with Agoda and no endorsement from Agoda.

### Frequently asked questions

#### Why did I get fewer rows than `maxItems`?

`maxPropertiesPerStay` can cap each search. A property found by two sort orders is returned once, and sold-out properties are omitted unless `includeSoldOut` is on. A small city may also have fewer properties than the cap. A page answered for another day returns no rows.

Check `searchCoverage` for each search's rows and ending reason. In test run `Iuc3N2c7O0Md0tJnv` on 2026-11-23, Hallstatt returned 35 rows of 35 announced on one page, with `endedBy` `lastPage`.

#### Why was the wrong city searched?

The Actor uses the first city Agoda suggests. Add the country to the destination to choose another suggestion, then verify `destinationResolved`. See [Destinations and search URLs](#destinations-and-search-urls).

#### Which price should I compare?

Use `priceTotal` for the whole booking or `pricePerNight` for one night. Both cover all rooms. Choose the matching `ExclTaxes` column when comparing prices without taxes. Fees remain included.

#### Does the Actor return review text?

No. It returns review scores and counts only, including separate values for reviews written on Agoda. It returns neither review text nor reviewer names.

#### Can I use it from an MCP client?

Yes. Any Apify Store Actor can be called from an MCP client through the Apify MCP server. Follow the [MCP setup documentation](https://docs.apify.com/platform/integrations/mcp).

#### Can I start a run from code?

Yes. Send a POST request to the Actor's runs endpoint through the Apify API. Read the resulting rows as JSON from the dataset items endpoint. This is the Apify API, not an official Agoda API, and the Actor has no affiliation with Agoda.

### Related Actors

For the same job with Booking.com as its source, use the separate MrBridge [Booking.com hotel prices scraper](https://apify.com/mrbridge/booking-hotel-prices-scraper). It returns one row per property and stay over a grid of dates.

### Your feedback

Report bugs and share technical feedback on the [Issues tab](https://apify.com/mrbridge/agoda-hotel-prices-scraper/issues).

An honest review helps the next users decide. You can also bookmark this Actor, and use the Issues tab for bugs or other problems.

Learn more about MrBridge at [mr-bridge.com](https://mr-bridge.com).

# Changelog

This Actor's version history is a separate document: https://apify.com/mrbridge/agoda-hotel-prices-scraper/changelog.md

# Actor input Schema

## `destinations` (type: `array`):

City names as typed in the Agoda search box, 1 to 10. Each one is resolved to the first city Agoda suggests, then searched at every check-in date and length of stay below. When a name matches cities in several countries, the run log names the other countries: add the country to the name to choose another one. Check destinationResolved in the rows.

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

Agoda search pages (https://www.agoda.com/search), 1 to 20, with city, checkIn and los (or checkOut) in the URL. Each URL is one stay: its own dates and occupancy. The check-in dates and lengths of stay below do not apply to them, and the currency below replaces the one of the URL.

## `checkInDates` (type: `array`):

Required with destinations, 1 to 30 dates. Each date is YYYY-MM-DD or +N for N days after the day of the run (UTC), for example +30. A date in the past, or more than 500 days after the day of the run (+0 to +500), stops the run with an input error.

## `nights` (type: `array`):

1 to 3 lengths of stay, each from 1 to 30 nights. Every check-in date is searched with every length.

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

Adults of the stay, from 1 to 30.

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

The age of each child on the check-in day, 0 to 17, at most 10 children. Empty for no child.

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

Rooms of the stay, from 1 to 30, at most one per adult.

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

Currency of the prices. If Agoda renders another one, the rows keep the currency it rendered and the run log says so.

## `sortOrders` (type: `array`):

1 to 2 orders, each read as its own search of each stay: popularity (Agoda's default order) and price (nightly price before taxes, lowest first). More orders give more distinct properties per stay. A property found by several orders is returned once, with the rank of the first order.

## `includeSoldOut` (type: `boolean`):

Also return the properties shown as sold out for the stay, without a price. Off by default.

## `maxPropertiesPerStay` (type: `integer`):

Properties read at most for each search (one stay and one sort order), from 1 to 450. Agoda serves 45 properties per page, so 100 reads 3 pages at most.

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

Hard cap on the rows returned and billed, from 1 to 10000. The run stops once that many rows are delivered. A run makes at most 60 searches: (destinations x check-in dates x lengths of stay + search URLs) x sort orders.

## `capturePlan` (type: `string`):

Maintainer only. Name of a closed diagnostic capture campaign. Requires Internal capture mode. The allowlist lives in the code: any other value is rejected without issuing a request.

## `internalCaptureMode` (type: `boolean`):

Maintainer only. When true, captures raw responses to the default key-value store of the run for building test fixtures. Not for normal use.

## Actor input object example

```json
{
  "destinations": [
    "Bangkok"
  ],
  "checkInDates": [
    "+30"
  ],
  "nights": [
    2
  ],
  "adults": 2,
  "childrenAges": [],
  "rooms": 1,
  "currency": "USD",
  "sortOrders": [
    "popularity"
  ],
  "includeSoldOut": false,
  "maxPropertiesPerStay": 100,
  "maxItems": 20,
  "internalCaptureMode": false
}
```

# Actor output Schema

## `offers` (type: `string`):

Direct link to all dataset items produced by the run.

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

Direct link to the OUTPUT record: requests made, stay offers read, returned and billed, errors by kind and the reason of an early stop.

# 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 = {
    "destinations": [
        "Bangkok"
    ],
    "checkInDates": [
        "+30"
    ],
    "nights": [
        2
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrbridge/agoda-hotel-prices-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 = {
    "destinations": ["Bangkok"],
    "checkInDates": ["+30"],
    "nights": [2],
    "maxItems": 20,
}

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

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

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

```

## CLI example

```bash
echo '{
  "destinations": [
    "Bangkok"
  ],
  "checkInDates": [
    "+30"
  ],
  "nights": [
    2
  ],
  "maxItems": 20
}' |
apify call mrbridge/agoda-hotel-prices-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mrbridge/agoda-hotel-prices-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

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