# OTA compare: `POST /v1/ota/compare`

Cost: 30 credits (30 (failed requests are free)). Docs: https://scrapercompany.com/docs/reference/ota-compare

Fan out across every source given an identifier.

Fail-soft per source: this returns 200 with per-source status even when one
OTA is blocked, because losing three good answers to one bad one is worse
than a partial result the caller can see. `comparison.comparable` is false
for a single priced source, mixed currencies or mixed price bases; those
minima and spreads are not calculated.

Request body (JSON):

- `check_in` (string (date); required): First night of the stay, `YYYY-MM-DD`.
- `check_out` (string (date) | null; optional): Departure date. An alternative to `nights` — if both are given, this wins.
- `nights` (integer; optional; default 1; min 1, max 30): Length of stay. Ignored when `check_out` is supplied.
- `adults` (integer; optional; default 2; min 1, max 8): Adults in the room. Two is the hotel default; pass one for a hostel, which is priced per bed. Any value 1-8 works.
- `currency` (string; optional; default USD; one of AED, ARS, AUD, BRL, CAD, CHF, CLP, CNY, COP, CZK, DKK, EGP, EUR, GBP, HKD, HUF, IDR, ILS, INR, JPY, KRW, MXN, MYR, NOK, NZD, PEN, PHP, PLN, QAR, RON, SAR, SEK, SGD, THB, TRY, TWD, USD, VND, ZAR): ISO 4217 code for the returned prices. Major currencies include AED, AUD, BRL, CAD, CHF, CNY, EUR, GBP, HKD, INR, JPY, KRW, MXN, NZD, SGD, USD; all 39 supported codes are listed in the enum.
- `booking_pagename` (string | null; optional): Booking slug. Omit to skip Booking entirely.
- `booking_country` (string; optional; default us; one of ad, ae, af, ag, ai, al, am, ao, aq, ar, as, at, au, aw, ax, az, ba, bb, bd, be, bf, bg, bh, bi, bj, bl, bm, bn, bo, bq, br, bs, bt, bv, bw, by, bz, ca, cc, cd, cf, cg, ch, ci, ck, cl, cm, cn, co, cr, cu, cv, cw, cx, cy, cz, de, dj, dk, dm, do, dz, ec, ee, eg, eh, er, es, et, fi, fj, fk, fm, fo, fr, ga, gb, gd, ge, gf, gg, gh, gi, gl, gm, gn, gp, gq, gr, gs, gt, gu, gw, gy, hk, hm, hn, hr, ht, hu, id, ie, il, im, in, io, iq, ir, is, it, je, jm, jo, jp, ke, kg, kh, ki, km, kn, kp, kr, kw, ky, kz, la, lb, lc, li, lk, lr, ls, lt, lu, lv, ly, ma, mc, md, me, mf, mg, mh, mk, ml, mm, mn, mo, mp, mq, mr, ms, mt, mu, mv, mw, mx, my, mz, na, nc, ne, nf, ng, ni, nl, no, np, nr, nu, nz, om, pa, pe, pf, pg, ph, pk, pl, pm, pn, pr, ps, pt, pw, py, qa, re, ro, rs, ru, rw, sa, sb, sc, sd, se, sg, sh, si, sj, sk, sl, sm, sn, so, sr, ss, st, sv, sx, sy, sz, tc, td, tf, tg, th, tj, tk, tl, tm, tn, to, tr, tt, tv, tw, tz, ua, ug, uk, um, us, uy, uz, va, vc, ve, vg, vi, vn, vu, wf, ws, xk, ye, yt, za, zm, zw): Two-letter segment before the slug in the Booking URL.
- `hotels_property_id` (string | null; optional): Hotels.com numeric id from `POST /v1/ota/hotels/search`. Omit to skip Hotels.com.
- `hotels_market` (string; optional; default US; one of AU, CA, DE, EU, FR, GB, IE, IT, NL, NZ, US): Hotels.com point-of-sale; also picks its currency.
- `agoda_property_id` (string | null; optional): Agoda numeric id from `POST /v1/ota/agoda/search`. Omit to skip Agoda.
- `expedia_property_id` (string | null; optional): Expedia numeric id from `POST /v1/ota/expedia/search`. Omit to skip Expedia.
- `expedia_market` (string; optional; default US; one of CA, US): Expedia point-of-sale; also picks its currency.
- `agoda_probe_min_stay` (boolean; optional; default false): Re-ask a sold-out Agoda stay at 2..7 nights to tell a minimum-stay restriction from a sell-out (Agoda reports both as sold out). Up to six extra Agoda calls per sold-out row, so off by default here; `POST /v1/ota/agoda` probes by default.
- `country_market` (string | null; optional; one of AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UK, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW): Visitor country (point of sale), two letters, e.g. `GB`. Booking and Agoda price by the visitor's country - measured 2026-10-03, Booking showed a GB visitor 321 USD where US and CA visitors saw 276 for the same night - so this asks for the price a visitor from that country sees. The answer's `point_of_sale` block says whether that country was actually served; when it was not, the price is the default market's. Omit for the previous behaviour. In a comparison it applies to Booking and Agoda, and becomes `hotels_market`/`expedia_market` when those are not given and the source sells that point-of-sale.

Response fields:

- `search_parameters` (object; required)
  - `search_parameters.engine` (string; required; one of ota_compare)
  - `search_parameters.check_in_date` (string (date); required)
  - `search_parameters.check_out_date` (string (date); required)
  - `search_parameters.adults` (integer; required)
  - `search_parameters.currency` (string; required): Requested currency; used by Booking.com and Agoda. Hotels.com and Expedia price in their market's currency.
  - `search_parameters.booking_pagename` (string; optional): Present only when supplied.
  - `search_parameters.hotels_property_id` (string; optional): Present only when supplied.
  - `search_parameters.agoda_property_id` (string; optional): Present only when supplied.
  - `search_parameters.expedia_property_id` (string; optional): Present only when supplied.
- `comparison` (object; required)
  - `comparison.status` (string; required; one of no_prices, single_source, mixed_currency, comparable)
  - `comparison.comparable` (boolean; required): True when at least two sources priced in one currency.
  - `comparison.reason` (string | null; required): Why the prices are not (fully) comparable. Null only when `status` is `comparable` and every price shares one basis; when bases differ it says the headline minimum mixes them.
  - `comparison.identifiers` (object; required): Echo of the identifiers used, keyed `booking` / `hotels` / `agoda` / `expedia` (supplied ones only).
  - `comparison.lowest_price` (number | null; required): Null when nothing priced or currencies are mixed. May span different price bases; see `price_basis_consistent`.
  - `comparison.lowest_source` (string | null; required)
  - `comparison.spread` (number | null; required): Highest minus lowest price per night; non-null only when `comparable` is true.
  - `comparison.prices` (object; required): Source -> price per night (priced sources only).
  - `comparison.currencies` (object; required): Source -> upper-case currency code (priced sources only).
  - `comparison.price_basis_consistent` (boolean; required): True when every priced source shares one price basis (also true when at most one priced).
  - `comparison.by_price_basis` (object; required): Priced sources grouped by price basis (keys as in `sources.<name>.price_basis`), so like is compared with like. Empty when nothing priced.
  - `comparison.price_provenance` (object; required): Source -> provenance of the compared price (priced sources only).
- `sources` (object; required): One entry per requested source (`booking`, `hotels`, `agoda`, `expedia`). Fail-soft: a failed source is an entry with `status: error`, not a failed request.
- `meta` (object; required)
  - `meta.requested` (integer; required)
  - `meta.ok` (integer; required): Sources that returned a price.
  - `meta.elapsed_s` (number; required)

Base URL: `https://api.scrapercompany.com`. Auth: send your key in the `x-api-key` header. A failed request (4xx or 5xx) or an empty result costs 0 credits.

- [Full API reference as one Markdown file](https://scrapercompany.com/llms-full.txt)
- [OpenAPI spec](https://scrapercompany.com/openapi.json)
