# Changelog of TikTok Shop Scraper (US) (`rastriq/tiktok-shop-scraper`) Actor

- **URL**: https://apify.com/rastriq/tiktok-shop-scraper/changelog.md
- **Full Actor documentation**: https://apify.com/rastriq/tiktok-shop-scraper.md

## Changelog

### 0.1 (2026-11-09)

- First version of TikTok Shop Scraper (US only): product pages of `shop.tiktok.com/us/pdp/...` from `productUrls` / `productIds`. One `product` row per page and one `review` row per embedded review (max 5).
- Access chain: US datacenter proxy (curl_cffi, Chrome TLS fingerprint, no session or cookies); per-product fallback to a US residential proxy after a soft block (`error_code 23004014` or Security Check), capped by `maxResidentialMB` (default 20 MB in code); own `proxyConfiguration` replaces the chain. Residential bytes reported in `SUMMARY` (`ext_proxy_bytes_residential`).
- Run canary: the first product (or the known PDP 1732602336680710454) must return title + price + sold count before anything is pushed or charged.
- `SUMMARY` record with status `completed | no_results | partial | failed`, per-tier requests and bytes, failed items. Limits: 1 req/s, 2 workers, retry budget 50, 10 consecutive failures close the run cleanly.
- PPE events `product-record` and `review-record`; delisted or blocked rows are emitted flagged and not charged.
- Privacy: `author_hash` (HMAC-SHA256 keyed with `AUTHOR_HASH_SALT`), `hideAuthorNames`, emails and phones redacted, no avatars or raw ids.
- Not in 0.1: shop listings and search (no endpoint or links in the captured page JSON without signed requests), reviews beyond the 5 embedded, other markets.

#### Review round (same version, not yet released)

- Fix: `httpx` declared in `requirements.txt` (the container did not start without it) plus a test that every third-party import in `src/` is declared.
- Time: reads `ACTOR_TIMEOUT_AT` and stops taking items 90 s before it; also handles the ABORTING event. Both close `partial` with SUMMARY (`stopped_reason` = `timeout` / `aborting`). `timeoutSecs` raised to 7200 for the 5,000-product limit.
- Residential: hard max 50 MB (clamped with a warning), cap checked before each request using a 45 KB estimate, adaptive cut (>= 5 attempts and >= 60% delisted or failed), triggers limited to `error_code 23004014` or Security Check (a generic 403 or an empty page no longer use residential).
- IP rotation: after a datacenter soft block the IP is rotated and the product is retried once on datacenter before residential; rotation never closes a connection with requests in flight; status 0 is retried.
- Status: all pushes failing with products fetched now closes `failed` / `data_loss` (same rule as the shared core). A failure while building rows no longer stops the run.
- Canary: up to 3 input items, then 3 known US products; `canary_failed` only if none passes.
- Privacy: emails and phones redacted in `ext_description` and `ext_specifications`; legal entity, manufacturer, address and contact specifications dropped; the cookie jar is cleared between requests; `new_url()` returning nothing is an error (never a connection without proxy).
- `SUMMARY.totals` counts charged product and review records and free rows.
