Agoda Hotel Rooms
agoda.hotel.rooms
Fetch hotel room inventory/pricing data with optional stay window, guest configuration, locale/currency, sorting, and pagination.
At a glance
- Endpoint ID
agoda.hotel.rooms- Price
- 1 credit per call; failed calls are free
- Runs for up to
- 60 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "agoda.hotel.rooms", "input": { "adults": 2, "check_in": "2030-06-10", "check_out": "2030-06-12", "children": 1, "currency": "USD", "hotel_url": "https://www.agoda.com/hotel-boss/hotel/singapore-sg.html", "locale": "en-US", "max_pages": 1, "rooms": 1, "sort": "price_low_to_high" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "agoda.hotel.rooms", "input": { "adults": 2, "check_in": "2030-06-10", "check_out": "2030-06-12", "children": 1, "currency": "USD", "hotel_url": "https://www.agoda.com/hotel-boss/hotel/singapore-sg.html", "locale": "en-US", "max_pages": 1, "rooms": 1, "sort": "price_low_to_high" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "agoda.hotel.rooms", "input": { "adults": 2, "check_in": "2030-06-10", "check_out": "2030-06-12", "children": 1, "currency": "USD", "hotel_url": "https://www.agoda.com/hotel-boss/hotel/singapore-sg.html", "locale": "en-US", "max_pages": 1, "rooms": 1, "sort": "price_low_to_high" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
hotel_url |
string | yes | Public URL of the hotel. | https://www.agoda.com/hotel-boss/hotel/singapor… |
adults |
integer | no | Number of adult guests. From 0 to 30. | 2 |
check_in |
string | no | Check-in date. | 2030-06-10 |
check_out |
string | no | Check-out date. | 2030-06-12 |
children |
integer | no | Number of child guests. From 0 to 20. | 1 |
currency |
string | no | Currency for returned prices. | USD |
guests |
array<object> | no | ||
locale |
string | no | Locale to use for the request. | en-US |
max_pages |
integer | no | Maximum number of result pages to fetch. From 1 to 5. | 1 |
page |
integer | no | One-based result page to fetch. From 1 to 100. | |
rooms |
integer | no | Number of rooms. From 1 to 10. | 1 |
sort |
string | no | Sort order for returned results. Allowed values: price_low_to_high, price_high_to_low, name_asc, name_desc. |
price_low_to_high |
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "collected_at": "2026-11-24T16:54:13Z", "end_page": 1, "has_more": false, "hotel_id": "1105091", "hotel_name": "Hotel Boss", "start_page": 1, "rooms": [ { "name": "Triple Room", "price": 214, "board_type": "room only", "cancel_policy": "Cancellation policy", "currency": "USD", "occupancy": "max 3 guests", "price_excluding_tax": 214, "price_including_tax": 233, "room_id": "6941773", "tax_amount": 19, "amenities": [ "Air conditioning", "Closet" ] }, { "name": "Triple Room with Western Breakfast", "price": 246, "board_type": "breakfast included", "cancel_policy": "Cancellation policy", "currency": "USD", "occupancy": "max 3 guests", "price_excluding_tax": 246, "price_including_tax": 268, "room_id": "11129407", "tax_amount": 22, "amenities": [ "Air conditioning", "Complimentary tea" ] } ]}
Fields
| Field | Type | Example |
|---|---|---|
collected_at |
string | 2026-11-24T16:54:13Z |
end_page |
integer | 1 |
has_more |
boolean | false |
hotel_id |
string | 1105091 |
hotel_name |
string | Hotel Boss |
rooms |
array | 3 records |
rooms[].amenities |
array | Air conditioning, Closet, Clothes rack |
rooms[].board_type |
string | room only |
rooms[].cancel_policy |
string | Cancellation policy |
rooms[].currency |
string | USD |
rooms[].name |
string | Triple Room |
rooms[].occupancy |
string | max 3 guests |
rooms[].price |
integer | 214 |
rooms[].price_excluding_tax |
integer | 214 |
rooms[].price_including_tax |
integer | 233 |
rooms[].room_id |
string | 6941773 |
rooms[].tax_amount |
integer | 19 |
start_page |
integer | 1 |
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other Agoda Travel & Hotels endpoints
Something missing or unclear? Ask the team that builds the Agoda Travel & Hotels endpoints.