# Changelog of New Jersey Contractor License Lookup & Export (DCA) (`scrapebench/new-jersey-contractor-license-lookup`) Actor

- **URL**: https://apify.com/scrapebench/new-jersey-contractor-license-lookup/changelog.md
- **Full Actor documentation**: https://apify.com/scrapebench/new-jersey-contractor-license-lookup.md

## Changelog

### 0.2 — 2026-10-12

- **Max-charge stop says so.** When the run's maximum charge cannot pay for every licence found, the
  actor now delivers exactly the rows it can pay for, then a free `notice_type="truncated"` row
  saying how many were found but not delivered (none when nothing was left). The final log line
  reports delivered and charged counts separately. Before, a Newark task capped at $1.53 pushed 500
  rows, charged 382, and said nothing about the other 431.
- **Export details are fetched per chunk**, only for rows the max charge can pay for, instead of
  for every row before the first push.
- **Detail pages are matched on licence number, licensee name and status**, not the number alone:
  DCA re-issued some numbers (34EB00369100 is ENER-G ELECTRIC, Closed, and FOREMOST ELECTRIC,
  Active). A page that names another firm or status is not copied; the row keeps null detail fields
  and `enrichment_status="failed"`. (Checked: ENER-G's own DCA page does show expiry 2027-03-31 and
  qualifier DE PALMA, GENARO J — those values were DCA's, not a mix-up.)
- **A lookup batch keeps both firms behind a re-issued number.** The shared batch helper merged rows
  across queries by licence number, so `["Ener-G Electric", "Foremost Electric"]` returned one row
  (run qlCRYoHMefSH1jugh); lookups now de-duplicate on (number, status, name).
- More than 3 cities list the whole trade by licence prefix and filter here (a city search costs
  \~11 s a page); the detail pass runs home improvement first, with 8 sessions, to 3,250 s; HIC
  shards run to `13VH199`; lookups drop licence types the actor does not cover (locksmith, alarm).

### 0.1 — 2026-10-12

- First release. Two modes against the New Jersey Division of Consumer Affairs (DCA) licence
  verification site (`newjersey.mylicense.com/verification`), the only public source (no bulk file,
  no open dataset):
  - **Lookup** (`query`/`queries`): a full licence number (exact) or a name — business names
    contain-match (home improvement, electrical), person names match last name + first-name prefix
    (master plumber, master HVACR); the four indexes are interleaved. Any status. `maxResults` is
    per query (default 50).
  - **Export** (no query): home improvement contractor registrations (13VH), electrical business
    permits (34EB), master plumber (36BI) and master HVACR (19HC) licences, statewide (sharded by
    licence-number prefix, because each results page re-runs the query) or by city. Active by
    default, any status on request. `maxResults` is run-wide (default 500, max 100,000).
- Detail pass (`includeDetails`, default on): issue/expiry dates and status reason on every trade,
  street address, ZIP, owner and DBA for home improvement, the qualifying electrician for
  electrical. DCA serves a CAPTCHA after 20 detail views per search, so details are fetched one
  9-character licence-number group at a time (one search, at most 20 details); each detail is
  checked against the row's licence number. `enrichment_status` says per row what happened.
- No proxy: DCA answers the Apify container IP directly (recon:
  `docs/actors/recon-new-jersey-contractor-license-lookup.md`). Push and charge in chunks of 500;
  outage, cut-short and bad-input notices are never charged.
