# Changelog of Instagram Posts Timeline (`opspilot.cc/instagram-posts-timeline`) Actor

- **URL**: https://apify.com/opspilot.cc/instagram-posts-timeline/changelog.md
- **Full Actor documentation**: https://apify.com/opspilot.cc/instagram-posts-timeline.md

## Changelog

### \[0.6] - 2026-11-11

#### Changed

- **One run-wide request budget for the whole run.** Upstream requests are now
  capped at **12 on the free plan / 40 on paid plans**, shared by every
  account, keyword, hashtag or post in the run and counting retries. Previously
  only each item had a page cap, so cost multiplied by the number of items a
  wide run could issue hundreds of calls under one actor-start charge. A single
  item can still walk all of its pages; only wide runs are compressed.
- The ceiling is enforced in `UpstreamClient.getJson()` before every real HTTP
  call, so it covers helper-leg requests (profile lookups, enrichments) too.
- Exhaustion is a business outcome: a `type: "notice"` dataset row,
  `SUMMARY.budgetExhausted`, `SUMMARY.maxRequestsPerRun` and
  `SUMMARY.upstreamRequests`, and a SUCCEEDED run — never a throw.
- `test/request-budget.js` (wired into `npm test`) drives both tiers with a
  fake upstream that never stops paginating, and asserts retries count toward
  the same budget.

### \[0.5] - 2026-11-09

- The Billing section claimed the Actor charges "pay per result". It does not: the
  only charge event registered on the platform is `apify-actor-start`, collected once
  when the run begins, so a run returning 300 rows costs the same as one returning 3.
  The section now describes that, and stops promising something the invoice contradicts.
- Free-plan runs are capped at 5 accounts x 3 pages x 60 posts. Every page, seed and enrichment is one upstream
  request, so this is where the real cost sits. The cap is written to the dataset as a
  `notice` row and to `SUMMARY.appliedLimits.capped`, and a capped run still ends
  SUCCEEDED - exceeding a plan quota is never a failed run.

### \[0.4] - 2026-10-12

- The run can no longer be killed by the key-value store. Under
  `LIMITED_PERMISSIONS` — how Apify's automated QA and every API-triggered run
  starts an Actor — opening the store is refused with HTTP 403
  (`KeyValueStoreCollectionClient.getOrCreate`, path `/v2/key-value-stores`).
  That call sat in a `||` fallback chain and was never inside a `try/catch` of
  ours, so the throw ended the run with exit code 91 and a reported FAILED run
  with zero items. Every store open now goes through a wrapper that returns a
  no-op store instead of throwing, so the free-run counter and the run SUMMARY
  degrade and the actual work proceeds.
- The gate store's name-to-id lookup no longer depends on the store still being
  on the first page. There is no GET-by-name endpoint, so the lookup pages
  through `/v2/key-value-stores`; it used a fixed `limit=50`, which silently
  stopped containing gate stores once the account passed 50 of them — and the
  account creates a new default store on every run, so that list grows on its
  own. The lookup now pages (100 per page, up to 20 pages).

### \[0.3] - 2026-10-09

#### Changed

- README: added three sections before Quick start - what you can use it for, who it fits, and who it does **not** fit. The last section now names the Actor's real limits (what it cannot reach, which field is unavailable, which reading of a metric is wrong), so a buyer can tell whether it is the wrong tool before paying.

### \[0.2] - 2026-10-08

- KV writes and status messages can no longer hang the run. Under
  `LIMITED_PERMISSIONS` these calls do not merely fail — they can return a
  promise that never resolves. Measured on a live run of a sibling Actor:
  results were fetched successfully, then the following `setValue` never
  returned and the run sat for 49 minutes before being aborted with an empty
  dataset and a paid bill, and not one error in the log. `try/catch` cannot
  help there — it catches a rejection, not a promise that never settles. Every
  bookkeeping write now races a 15s timeout and reports the failure as
  non-fatal, so a stuck store costs one summary field instead of the whole run.

### 0.1 (2026-10-05)

- Initial release. One dataset row per Instagram post across the whole timeline: `contentType` (video / image / carousel, read from Instagram's own `media_type`), play counts on video rows, likes, comments, view-to-like ratio, carousel slide count and video-slide split, tagged users, caption with a caption-less flag, music title, duration, account details, publish time and a direct link.
- The summary reports, per account: posts collected, the video/image/carousel split and `videoShare`, `medianPlayCountVideoOnly`, median likes and comments, how many rows carried a play count, how many posts used tagging, caption coverage, the five most-liked posts, and a `playsNote` about why photo posts have no play count.
- Input takes numeric Instagram user ids (handles are refused up front with an explanation) and an optional `contentTypes` filter (`video` / `image` / `carousel`, empty meaning all formats), up to 20 accounts and 200 posts each.
- Measured quirks handled: unlike most Instagram legs on this provider, `items` / `next_max_id` / `more_available` sit at the **top level** of `data` rather than nested under `data.data` (the nested shape is still read so a leg change is survivable); `media_type` is the reliable format discriminator (measured 1=image, 2=video, 8=carousel in a 12-row page) and is used instead of inferring the format from whether a play count exists; only video posts can carry `play_count` and not every one does — measured with and without in the same account — so a row without one reports `playCount: null` with `playsAvailable: false` rather than a fabricated zero; `like_and_view_counts_disabled` marks rows where a 0 means hidden; and paging stops when `next_max_id` does not advance.
- Verified on a live account: 24 posts — 13 video, 6 image, 5 carousel (54.2% video), video-only median plays 2,078,047. A **second, cloud run on the same account returned video rows with no play count at all**, so the Actor reports `playsAvailable` per row and `postsWithPlayCount` per account rather than claiming every video row carries one.
- Free tier: 5 runs/day (counter persisted in a cross-run named KV store).
