Skip to content
Scrappa Get API key
Agoda API 1 credit/request

Agoda Hotel Search API Documentation

GET https://scrappa.co/api/agoda/search

Agoda Hotel Search API Documentation Search Agoda hotels in one city for a stay: for each hotel the position, id, name, public url, property type, star rating, coordinates, city, area, review score and count, up to 5 images, the cheapest nightly price excluding taxes and fees, the total price including taxes and fees for the whole stay, currency and free cancellation flag. Sold-out hotels carry sold_out true and no price. Pages hold up to 45 hotels; has_more and next_page drive pagination. Prices follow the currency parameter. A page past the last result is a successful empty response.

Agoda Hotel Search API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/agoda/search
Auth header
x-api-key
Cost
1 credit/request
city_id = 1234567890 check_in = example check_out = example
Response preview
200 OK
{
    "data": {
        "page": 1,
        "total": 6129,
        "hotels": [
            {
                "id": 10637,
                "url": "https://www.agoda.com/baiyoke-sky-hotel/hotel/bangkok-th.html",
                "area": "Pratunam",
                "city": "Bangkok",
                "name": "Baiyoke Sky Hotel",
                "images": [
                    "https://pix8.agoda.net/hotelImages/10637/-1/878a9b58ccd19eee41b98d20e388c080.jpg?ca=9&ce=1",
                    "https://pix8.agoda.net/hotelImages/10637/-1/58c6a29ea6eb3c71e8819fd29edee04c.jpg?ce=0"
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

3 required parameters needed before sending a request.

5 optional filters available.

city_id integer Required

Agoda city id from the suggest endpoint. Example: 9395 for Bangkok.

Example value 1234567890
check_in string Required

Check-in date, YYYY-MM-DD, today or later. Example: 2027-03-14.

Example value example
check_out string Required

Check-out date, YYYY-MM-DD, after check-in, at most 30 nights. Example: 2027-03-16.

Example value example
adults integer Optional

Number of adults, 1 to 30. Defaults to 2.

Example value 10
rooms integer Optional

Number of rooms, 1 to 9. Defaults to 1.

Example value 10
children_ages string Optional

Comma-separated ages of the children, each 0 to 17, up to 6. Example: 5,7.

Example value example
currency string Optional

Three-letter uppercase currency code. Defaults to USD.

Example value USD
page integer Optional

Page number starting at 1. Defaults to 1.

Example value 1

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "page": 1,
        "total": 6129,
        "hotels": [
            {
                "id": 10637,
                "url": "https://www.agoda.com/baiyoke-sky-hotel/hotel/bangkok-th.html",
                "area": "Pratunam",
                "city": "Bangkok",
                "name": "Baiyoke Sky Hotel",
                "images": [
                    "https://pix8.agoda.net/hotelImages/10637/-1/878a9b58ccd19eee41b98d20e388c080.jpg?ca=9&ce=1",
                    "https://pix8.agoda.net/hotelImages/10637/-1/58c6a29ea6eb3c71e8819fd29edee04c.jpg?ce=0"
                ],
                "currency": "USD",
                "latitude": 13.754597663879396,
                "position": 1,
                "longitude": 100.5403060913086,
                "price_total": 135.41,
                "star_rating": 4,
                "country_code": "TH",
                "review_count": 58128,
                "review_score": 8.1,
                "property_type": "Hotel",
                "price_per_night": 63.27,
                "free_cancellation": false
            },
            {
                "id": 186593,
                "url": "https://www.agoda.com/tower-club-at-lebua-hotel/hotel/bangkok-th.html",
                "area": "Bangkok Riverside",
                "city": "Bangkok",
                "name": "Tower Club at Lebua Hotel",
                "images": [
                    "https://pix8.agoda.net/hotelImages/186593/-1/06795674718b0691c14bf28856a2c5b6.jpg?ce=0",
                    "https://pix8.agoda.net/hotelImages/186593/1356199056/5240b2a7e1f665fc9807efdee3d880f5.jpg?ce=3"
                ],
                "currency": "USD",
                "latitude": 13.721062660217283,
                "position": 2,
                "longitude": 100.51673889160156,
                "price_total": 399.24,
                "star_rating": 5,
                "country_code": "TH",
                "review_count": 8033,
                "review_score": 8.9,
                "property_type": "Hotel",
                "price_per_night": 186.56,
                "free_cancellation": false
            }
        ],
        "city_id": 9395,
        "check_in": "2027-03-14",
        "currency": "USD",
        "has_more": true,
        "check_out": "2027-03-16",
        "next_page": 2
    },
    "meta": {
        "billable": true,
        "endpoint_family": "hotel_search"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A required query parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "city_id": [
            "The city id field is required."
        ]
    },
    "message": "The request validation failed"
}
404

Resource Not Found

The city id is unknown to Agoda. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "hotel_search"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested Agoda resource was not found."
    },
    "success": false
}
503

Service Unavailable

Agoda could not be reached or answered with an unexpected shape. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "hotel_search"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "The Agoda API is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.