document-extraction-api
Installation
SKILL.md
Nutrient Data Extraction
Two GA primitives, two scripts. parse (scripts/parse.py) returns the whole-document
model — typed elements (paragraphs, tables, formulas, pictures, key-value regions,
handwriting) with bounding boxes, or clean whole-document Markdown. extract
(scripts/extract.py) returns just the fields you define in a JSON Schema, each grounded to a
page region by a per-field citation.
Choosing parse vs extract
| The request is about… | Use | Why |
|---|---|---|
| Named target fields — "the invoice number and total", "these fields", "map to my schema", "with citations" | extract |
One call returns your fields, cited — no need to walk every element |
| The whole document — "parse this", "whole-document Markdown", "chunk for embeddings", RAG, search indexing, migration | parse |
Whole-document model / Markdown for open-ended retrieval |
| Every table / all key-value regions (no target schema) | parse (spatial) |
Enumerate all elements; extract needs a schema of what to pull |
For RAG chunking of a parsed document, see the sibling grounded-rag-ingestion skill. For
PDF generation, conversion, OCR, redaction, signing, or any /build-based workflow, use the
sibling document-processor-api skill.