Skip to main content

Official SDKs

We maintain official SDKs for the most popular languages.

JavaScript / TypeScript

Full TypeScript support with Zod schemas

Python

Type-safe extraction with Pydantic models

JavaScript / TypeScript

Installation

Requirements

  • Node.js 18+
  • Zod 3.x

Quick example

All fields are required by default. Mark fields as .optional() if they might be missing in >20% of your documents to avoid triggering the expensive fallback model.

Python

Installation

Requirements

  • Python 3.10+
  • Pydantic 2.0+

Quick example

All fields are required by default. Mark fields as str | None = Field(default=None, ...) if they might be missing in >20% of your documents to avoid triggering the expensive fallback model.

Community SDKs

We welcome community contributions! If you’ve built an SDK for another language, let us know.

Building your own SDK

The Parsefy API is a simple REST API. Key endpoints: See the API Reference for full documentation.

SDK requirements

If you’re building an SDK, we recommend:
  • Authentication: Support PARSEFY_API_KEY environment variable
  • File handling: Accept file paths, bytes, and file objects
  • Type safety: Use native schema libraries (Zod, Pydantic, etc.)
  • Confidence threshold: Support confidence_threshold parameter (default: 0.85)
  • Math verification: Support enable_verification parameter (default: false)
  • Field confidence: Parse _meta.field_confidence array from object response
  • Verification: Parse verification object from response when enabled
  • Error handling: Distinguish HTTP errors from extraction errors
  • Retries: Implement exponential backoff for rate limits

Support

Need help with an SDK?