# Changelog of Google Trends Scraper (`devilscrapes/google-trends-scraper`) Actor

- **URL**: https://apify.com/devilscrapes/google-trends-scraper/changelog.md
- **Full Actor documentation**: https://apify.com/devilscrapes/google-trends-scraper.md

## Changelog — Google Trends Scraper

### \[Unreleased]

### \[0.10] — 2026-06-09

- **Fix: interest_by_region broken by Google endpoint rename** — Google renamed the geo
  widgetdata endpoint from `multiGeo` to `comparedgeo`. All `interest_by_region` widget
  fetches were returning HTTP 404, causing runs with that widget to partially or fully fail
  (root cause of 66% 30-day success rate: 3/9 customer runs failed). Updated
  `WIDGET_ENDPOINT_MAP` in `client.py` and the corresponding test assertion in
  `test_client.py`.

### \[0.9] — 2026-06-05

- Re-publish to clear "Under maintenance" flag caused by v0.7 build using `widget["type"]` (volatile frontend strings) instead of `widget["id"]` (stable backend contract). Fix already in v0.8 local code — this push makes 0.9 the live build.
- No code changes vs v0.8; version bump only to satisfy Apify's strict-greater publish requirement.
- Cloud QA PASS: build 0.9.1
  - Prefill run (runId=Pgd8MDTtFWb5JcuD3): SUCCEEDED, 106 rows, interest_over_time widget parsed correctly by id
  - QA fixture run (runId=uLci6sHz2wQ6dcWOb): SUCCEEDED, 5 rows

### \[0.8] — 2026-06-01

First fully functional cloud release. All four bug classes discovered via cloud QA fixed:

- **Fix: XSSI prefix missing in explore response parse** — `fetch_explore_tokens` now strips `)]}'\\n` before `json.loads` (v0.2).
- **Fix: missing `date` param on explore URL** — added `date=timeframe` to the SPA-style request params (v0.3).
- **Fix: soft-block retry for empty 200 responses** — `_request_with_backoff` now accepts `require_body=True`; empty-body 200s rotate proxy and retry (v0.4).
- **Fix: wrong API endpoint** — changed `EXPLORE_URL` from `/trends/explore` (HTML SPA) to `/trends/api/explore` (JSON API). Params changed from `q=` SPA format to `req=<JSON>` format (v0.5/v0.6).
- **Fix: XSSI prefix variant** — `/trends/api/explore` returns `)]}'\\n` (no comma); `/trends/api/widgetdata` returns `)]}'` + `,` + `\\n`. `_strip_xssi_prefix` now handles both (v0.7).
- **Fix: widget id field** — `_parse_widgets` was reading `widget["type"]` (frontend chart type like `fe_line_chart`) instead of `widget["id"]` (backend data type like `TIMESERIES`) (v0.8).
- Added regression tests for each bug class (134 total, all passing).
- Cloud QA PASS: build 0.8.1, runId=ceNM23REnNFblo6Nm, 5 rows scraped, $0.00078 compute.

### \[0.1] — 2026-06-01

- Initial Apify Store push. First cloud build (0.1.1). Cloud QA revealed XSSI/API bugs fixed in 0.8.
