# Changelog of TikTok Scraper - Hashtags, Profiles & Videos (No Login) (`badr_xba/tiktok-scraper`) Actor

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

## Changelog

### 2026-11-09 (review invitation)

- Successful runs that saved at least one result end their status message with one short, optional invitation to leave a Store review or open an issue (never on failed or empty runs); README section "Feedback and reviews". Output and billing unchanged.

### 2026-11-08 (visual kit 1.1.0)

#### Added

- `engagementRate` on post rows: (likes + comments + shares) / views in percent, 2 decimals, from the row's own
  counters; empty without views. Shown in the *Posts overview* view and used by the report.
- Input `excludePinnedPosts` (*Skip pinned posts*, default off = unchanged behaviour): pinned posts are dropped
  before saving (not billed) and counted in `RUN_SUMMARY.filteredPinned`.
- Visual report (kit 1.1.0): live progress while the run goes on (inputs done / given, results so far, refreshed
  at most once a minute), warnings and failed inputs grouped by error code, data-quality panel, at most 3 images
  per result (photo posts keep their real photo count on the badge).

#### Fixed

- The REPORT page is now also written when a run is aborted or crashes (final status instead of "Running").

### 2026-11-08

#### Changed

- *Media and files* view: the first column is now the real video cover (`videoMeta.coverUrl`, filled on every
  post row). The top-level `coverUrl` / `avatarUrl` are the stored copies made only when cover / avatar downloads
  are on, so they now show as *Saved cover file* / *Saved avatar file* links instead of mostly empty image columns.

#### Added

- **Visual report** (`REPORT` record, Output tab → *Visual report*): video cards with cover, avatar, views,
  likes, comments, shares, duration and hashtags; profile header cards; slideshow galleries; key figures, charts,
  search, filters, sorting, table view, full-size viewer and CSV/JSON export of the filtered rows. Built by the
  shared `src/visual_kit.py` (v1.0.0) with this Actor's `src/report.py`. At most 2,000 rows are kept in memory for
  it; it is never billed and a report error is only logged as a warning.
- Dataset views show thumbnails: cover (Posts overview, Hashtags) and avatar (Profiles, Authors and music).
- Output schema: *Visual report* link; key-value store schema: `REPORT` (text/html).

#### Fixed

- Image fields (`authorMeta.avatar`, `avatar`, `videoMeta.coverUrl` / `originalCoverUrl` / `dynamicCoverUrl`,
  `musicMeta.coverMediumUrl`, hashtag `coverUrl`, `slideshowImages`) are normalized: `//host/…` becomes
  `https://host/…`, blank or non-http(s) values become `null`, and unusable slideshow entries are dropped instead
  of being saved as `null`. Valid links are kept byte for byte (they are signed).

#### Tests

- `tests/test_report.py`: 14 tests on 13 real rows (image ownership, placeholders, galleries, URL normalization,
  escaping, a 5,000-row synthetic set, export = embedded data, failure safety).

### 2026-11-07

#### Fixed

- Hashtag rows: `videoCount` is filled again from TikTok's exact `statsV2` figures (it was always empty), `viewCount` uses the exact figure, and `coverUrl` falls back to the hashtag picture when TikTok has no cover.
- Fields of the wrong type (`"profiles": 12.5`, `"hashtags": true`, a string proxy setting) no longer crash or vanish silently: they are reported in `FAILED_INPUTS` / the log and the run carries on.
- Switches sent as text by API clients (`"false"`, `"0"`, `"no"`) are read as off.
- `resultsPerPage` is kept between 1 and 1,000; negative filters count as 0.
- Local and API runs without `scrapeProfileVideos` now use the input schema default (off), like platform runs.
- Dates in full ISO form (`2026-01-31T10:00:00.000Z`) and `N years` are understood in *Published after / before*.
- An unexpected error on one hashtag, profile or browser job is recorded as `UNEXPECTED_ERROR` for that input instead of ending the whole run.
- The run stops as soon as the last row the maximum charge allows has been saved, instead of reading more pages it could not save.
- Browser: a failed context or page creation, a crash while closing a page, or a non-JSON feed answer are handled as a failed attempt.

#### Improved

- Chromium starts once (it used to start twice: once to test it, once to use it), and in the background while the plain-HTTP steps run.
- Browser waits end as soon as TikTok's answer has arrived (same ceilings as before: 5 s first answer, 2.5 s per scroll, 9 s playback). Local measurement, hashtag with 10 videos: 20.0 s → 14.6 s, peak memory 679 → 618 MB.
- Media downloads are streamed with the size cap applied while downloading, and retried with back-off on network errors, 429 and 5xx.
- Explicit connect timeout (15 s) on every HTTP request.
- Every row is checked against the dataset schema types before it is saved; mismatches are logged once and counted.
- `RUN_SUMMARY` adds `httpRequests`, `stepSecs` and `outputTypeMismatches`; the log shows how long each step took.

#### Schemas and docs

- `dataset_schema.json` now has a complete `fields` block (59 columns, all nullable, with notes on columns that are often empty).
- README: hashtag row and run summary fields corrected; key-value store schema description of `RUN_STATS` corrected.
- `requirements.txt`: Playwright upper-bounded (`<2`), compatible with the base image.

#### Tests

- `tests/`: 42 offline tests (input aliases and wrong types, parsers on a saved TikTok page and hashtag answer, schema checks on real platform rows, retries/back-off with a mocked HTTP layer, billing limits and dedupe, browser helpers). Run `python -m pytest -q`.
