# Changelog of SiteVerdict — PDF & Invoice Data Extractor (tables, line items) (`siteverdict/siteverdict-pdf-invoice-extractor`) Actor

- **URL**: https://apify.com/siteverdict/siteverdict-pdf-invoice-extractor/changelog.md
- **Full Actor documentation**: https://apify.com/siteverdict/siteverdict-pdf-invoice-extractor.md

## Changelog

### 1.1.0 — 2026-10-11 (flagship upgrade)

Accuracy (see BENCHMARK.md): field precision/recall on the UK/EU/US/India benchmark rose from ≈97.5% / 87.3% (v1.0) to 100% / 100%; 100% precision and 89% recall on a blind stress set of unusual layouts; 90/90 planted errors detected with 0 false alarms.

- **India GST:** GSTIN format + check character, CGST/SGST/UTGST/IGST, CGST = SGST check, intra- vs inter-state check against the two GSTIN state codes, lakh/crore amounts (`1,23,456.78`, `Rs. 1,18,000/-`), `Rs.`/`₹`/INR currency, HSN/SAC and serial-number columns, "amount in words" lines ignored.
- **Dates:** `dateOrder: auto` (new default) decides day/month order per document from unambiguous dates, US signals ($, US address, sales tax) or UK/EU/India locale; `12-Sep-2026`, ordinal and inline dates ("vom 14.09.2026", "del 21/07/2026", "Lyon, le 18 août 2026"); "Échéance" fix.
- **Labels and layouts:** many more invoice-number / PO / due-date labels (Inv. No., Invoice #4471, Factura n.º, Numéro de facture, Creditnota nr., Your ref (PO), Bon de commande, Ordine, Buyer's Order No., Net 15), DIN 5008 sender lines, horizontal totals tables, two column blocks on one line, "Totale imponibile"/"Netto a pagare"/"Total VAT", "VAT included / IVA incluido" notes, receipt VAT summary tables, discount columns, tax-amount columns, headerless tables (qty/price chosen by arithmetic), receipts without item tables, tax IDs ignored as amounts.
- **Validation:** per-rate VAT maths, `VAT_RATE_UNUSUAL`, receipt total vs VAT summary, `checks.vatMathOk`, **duplicate invoices** (same file, same supplier + number, same supplier + amount + date; within a batch and optionally across runs; identical files not re-processed or charged), **needsReview** + `reviewReasons` with a configurable confidence threshold, better-calibrated confidence scores.
- **Inputs:** inbox batch (`inboxMessages` with attachment URLs or KV records; message metadata carried to `context`), JSON batch record (`manifestRecord`), folder pages (`folderUrls`: HTML index, public bucket XML, JSON list; robots.txt respected), request `userData` carried to `context`.
- **Monitoring:** `monitorMode` with a named state store, conditional requests (ETag / Last-Modified), only new or changed documents output, unchanged ones skipped and not charged; `rememberAcrossRuns` for cross-run duplicate detection.
- **Alerts:** HTTPS Slack/JSON webhook at the end of the run (`alertOn`: problems / new / always); secret input, private hosts blocked.
- **Exports (free):** `INVOICES.xlsx` (Invoices, Line items, Issues, Needs review, Xero bills, QuickBooks bills), `XERO_BILLS.csv`, `QUICKBOOKS_BILLS.csv`, `INVOICES.csv`, UBL 2.1 / Peppol BIS 3 and Factur-X / ZUGFeRD (CII, EN 16931) XML drafts with `E_INVOICE_GAPS.json`, `REPORT.html`; CSV formula-injection guard; links in `OUTPUT.files`.
- **Optional AI refinement with the user's own key** (Anthropic or OpenAI, off by default): only weak fields of flagged documents are sent; every answer is verified against the PDF text before use. New PPE event `ai-refined-document`, charged only when a verified field was filled or corrected.
- New dataset view *Needs review and duplicates*; new record fields `supplierTaxIdType`, `dateOrder`, `fileSha256`, `duplicate`, `context`, `aiRefinedFields`, `needsReview`, `reviewReasons`, `monitorStatus`; new status `duplicate_skipped`.
- Benchmark harness and generators in `test/bench/` (synthetic corpora, tamper sets, stress sets).

### 1.0.0 — 2026-10-11

- First release.
- Inputs: PDF URLs (public or pre-signed), Apify key-value store records (including Console file uploads), and a dataset of URLs. There is an optional secret `Authorization` header, which is sent only to the original host.
- Deterministic text extraction with pdf.js (layout kept) and table detection from text positions, output as rows, Markdown and CSV.
- Invoice and receipt fields in EN/DE/FR/NL/ES/IT with confidence and provenance; VAT check digits for 29 countries; arithmetic checks.
- UK/EU number formats, multilingual dates and currency detection; optional OCR (tesseract.js).
- Pay-per-event: `page-processed`, `invoice-extracted` and `ocr-page`. Respects the maximum total charge.
- Privacy defaults: documents are kept in memory only, and buyer details are off.
