# Booking adapter plan v1

Status: first implementation target after Trivago and Airbnb.

## Goal

Booking becomes the third strong Market Evidence Kit input.

The adapter should accept saved Booking search result HTML or outerHTML and return the same output contract as other adapters:

```text
Booking HTML / outerHTML
→ normalized observations
→ market signal
→ own price position
→ cm_market_evidence_package_v1
```

## First supported input

The first real sample uses Booking search results with cards like:

- `data-testid="property-card"`
- `data-testid="title"`
- `data-testid="price-for-x-nights"`
- `data-testid="price-and-discounted-price"`
- `data-testid="review-score"`
- Booking hotel URLs under `/hotel/...`

The page source sample has around 25 property cards. The more focused outerHTML sample has around 147 property cards after using the Booking “load more results” button.

## Parser v0.1 requirements

For each property card:

- extract property name
- extract Booking URL
- derive a stable accommodation id from the URL
- extract total price
- extract nights from text such as `10 noči, 4 odrasli`
- derive nightly price
- extract rating from review score text such as `Ocena: 9,7`
- extract review count from text such as `86 komentarjev` / `86 mnenj`
- detect quality flags:
  - free cancellation
  - no prepayment
  - private host
- detect own listing by partial name match
- deduplicate by accommodation id or normalized name + price

## Product rule

Same as Trivago and Airbnb:

- form period remains the user intent / source of truth
- captured period is evidence only
- if periods differ later, show a warning; do not silently rewrite form dates

## Non-goals for v0.1

- no background scraping
- no Booking account/session handling
- no automatic load-more clicker yet
- no writing prices to CM
- no Basket aggregation yet

## Future notes

Booking is useful beyond price:

- accommodation type mix
- rating distribution
- review count distribution
- cancellation/payment policy distribution
- apartment vs hotel competition
- host/private-host signals
