Installation
- parsefy: Parsefy SDK for document extraction
- zod: TypeScript-first schema validation library
Quick example
Try this simple example with a receipt. Download the sample receiptSetup
Set your API key as an environment variable:Extract your first document
Required vs Optional Fields
Rule of thumb: Mark fields as
.optional() if they might be missing in >20% of your documents.
Confidence Threshold
Control when the fallback model is triggered:Next steps
Next.js
Build with Next.js App Router
Express
Create REST APIs with Express
Fastify
High-performance APIs
Hono
Edge-ready applications
