# Changelog of Douban Scraper API – 豆瓣 Movies, Books, Reviews & Comments (`deadc0dex/douban-scraper`) Actor

- **URL**: https://apify.com/deadc0dex/douban-scraper/changelog.md
- **Full Actor documentation**: https://apify.com/deadc0dex/douban-scraper.md

## Changelog — deadc0dex/douban-scraper

### 2.1 (2026-10-16) — strict discussion search, reply operations accepted (same events and prices)

- `strictMatch: true` (topic_search, group_search): keep only topics / groups whose title contains the keyword (spaces, width and case ignored) or every part of it (小米 + SU7). Douban's group search drops the Latin part of mixed keywords — on 2026-10-16 the 48 newest results for 小米SU7 all said only 小米 — so a mixed keyword is also searched by its Latin part (SU7) and merged (newest first with sortBy latest). Same keyword with strictMatch: 50/50 titles mention 小米SU7. Filtered rows are not billed (`filteredOut.strictMatch`). Without strictMatch, topic_search adds a nextStep pointing to it.
- `operation: "topic_replies"` and `"review_replies"` are now accepted by the input schema (before, only via the legacy `mode` field): topic / review URL → group_topic_details / review_details with replies\[] embedded.

### 2.0 (2026-10-15, builds 2.0.1–2.0.3) — research workflow, replies, discussion search, trust fields (same events and prices)

- New `subject_research`: title/keyword (or ids/URLs) → top `maxSubjects` subjects → full detail row + `maxCommentsPerItem` hot short comments + `maxReviewsPerItem` reviews → one free `insights` row per subject (star mix, heuristic sentiment, top CJK terms, top provinces, `matchTerms` counts, most-voted positive/negative opinion, Douban's official rating next to the sample). Billed with the existing subject / comment / review events.
- New `topic_search`: discussions mentioning a keyword across all Douban groups (www.douban.com/group/search), relevance or `sortBy: "latest"`, up to 500 per keyword (subject-row event).
- `include: ["replies"]` (+ `maxRepliesPerItem`, default 20, max 200): replies embedded as `replies[]` + `repliesTotal` in group topic rows and full review rows (nested review replies flattened with replyToId/replyToName). No extra charge. Douban now serves topic replies to guests (v1 measured 403 need_permission; re-tested 2026-10-15 from sandbox and Apify). Reply-style operation names (`topic_replies`, `review_comments`…) map to the detail operation with replies (via `mode`).
- `include: ["insights"]` on comments/reviews: one free insights row per subject.
- Trust fields on every data row: `isPartial`, `unavailableFields`, `collectionWarnings` (e.g. rating request failed → `ratingDistribution` listed; include details failed → `details`). A list stopping on a failed page returns earlier rows plus a free `PARTIAL` row. Summary: `requestedRows`, `returnedRows`, `perInput` (requested, returned, availableOnDouban, stopReason), `insightsRows`.
- Computed fields: subjectDetail `positivePct`, `negativePct`, `wishToDoneRatio`, `commentsPer1kRatings`, `reviewsPer1kRatings`; review `helpfulRatio`; topicDetail `likesPerReply` (formulas in capabilities.computedFields; null when an input is missing).
- `minRatingCount` filter (search, charts, explore, subject_research). `matchTerms` = keep rows mentioning any term (after fetch, before billing).
- Bug fix (2.0.3): Douban sometimes answers `/rating` without the 5-star `stats` array (caught on Apify by the 2.0.2 smoke test: wish/done counts present, `ratingDistribution` null and no warning). The Actor now retries once and, if it is still missing, lists `ratingDistribution` in `unavailableFields` with a warning instead of a silent null. Any failed rating request (incl. 404) is now reported the same way.
- Billing event per row type now comes from one map (`ROW_EVENTS` in src/output.js), so a future event split is a config change. Prices unchanged.
- Not shipped: the unreleased Oct-13 draft (lower prices, a separate `reply` event, snapshot deltas) — the Actor is public, so no price or event changes.

### 1.1 (2026-10-13, builds 1.1.1–1.1.6; latest 1.1.6) — efficiency + polish (same inputs, outputs, events and prices)

- Subject details use Douban's generic `subject/{id}`, `subject/{id}/rating` and `subject/{id}/desc` endpoints: no movie→book→music type probing, all 3 requests start together, and the per-IP `subject_ip_rate_limit` (which only applies to the typed `movie|tv|book|music/{id}` path, ~20 calls per IP) is no longer hit. Typed path + Apify Proxy stay as automatic fallbacks.
- `include: ["details"]` with a `fields` list covered by the list row + rating + info table (e.g. title, rating, imdbId, ratingDistribution) skips the 11–18 KB subject call (2 tiny requests per row instead of 3).
- Info table (IMDb id, writers, ISBN…) read from `m.douban.com/rexxar/api/v2/subject/{id}/desc` on the same keep-alive connection (was a second host, www.douban.com); the h5 page stays as fallback.
- Comments/reviews/photos read the generic `subject/{id}/…` paths (type taken from the payload: no probe request); cast tries `movie/{id}/celebrities` first.
- Request gate: 8 in flight with no fixed spacing (was 3 + 120 ms); adaptive slow-down to 3 in flight + 300 ms after the first block. `requestDelayMs` default 0 (was 120).
- Charts: one request for up to 250 rows (Top 250 = 1 request); search fetches page 1 then the rest in parallel; comments pages start together; full-text reviews 8 in flight.
- TLS connection to m.douban.com is opened while the input is read.
- Lean mode: `input` dropped when it only repeats the id; `actors` keeps the first 10 (ask `fields:["actors"]` for all). Compact/full unchanged.
- `originalTitle` also read from the info table's 原名 row.

### 1.0.5 (2026-10-13)

- `onlyNew` legacy aliases (`deltaMode`, `onlyChanges`, `onlyChangedRows`) no longer masked by Apify's injected `onlyNew:false` default.

### 1.0.4 (2026-10-13)

- Automatic proxy fallback: on Douban `subject_ip_rate_limit` / block the client switches from direct requests to Apify Proxy (auto) and rotates the session on each further block. Summary: `rateLimits`, `proxyFallback`. Failed `include details` enrichments aggregated into one warning.

### 1.0.3 (2026-10-13)

- `search` / `group_search` warn when urls/ids/charts/tags are passed (ignored for keyword operations).

### 1.0.2 (2026-10-13)

- Legacy `mode` wins over the injected `operation:"auto"`; removed schema defaults on `maxItems` and `subjectType` (legacy aliases `maxResults`, `searchType`…).
- onlyNew fills its quota from deeper pages only within a bounded window; clear status message when nothing is new.

### 1.0.1 (2026-10-13)

- First build: 12 operations (search, subject_details, comments, reviews, review_details, celebrities, photos, charts, explore, group_search, group_topics, group_topic_details) + auto + capabilities, PPE events subject-row / subject / comment / review / group-topic.
