Extract the fields your workflow actually needs
Raw document text is rarely the target. Your system needs invoice totals, bank-statement transactions, KYC identity fields, contract clauses, claim amounts, policy numbers, and the evidence behind each value. Cogneris lets you request a shipped template or pass your own JSON schema so the response matches the object your application expects.
{
"document_type": "invoice",
"invoice_number": { "value": "INV-2048", "confidence": 0.99 },
"line_items": [{ "description": "Platform usage", "amount": 1480.00 }],
"validation": { "status": "passed" }
}
One API for PDFs, scans, images, and document packets
Use the same endpoint for native PDFs, scanned PDFs, mobile photos, email attachments, and multi-document packets. Cogneris classifies the document, chooses the right extractor, stitches multi-page files, splits bundled packets, and returns one normalized payload per document.
Schema-based output instead of raw OCR text
AI data extraction only pays off when the output is typed. The extraction response is JSON with values, confidence, page references, bounding boxes, validation status, and audit metadata. That makes the output ready for underwriting systems, AP automation, onboarding flows, claims platforms, data warehouses, and AI agents.
Financial documents
Invoices, receipts, payroll, tax forms, bank statements, and reconciliation packets.
Identity and onboarding
KYC IDs, passports, proof of address, beneficial ownership forms, and supporting evidence.
Contracts and claims
Clauses, obligations, FNOL packets, policy details, repair estimates, and medical bills.
Extract data from PDF: fields first
Fields are the values a system needs one at a time: an invoice number, a statement period, a counterparty, a due date. Cogneris returns each as a typed value with its own confidence score, page number, and bounding box, so the number that lands in your ERP can be traced back to the pixels it was read from. Dates and amounts are normalized on the way out, which is what makes the output usable without a second parsing step. Validation runs in the same pass: a total that does not equal its line items, a date outside the statement period, or an identifier with the wrong checksum comes back flagged rather than silently accepted.
Extract tables and line items from PDF
Tables are where most PDF extraction tools break. A useful result has to understand headers, row boundaries, descriptions that wrap onto a second line, subtotals that are not rows, and tables that continue across a page break. Cogneris returns each table as an array of rows, every cell typed and scored, so a 300-line invoice or a 12-page transaction list arrives as data rather than as a grid of strings to clean up.
- Line items — description, quantity, unit price, amount, and tax per row, with the row total reconciled against the document total. See invoice extraction.
- Transactions — date, description, amount, and running balance per row, with balance-math checked across the statement. See bank statement extraction.
- Any other table — schedules, rate tables, rent rolls, and exhibits, returned with the same per-cell confidence and page evidence.
Extract data from PDF to Excel or CSV
The API returns JSON. That is the right contract for an integration, and it is also a short step away from a spreadsheet: every table or line-item array is a flat list of typed cells, so writing it to XLSX or CSV is a few lines of code rather than a separate product. The same JSON feeds a reconciliation workbook, a Google Sheet, and a data warehouse without three different exports. The Python sample below shows the whole step.
| Format | What you get | Best for |
|---|---|---|
| XLSX (Excel) | One row per line item or transaction, typed columns, written from the JSON response. | Reconciliation, review by a controller, sharing one document's data. |
| CSV | The same flat rows as plain text, one file per document or per table. | Google Sheets, accounting-software imports, warehouse loads. |
| JSON | The full response: fields, tables, confidence, citations, and validation status. | REST and webhook integrations, agent tools, the audit trail. |
Confidence, citations, and human review
Every field carries confidence and source evidence. High-confidence values can move straight through. Low-confidence or high-risk fields can route to human review without blocking the full document.
Async jobs and webhooks for production volume
Small files can run synchronously. Long packets, batch uploads, and high-volume workflows use async jobs with webhook callbacks, retry semantics, and signed payloads. Start in the API reference or go deeper in the extraction docs.
API sample: extract a document
Use your language's standard HTTP client with the REST API. Signed webhook samples show how to verify asynchronous callbacks without implying a published client library.
curl -X POST "$COGNERIS_BASE_URL/Document/extraction" \
-H "Authorization: Bearer $COGNERIS_API_KEY" \
-F "template=invoice" \
-F "file=@./invoice.pdf"In Python, the same call plus the spreadsheet step. Each cell in the response carries its value and confidence; the sample keeps the values and writes the line items to Excel:
import os, pandas as pd, requests
with open("invoice.pdf", "rb") as f:
r = requests.post(os.environ["COGNERIS_BASE_URL"] + "/Document/extraction",
headers={"Authorization": "Bearer " + os.environ["COGNERIS_API_KEY"]},
data={"template": "invoice"}, files={"file": f})
envelope = r.json()
fields = envelope["data"]["metadata"]
rows = [{col: cell["value"] for col, cell in item.items()} for item in fields["lineItems"]]
pd.DataFrame(rows).to_excel("invoice.xlsx", index=False) # or .to_csv("invoice.csv")Validation before data reaches your system
Cogneris validates extracted fields with totals reconciliation, date checks, regex rules, cross-document consistency, required-field checks, and tenant-specific business rules before the data is approved.
Scanned PDFs: the OCR fallback
A scanned PDF is a picture of a page with no text layer. Cogneris detects that during classification and runs OCR before extraction, so the same template and the same validation rules apply whether the file came from an ERP export or a phone camera. Rotated pages, skewed scans, and photos with shadows go through the same path; where the recognition is uncertain the confidence score says so, instead of a clean-looking value hiding a misread digit. Checkboxes, signature presence, stamps, and handwritten notes are kept as evidence so a reviewer can verify the field rather than re-read the page. For a text-first comparison of the two approaches, see the OCR API page.
How accuracy is measured
Character accuracy is the number most OCR vendors quote, and it is the least useful one for data extraction: a 99% character rate still means one wrong digit in a 100-character total. Cogneris measures accuracy per field, where a field is correct only when its normalized value matches the ground truth, and reports three figures alongside it:
- Straight-through rate — the share of documents accepted automatically after validation and confidence checks, with no human touch.
- Reviewer correction rate — how often a reviewer changed a value the model proposed, which is the honest measure of what the confidence score is worth.
- Downstream defect rate — what still reached the ledger or the underwriting model wrong, which is the number the business actually pays for.
The extraction benchmark sets out how each figure is defined and how to run the same files, schema, timeout, and review threshold against every vendor. Run it on your own PDFs: an accuracy figure measured on someone else's corpus says little about your documents.
Common AI data extraction use cases
Use Cogneris for invoice extraction, bank statement extraction, contract extraction, KYC onboarding, insurance claims, payroll verification, and document-heavy workflow automation.
More on AI data extraction
Extract data from PDF
Extract fields, tables, line items, and citations from native PDFs and scanned PDFs.
Convert documents to JSON
Turn document packets into typed JSON with schemas, confidence, validation, and webhooks.
Extract tables from PDF
Return line items, transactions, rows, columns, totals, and table-level evidence.
Document extraction API pricing
Compare pricing drivers across page volume, complexity, validation, review, and audit needs.
Document extraction benchmark
Score vendors on field accuracy, citations, table fidelity, schema stability, review load, and webhook behavior.
Agentic document extraction
Classify, extract, validate, and route uncertain fields to review instead of making one brittle OCR pass.
Best OCR APIs for developers
What to compare before choosing an OCR API: JSON output, tables, confidence, webhooks, and review routing.
Python API sample
Upload documents, run async jobs, verify signed webhooks, parse JSON, and route low-confidence fields to review.