# Changelog of SAM.gov Government Contract Opportunities Monitor (`lindenwerk/sam-gov-contract-matcher`) Actor

- **URL**: https://apify.com/lindenwerk/sam-gov-contract-matcher/changelog.md
- **Full Actor documentation**: https://apify.com/lindenwerk/sam-gov-contract-matcher.md

## Changelog

### README: cross-links and examples, no code or price change (2026-10-08, build 0.1.4)

- Product name in the README now matches the Store title ("SAM.gov Government Contract Opportunities Monitor").
- New Examples section linking the published example task "Find SAM.gov IT contract opportunities".
- "Other Lindenwerk Data Actors" lists all six sibling Actors by their current Store titles and Store URLs.
- No change to code, input schema, pricing, events, defaults or output.

All notable changes to the SAM.gov Contract Opportunities Monitor by Lindenwerk Data.

### Listing quality update (2026-10-06, before the first public release)

- README: starts with an H2 "What is ...?" (Apify Store shows the Actor name as the page H1), new step-by-step
  "How to ..." section (first run, own profile, schedule, integrations, API) and a list of the other Lindenwerk Data Actors.
- Input form: fields grouped into sections (Competitor tracking, Date range, Output, Advanced); "Minimum relevance score" moved up next to the other filters; a "Quickest try" hint in the form description.
- No change to the code, prices, events, output fields or defaults.

### 0.1 (2026-10-05)

Pre-publication update (2026-10-05, later the same day): Store-test-proof defaults.

- The input form prefill is now a stateless 7-day `search` (`postedWithinDays` 7, `maxResults` 25; keywords and NAICS
  unchanged). Apify's daily Store test runs the prefill, so it gets rows on any day. The old monitor prefill could
  return 0 rows on a quiet day, or after an unchanged-extract (ETag) skip, and 3 failed days in a row mark an Actor
  "under maintenance". API, task and schedule defaults are unchanged (`monitor`, `lookbackDays` 3, `maxResults` 200).
- New `firstRunBackfillDays` (default 7, 0 = off): a monitor run with no saved state whose window is empty looks back
  7 posting days once.
- More robust: an unexpected error while reading the extract (or calling the optional API) no longer crashes the run.
  The run fails cleanly with no charge and no state change. A fallback download now shows as a warning, and empty
  runs end with a clear status message. `RUN_SUMMARY` gains `firstRun` and `firstRunFallbackUsed`.

First public release:

- Source: the official SAM.gov Data Services public extract "Contract Opportunities / datagov"
  (`ContractOpportunitiesFullCSV.csv`, no key, no login), one download per run. The file is sorted newest first, so
  the Actor stops reading once it has passed the date window (about 6 MB for a daily monitor, 72 MB for 30 days).
  Mixed Windows-1252 / UTF-8 decoding.
- Monitor mode skips the download when the file's ETag has not changed since the last run.
- Optional: the user's own SAM.gov public API key (`samApiKey`, secret) adds notices posted after the extract was
  built (at most 2 requests per run). The key is never logged or output.
- One row per solicitation: amendments and stage changes (presolicitation → solicitation) are merged, with
  `relatedNoticeIds` and `versionCount`. Awards are grouped per contract (award number), so multiple-award contracts
  list every awardee.
- Modes: `monitor` (`changeType` new / updated per `stateKey`), `search` (last N days or since a date) and `awards`
  (awardee, amount, date; competitor names and amount filters).
- Filters: notice type, set-aside families and codes, agency text or CGAC/AAC code, place-of-performance state,
  open only, deadline window, minimum days to respond, exclude keywords.
- Rule-based scoring (no LLM): NAICS (exact / prefix), PSC prefix and keywords (title vs description, IDF-weighted),
  `relevanceScore` 0-100 with `matchReasons`.
- Privacy: contracting-officer contact columns are never output; personal e-mails, phone numbers and contact names are
  removed from titles and descriptions; functional mailboxes are kept; awardee addresses are cut.
- SAM.gov terms: every row links to its public notice page and names the source; `awardee` is withheld for awards
  dated before 2022-04-04 (possible D\&B data).
- Pay per event: `scored-match` USD 0.003, `opportunity` USD 0.0015 (unscored feed), with `maxResults` and a clean
  stop at the run's maximum total charge (undelivered monitor matches are delivered next run).
- 94 offline pytest tests with synthetic fixtures, including pre-publish checks of the Actor definition and pricing.
