Skip to content
Agoda

Agoda rooms

Agoda: every room type and rate plan for one stay window.

POST/v1/ota/agoda
8 credits

Request

POSThttps://api.scrapercompany.com/v1/ota/agoda

Authenticate with your API key in the x-api-key header (see Authentication).

Body

JSON object. Unknown fields are rejected with 422.

  • property_idstringrequiredmin length 1

    Numeric id returned by POST /v1/ota/agoda/search, or from the Agoda URL — the digits in agoda.com/…/hotel/…-h8795952.html, or the hotelId query parameter.

  • check_instring (date)required

    First night of the stay, YYYY-MM-DD.

  • check_outstring (date) | null

    Departure date. An alternative to nights — if both are given, this wins.

  • nightsintegerdefault 1min 1, max 30

    Length of stay. Ignored when check_out is supplied.

  • adultsintegerdefault 2min 1, max 8

    Adults in the room. Two is the hotel default; pass one for a hostel, which is priced per bed. Any value from 1 to 8 is accepted.

  • roomsintegerdefault 1min 1, max 8

    Rooms requested.

  • currencystringdefault USD

    One of 23 supported. Unlike Hotels.com these ARE comparable — Agoda converts one underlying rate.

    23 allowed values

    AED, AUD, BRL, CAD, CHF, CZK, EUR, GBP, HKD, IDR, INR, JPY, KRW, MYR, NZD, PHP, PLN, SEK, SGD, THB, TWD, USD, ZAR

Example request

curl -X POST "https://api.scrapercompany.com/v1/ota/agoda" \
  -H "x-api-key: $SCRAPERCOMPANY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "property_id": "8795952",
    "check_in": "2026-11-30",
    "nights": 1,
    "currency": "USD"
  }'

Response

200 — Agoda rooms and rate plans. Metered responses carry x-credits-charged and x-credits-remaining headers (see credit headers).

200 response
{
  "search_parameters": {
    "engine": "agoda_property",
    "property_id": "8795952",
    "check_in_date": "2029-02-05",
    "check_out_date": "2029-02-06",
    "adults": 2,
    "rooms": 1,
    "currency": "USD"
  },
  "property": {
    "property_id": "8795952",
    "name": "Moxy Boston Downtown",
    "price_per_night": 527,
    "currency": "USD",
    "tax_inclusive": true,
    "sold_out": false,
    "rooms": [
      {
        "name": "Center Stage, Guest room, 1 Queen, City view",
        "offers": [
          {
            "price": 527,
            "currency": "USD",
            "currency_code": "USD",
            "price_text": "USD 527",
            "tax_inclusive": true,
            "discount": "-29%",
            "free_cancellation": false,
            "provenance": {
              "schema_version": 1,
              "observation_id": "rateobs_0123456789abcdef0123456789abcdef",
              "collection_id": "ratecol_0123456789abcdef0123456789abcdef",
              "observed_at": "2026-08-07T01:23:45.678Z",
              "source": "agoda",
              "source_kind": "ota_rate_plan",
              "collector": "scrapingme.ota.agoda",
              "source_property_id": "ChUIoben2Mv6-CYaCi9tLzA3czVwbjQQAQ",
              "requested_market": "US",
              "requested_currency": "USD",
              "returned_currency": "USD",
              "egress_mode": "direct",
              "price_basis": "room_base_before_taxes_and_fees",
              "derivation": "normalized_upstream"
            }
          }
        ]
      }
    ]
  },
  "meta": {
    "source": "agoda",
    "nights": 1,
    "wire_bytes": 117723,
    "elapsed_s": 0.361,
    "room_types": 5,
    "offers": 9,
    "comparable_across_markets": true
  }
}

Response fields

Fields marked required are always present; others appear when they apply.

  • search_parametersobjectrequired
    Show 7 child fields
    • search_parameters.enginestringrequired

      One ofagoda_property

    • search_parameters.property_idstringrequired
    • search_parameters.check_in_datestring (date)required
    • search_parameters.check_out_datestring (date)required
    • search_parameters.adultsintegerrequired
    • search_parameters.roomsintegerrequired
    • search_parameters.currencystringrequired
  • propertyobjectrequired
    Show 9 child fields
    • property.property_idstringrequired
    • property.namestringrequired
    • property.price_per_nightnumber | nullrequired

      Cheapest priced offer.

    • property.currencystringrequired

      ISO code of the cheapest offer (the requested currency when nothing priced).

    • property.currency_displaystring | nullrequired
    • property.tax_inclusiveboolean | nullrequired
    • property.sold_outbooleanrequired
    • property.provenanceobject | nullrequired

      Provenance of the cheapest priced row; null when nothing priced.

      Show 15 child fields
      • property.provenance.schema_versionintegerrequired

        Provenance schema version (currently 1).

      • property.provenance.observation_idstringrequired

        Deterministic id of this price observation (rateobs_...).

      • property.provenance.collection_idstringrequired

        Id shared by every price from one upstream fetch (ratecol_...).

      • property.provenance.observed_atstringrequired

        UTC observation time, ISO-8601.

      • property.provenance.sourcestringrequired

        Upstream source, e.g. google_hotels_calendar.

      • property.provenance.source_kindstringrequired

        Kind of source, e.g. calendar, offer, ota_calendar, official.

      • property.provenance.collectorstringrequired

        Identifier of the collector that produced the price.

      • property.provenance.source_property_idstringrequired

        Property identifier at the source.

      • property.provenance.requested_marketstring | nullrequired
      • property.provenance.requested_currencystring | nullrequired
      • property.provenance.returned_currencystring | nullrequired
      • property.provenance.egress_modestringrequired

        How the request reached the source, e.g. direct.

      • property.provenance.price_basisstringrequired

        What the price represents, e.g. room_base_before_taxes_and_fees.

      • property.provenance.derivationstringrequired

        How the figure was derived, e.g. normalized_upstream.

      • property.provenance.upstream_rate_idstring | nullrequired

        Source-native rate/room id when available.

    • property.roomsarray of objectrequired
      Show 2 child fields
      • property.rooms[].namestringrequired
      • property.rooms[].offersarray of objectrequired
  • metaobjectrequired
    Show 9 child fields
    • meta.sourcestringrequired

      One ofagoda

    • meta.collection_idstringrequired
    • meta.observed_atstringrequired
    • meta.nightsintegerrequired
    • meta.wire_bytesintegerrequired
    • meta.elapsed_snumberrequired
    • meta.room_typesintegerrequired
    • meta.offersintegerrequired
    • meta.comparable_across_marketsbooleanrequired

      Always true.

Errors

Errors return a JSON body with a detail field. Failed requests are not charged. See Errors for the full list and retry advice.

StatusMeaningRetry?
401Unauthorized

Missing or invalid API key.

{"detail":"missing or invalid API key"}
No, fix the request
402Payment Required

Not enough credits for this request. Only returned once credit enforcement is switched on; during the beta metering runs in shadow mode and never blocks.

{"detail":"insufficient credits: this request costs 5, 0 available. Credits renew 2026-11-01."}
No, fix the request
422Unprocessable Content

Request validation failed. detail is a list of problems for schema errors, or a string for semantic checks performed by the endpoint.

{"detail":[{"loc":["body","name"],"msg":"Field required","type":"missing"}]}
No, fix the request
429Too Many Requests

Too many requests: the key's requests-per-minute limit was exceeded, or (once credit enforcement is on) the plan's concurrent-request limit. No rate-limit or Retry-After headers are sent; back off and retry.

{"detail":"rate limit 60/min exceeded"}
Yes, with backoff
502Bad Gateway

The upstream source failed, blocked the request or returned an unusable answer. Safe to retry later; failed requests are not charged.

{"detail":"RuntimeError"}
Yes, with backoff

Try it

  1. Export your key: export SCRAPERCOMPANY_API_KEY=sk_... (no key yet? request access).
  2. Copy the cURL example above and run it in a terminal.
  3. Or open the interactive playground on api.scrapercompany.com, paste your key and pick this endpoint.

Credits

8 credits per successful call. Failed, blocked and empty results are free. Credit metering is in beta and does not block requests yet.