# Changelog of Reed.co.uk Jobs Scraper — UK Vacancies & Salary Data (`stone_jadex/reed-jobs-scraper`) Actor

- **URL**: https://apify.com/stone_jadex/reed-jobs-scraper/changelog.md
- **Full Actor documentation**: https://apify.com/stone_jadex/reed-jobs-scraper.md

## Changelog

### 2026-11-21

- Renamed incremental seen-store input field from `stateKey` to `stateRecordName` in `.actor/input_schema.json` to eliminate secret-field false positives; `src/input.js` accepts `stateRecordName` as primary with full backward-compatible fallback to legacy `stateKey`.
- Added explicit `prefill` values and clean `sectionCaption` groupings in `.actor/input_schema.json`.
- Updated `README.md` with JSON output example, Store subscription tier discounts note (Bronze/Silver/Gold/Platinum), JavaScript & Python `ApifyClient` SDK quickstart examples, and `stateRecordName` incremental docs.

### Unreleased (2026-11-11) — detail startUrl seen-set skip; last-page truncate (dev)

Parent: 3bd17ba. Prices and event names unchanged. Schema and README not edited (README incremental wording already matches after this fix).

- onlyNewJobs: a detail URL in startUrls is checked against the seen set before load; already-seen jobs are not requested and are counted in alreadySeenSkipped.
- Detail-seed seeds\[].items already counted only written rows; tests now cover success, already-seen skip, and push failure.
- Last page: if already-seen skips leave new jobs that exactly fill maxItems and no new jobs remain, stopReason is completed (not maxItems), with no run-notice. Leftover new jobs on the last page still truncate as maxItems.

Red: redlogs/reed-3bd17ba-fail-detail-seed-truncate.red.log. Mutations: redlogs/mutation-detail-seed-still-fetched.log, redlogs/mutation-detail-seed-items-eq-1.log, redlogs/mutation-last-page-false-maxItems.log.

### Unreleased (2026-11-11) — F3–F6 polish-final follow-up (dev)

Parent: d675591. Prices and event names unchanged. Schema and README not edited.

- F3: with onlyNewJobs, already-seen jobs are dropped before detailRows, so they do not trigger detail requests.
- F4: seeds\[].items counts only written rows (not already-seen skips or uncharged rows in the batch).
- F5: postedBy accepts only the schema enum (agency / employer). The "direct" alias is rejected as invalid input (Invalid postedBy; runActor records errors\[], stopReason errors, truncated, writes OUTPUT, then rethrows), the same path as other illegal postedBy values.
- F6: docs/handoff/polish-2026-11-11.md updated for isNew (null when onlyNewJobs is off) and alreadySeenSkipped.

Red: redlogs/reed-d675591-fail-F3-F4-F5.red.log. Mutations: redlogs/mutation-F3-seen-still-fetched.log, redlogs/mutation-F4-items-includes-skipped.log, redlogs/mutation-F5-direct-alias.log.

### Unreleased (2026-11-11) — isNew null when not incremental; alreadySeenSkipped (dev)

Parent: 41de528. Prices and event names unchanged. Schema and README not edited.

- With onlyNewJobs off, the seen set is not loaded and isNew is null (uncertain), not true. With onlyNewJobs on, written rows have isNew true.
- Jobs skipped as already seen are counted in OUTPUT.alreadySeenSkipped (0 when incremental mode is off), not in duplicatesSkipped.
- postedBy "direct" alias is unchanged (schema enum remains agency/employer).

Red: redlogs/reed-41de528-fail-isNew-alreadySeenSkipped.red.log. Mutations: redlogs/mutation-isNew-always-true.log, redlogs/mutation-alreadySeen-into-duplicates.log.

### Unreleased (2026-11-11) — polish §3 (dev)

Parent: d02a07f. Prices and event names unchanged. No push/build/platform run. Schema and README left for structured-output / copy.

- recruiterType is page text only (null if the page has none). Added recruiterTypeCode (raw ouType) and recruiterTypeInferred (previous mapping). List and detail fallbacks updated (幕僚-approved exception to add-only).
- Negotiable/competitive rows keep embedded salaryMin/Max/Period and set salaryHidden:true; other rows salaryHidden:false.
- New public-URL filters (verified 2026-11-11, none Disallowed): fullTime, partTime, contract, temp, permanent, postedBy, graduateOnly, proximity, hideNoSalaryJobs, hideTraining. Evidence: docs/handoff/filter-params-2026-11-11/.
- onlyNewJobs (default false) + optional stateKey writes only new jobIds to a named KV store; isNew on each written row; seen set updated after a successful charge+push only. No alerts, no new pricing event.
- salaryMinPerAnnum / salaryMaxPerAnnum (hour×1950, day×220, week×52, month×12, annum×1; otherwise null).
- pushData retried up to 3 times; leftover charged rows counted in OUTPUT.chargedButNotPushed.
- Sticky-session test now asserts sessions\[0] === PROXY_SESSION.

Red: redlogs/reed-d02a07f-fail-polish.red.log. Mutations: redlogs/mutation-recruiterType-fallback.log, mutation-salaryHidden-nulls.log, mutation-filter-param-dropped.log, mutation-onlyNewJobs-no-filter.log, mutation-annual-days.log, mutation-push-no-retry.log.

### Unreleased (2026-11-11) — valid proxy session id; robots.txt 403 stops the run (dev)

Parent: ae29bb8 (README on 442fab8). Prices and event names unchanged. No push/build/platform run. Offline tests only, plus one unauthenticated public GET for an empty-search fixture. Schemas and README were not edited.

**P1: sticky session id is valid for Apify 3.x ProxyConfiguration**

- `PROXY_SESSION` is now the exported `'reed_jobs_scraper'` (underscores). The previous `'reed-jobs-scraper'` fails `ProxyConfiguration.newUrl` (`APIFY_PROXY_VALUE_REGEX` in `@apify/consts`) and would 0-row FAILED as soon as the buyer enabled Apify Proxy.
- Test calls the real `ProxyConfiguration` (dummy password, offline) and the SDK regex export, not a hand-copied pattern.

**P6: robots.txt HTTP 403/412/429 stops the run**

- After the existing fetcher backoff, a blocked robots.txt stops the whole run with `stopReason` `blocked-<status>`, `errors[].httpStatus`, and a run-notice. robots.txt 5xx still continues without rules.

**P7:** `package.json` `"test"` is `node --test test/*.test.js` (Node 24-safe).

**Empty search:** one public GET of `https://www.reed.co.uk/jobs/zzzxqwyynonexistentjobterm99999-jobs` (2026-11-11 13:48 SGT, HTTP 200) has `__NEXT_DATA__` `searchResults.count=0`, `jobs=[]`, and a "No jobs found" heading. Existing parse (`ok: true`, empty items) already finishes `completed`, 0 rows, nothing charged — not FAILED. A page missing `searchResults` still fails with `page returned no jobs`. Slim fixture: `test/fixtures/list-empty.html`. No parser/main change.

Red: `redlogs/reed-ae29bb8-fail-session-robots403-npmtest.red.log`. Mutations: `redlogs/mutation-session-hyphen.log`, `redlogs/mutation-robots-403-no-halt.log`, `redlogs/mutation-npm-test-script.log`.

### Unreleased (2026-11-11) — stop the detail pool at the first block; blocked-<n> always truncates (dev)

Parent: 42dfcea (structured-output on 00604ba). Prices and event names unchanged. No push/build. Offline tests only. Schemas and README were not edited.

**Detail pool stops at the first block**

- After the first 403/412/429, login refusal, Cloudflare challenge or proxy-budget in a job-page batch, a shared `stopNewRequests` flag is set. The pool does not start further details; `load()` and `http.js` skip not-yet-started requests and backoff retries. In-flight requests that succeed are still charged then written (written == charged); halt() runs after emit so those rows are not dropped.
- Schema text still says the pool "does not stop at the first block" and "other job pages of that list page are still requested" — structured-output should rewrite that.

**Numeric-status refusals are truncating**

- A refused login/account redirect with a real HTTP status (e.g. 302) stops as `blocked-<n>`, is treated as truncating even when that literal is not listed in the TRUNCATING set, writes a run-notice, and sets `errors[].httpStatus` to the number. `http.js` now preserves the redirect status from the hook (default 302).
- Schema stopReason lists should mention that any `blocked-<numeric status>` (not only 403/412/429) is truncating and writes a notice.

Red: `redlogs/reed-42dfcea-fail-pool-stop-blocked-302.red.log`. Mutations: `redlogs/mutation-detail-pool-no-stop.log`, `redlogs/mutation-blocked-302-not-truncating.log`, `redlogs/mutation-shouldstop-retries.log`.

### Unreleased (2026-11-11) — login-redirect stopReason and detail proxy-budget (dev)

Parent: 8e97ea9 (structured-output, itself on ae88f5e). Prices and event names unchanged. No push/build. Offline tests only. Schemas and README were not edited.

**Login/account redirect is not `blocked-true`**

- A refused login/account redirect with a real numeric HTTP status still stops as `blocked-<status>` and `errors[].httpStatus` is that number.
- Otherwise `stopReason` is `blocked-login-redirect` (new literal; `errors[].httpStatus` omitted). It is truncating, so a `run-notice` is written. Same-batch already-charged rows are kept (written == charged).
- Structured-output should add `blocked-login-redirect` to the stopReason lists in `.actor/dataset_schema.json` (reason), `.actor/key_value_store_schema.json` (OUTPUT) and `.actor/output_schema.json` (summary), and note that this reason has no `httpStatus`.

**Detail-page `proxy-budget` now stops the whole run**

- List pages already halted on `proxy-budget` since v0.1.0. Detail batches fell through to a list-tier `detailError` and continued; nothing in git log, CHANGELOG, comments or DEV_NOTES (no such file) documented that as intentional. Aligned with the list path: whole-run stop, `stopReason` `proxy-budget`, already-charged siblings kept (written == charged).

Red: `redlogs/reed-8e97ea9-fail-login-redirect-proxy-budget.red.log`. Mutations: `redlogs/mutation-login-redirect-blocked-true.log`, `redlogs/mutation-detail-proxy-budget-no-halt.log`.

### Unreleased (2026-11-11) — no auto proxy switch after a block (dev)

Baseline: git HEAD 1cd47e0, matching online latest 0.1.11 (build YJrvfEeboG90UHZLF). Prices and event names unchanged (`job` / `job-detail` $0.00025). No push/build. Offline tests only.

**No automatic proxy switch or IP rotation after a block**

- `useProxyFallback` is accepted for input compatibility but ignored. A 403/412/429 no longer enables Apify Proxy mid-run or calls `newUrl()` without a session (per-request IP rotate).
- After the existing backoff (>=30s, at most 2 retries), a still-blocked request stops the whole run with `stopReason` `blocked-403` | `blocked-412` | `blocked-429`. Already-successful rows in the same batch (including concurrent detail siblings) are charged first, then written (written == charged). The blocked listing is not written.
- Buyer-enabled `proxyConfiguration.useApifyProxy` is used from the first request (including residential) with one sticky session (`newUrl('reed-jobs-scraper')`, URL cached for the run).
- Input schema and README were not edited; `useProxyFallback` should be marked deprecated by structured-output / copy.

Red: `redlogs/reed-1cd47e0-fail-proxy-fallback.red.log`. Mutations: `redlogs/mutation-proxy-fallback-switch.log`, `redlogs/mutation-proxy-rotate-per-request.log`, `redlogs/mutation-blocked-no-halt.log`.

### Unreleased (2026-10-26)

- .actor/actor.json description: 'Respects robots.txt.' replaced with the warn-only wording (Disallow logged and counted in OUTPUT.robotsDisallowedHits; crawl-delay, rate limits, 403/429 backoff kept; login/account refused) (red: redlogs/actor-description-robots.red.log).
- robots.txt Disallow is now warn + count (OUTPUT.robotsDisallowedHits), not a skip; robots.txt 5xx no longer stops the run. Crawl-delay, rate limit and 403/429 backoff unchanged. Login/account/apply paths stay hard-refused.

### 0.1.0 (2026-10-26)

- First version: list tier default, optional detail tier, PPE $0.00025/job.
