Skip to main content
We recommend using a virtual environment to avoid installing packages globally. Here’s a quick setup:

Installation

Once activated, install the package:
  • parsefy: Parsefy SDK for document extraction (includes Pydantic)
To deactivate the virtual environment later, simply run:
For more details on virtual environments, see the official Python documentation.

Quick example

Try this simple example with a receipt. Download the sample receipt
To get your API key, join the waitlist.

Setup

Set your API key as an environment variable:

Extract your first document

Required vs Optional Fields

All fields are required by default. Required fields that return null or fall below confidence_threshold trigger the expensive fallback model (Tier 2).
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:

Async usage

Next steps

FastAPI

Build APIs with FastAPI

Flask

Create extraction endpoints in Flask