All documentation
Extract
Extract structured fields from parsed documents.
Extract
Extract structured entities from text with a schema and a configured model provider. LangExtract and LangChain-based extraction are optional integrations.
Python
import docpipe
schema = docpipe.ExtractionSchema(
description="Extract invoice line items with amounts",
model_id="gemini-2.5-flash",
)
result = docpipe.extract(document.text, schema)
for entity in result:
print(entity.entity_class, entity.text, entity.attributes)
# Parse and extract in one call.
combined = docpipe.run("invoice.pdf", schema)
print(combined.parsed.markdown)
print(combined.extractions)- CLI: `docpipe extract "text" --schema schema.yaml --model gemini-2.5-flash`
- API: POST /extract or POST /run for parse plus extract