# Changelog of Airbnb Guest Origin Scraper – Guest Demographics by Country (`integrative_tangent/airbnb-guest-origin-scraper`) Actor

- **URL**: https://apify.com/integrative_tangent/airbnb-guest-origin-scraper/changelog.md
- **Full Actor documentation**: https://apify.com/integrative_tangent/airbnb-guest-origin-scraper.md

## Changelog

### 1.0.11 — 2026-08-12

#### Fixed

- **Listing titles no longer fall back to Airbnb's site-wide default.** The
  first live run of 1.0.10 resolved a title of `Airbnb: Vacation Rentals,
  Cabins, Beach Houses, Unique Homes & Experiences` — the generic `og:title`
  Airbnb serves on a bot-detection shell. That is worse than `null`: it looks
  like real data and quietly corrupts every row and any join a property manager
  makes against their own inventory. Generic titles are now rejected and the
  field stays null.
- The SEO-tail stripper handles every property type, not just houses. Airbnb
  writes `<name> - Aparthotels for Rent in <place> - Airbnb`, and the word
  varies (Houses / Apartments / Aparthotels / Condos / Villas / …), so it now
  matches the `… for Rent in …` shape instead of a hardcoded list.
- 6 new title-parsing assertions (37 total).

### 1.0.10 — 2026-08-12

#### Fixed — listings returning 0 reviews despite having reviews

Symptom: a listing with 64 public reviews returned an empty dataset, with
`Could not discover reviews hash from network interception` followed by
`Playwright fallback captured 0 reviews`.

Root cause, confirmed by inspecting live traffic: **Airbnb server-renders the
first page of reviews.** On a fresh load of `/rooms/<id>` — and of
`/rooms/<id>/reviews` — no reviews GraphQL request is made at all. The query
only fires on a client-side route change or when paginating. Hash discovery
worked by intercepting that request, so on those listings it found nothing, and
the Playwright fallback failed for the identical reason: it also listens only
for XHR responses that never arrive.

- **The `StaysPdpReviewsQuery` hash is now pinned** (`REVIEWS.knownHash`) and
  used directly. Verified against two unrelated listings — a villa and an
  aparthotel — returning HTTP 200 with full `localizedReviewerLocation` data.
  This removes discovery from the critical path and cuts ~30s off every run.
- **Automatic recovery if Airbnb rotates the hash.** A 400/404, or a GraphQL
  error mentioning a persisted/unknown query, is now classified as
  `hashRejected`; the actor discovers a fresh hash once per run and retries
  instead of failing every remaining listing the same way.
- **Discovery now actually triggers the request** when it is needed: it clicks
  the real "Show all N reviews" control (an in-app navigation) and then
  paginates, rather than loading the page and waiting for a request that never
  comes. The old selector was broad enough to click unrelated buttons.
- GraphQL error messages now reach the log and the run status instead of the
  opaque `GraphQL body errors`.

#### Added

- Parser tests against a **real captured payload**, including the tenure strings
  Airbnb returns in the same field as locations ("10 months on Airbnb") — these
  must be dropped, not counted as places, or the country mix fills with garbage.
  31 assertions total.

### 1.0.9 — 2026-08-12

#### Added

- **Country × month seasonality.** Every summary row now carries a `seasonality`
  block: the property's own month shape, plus a 12-month breakdown per country
  with a **seasonality index** — a country's share of a month divided by the
  property's overall share of that month. The index is the point: raw monthly
  counts only tell you when the property is busy, which looks the same for every
  nationality. An index of 2.0 means that country is twice as concentrated in
  that month as the average guest.
- **Interactive HTML dashboard**, written to the key-value store as
  `report.html` and surfaced in the Console's Output tab via the new inline
  `output` schema in `.actor/actor.json`. It has a listing filter, the country
  mix, a country × month heatmap, a per-country drill-down, a source-market
  trend by year, and a plain-language read for the selected country
  ("Guests from Canada concentrate in Feb, Mar — up to 2.1× their average
  month"). Self-contained: no external requests, works in light and dark mode,
  every chart has a table-view twin. Report failures are non-fatal.
- `stayLagDays` input (default 7). Reviews are written after checkout, so review
  dates are shifted back by this many days before month bucketing to approximate
  the stay. Set to 0 to bucket by the literal review date.

#### Notes on statistical guardrails

Testing against synthetic country profiles showed the naive version inventing
seasons — a 7-review country reported a "5.3× January peak" built on 2 reviews.
Peaks are now only claimed when the country has **30+ located reviews** and the
month itself has **3+**; the heatmap only shows countries with **10+**, and
cells built on 1–2 reviews are faded. Countries below the bar keep their raw
counts, they just don't get told they have a season.

### 1.0.8 — 2026-08-12

#### Fixed

- **A listing URL pasted into `searchUrl` no longer crashes the run.** Previously
  `https://airbnb.com/rooms/<id>?...` threw `Could not extract bounding box from
  search URL`, which Apify surfaced as an unhandled exception. The actor now
  detects the `/rooms/<id>` pattern, logs a warning, and runs it as Input Mode A.
- **Search URLs without map coordinates now fall back to the place name** in the
  URL path (`/s/Las-Terrenas--Dominican-Republic/homes` → geocode "Las Terrenas,
  Dominican Republic") instead of failing.
- **Input is validated before the Airbnb session is created.** Bad input used to
  cost ~10s of proxy and browser startup before failing; it now fails in under a
  second with an actionable message in the run's status line.
- Empty strings from untouched form fields no longer win input-mode detection.
- Full listing URLs pasted into the "Listing IDs" field are accepted and
  de-duplicated instead of being silently skipped.
- `extractListingIdFromUrl` now handles `/rooms/plus/<id>` and similar prefixed
  paths.

#### Added

- **`listingTitle`, `roomType` and `listingRating` are now populated in the
  listing-ID and URL modes** via one lightweight request per listing. They were
  always `null` before, which made the dataset unreadable and impossible to join
  against a PMS export. Controlled by the new `fetchListingDetails` option
  (default on); failures are non-fatal.
- **Sample-confidence fields on every summary row**: `sampleSize`,
  `marginOfErrorPct` (95%, worst case) and `confidence`
  (high/medium/low/insufficient). A "67% United States" built on 12 located
  reviews is ±28pp, and the output now says so.
- Warnings when `maxReviewsPerListing` is set below 30 and when a listing's
  located-review count is too small to interpret.
- `src/input-resolver.test.ts` — 21 assertions covering URL parsing, input
  recovery and the confidence math, including a regression case for the exact
  1.0.7 failure. Run with `npm test`.

#### Changed

- `maxReviewsPerListing` prefill raised from 20 to 100. Roughly half of Airbnb
  reviewers show no location, so 20 reviews yielded ~10 usable points — not
  enough to support the claim the actor exists to make.
- Input schema copy now spells out that Mode C wants an `airbnb.com/s/...` URL,
  and warns that newer listing IDs are 18 digits.

### 1.0.0 — 2026-07-01

- Initial release.
- 5 input modes: listing IDs, URLs, search URL, bounding box, location name.
- Reviewer location extraction via StaysPdpReviewsQuery (GraphQL) with Playwright interception fallback (ported from internal Actor 6).
- Country/region normalization (multi-language aliases, US states, CA provinces, AU states, 200+ city fallbacks).
- Demographic aggregation: per-listing summaries, global summary, per-year top-country trends.
- `emitReviewRows` / `includeReviewText` switches to control dataset size.
