landing-ai/ade-python

Python library for Agentic Document Extraction (ADE).

What it solves

This library provides a programmatic way to convert unstructured documents (PDFs and images) into structured, machine-readable data. It solves the problem of extracting specific, typed information from complex layouts without manually writing parsing rules for every document type.

How it works

The library interfaces with the LandingAI Agentic Document Extraction (ADE) API. It follows a two-step process:

  1. Parse: It converts a document into grounded Markdown, creating a structure tree with pixel-coordinate bounding boxes for every element.
  2. Extract: It uses a schema (defined via Pydantic models, dictionaries, or JSON) to pull specific typed fields out of that Markdown.

It supports both synchronous requests for small files and asynchronous jobs for large documents, with built-in support for encrypted PDFs and automatic retries.

Who it’s for

Developers building applications that need to automate data entry from invoices, statements, or other complex documents, and those integrating document AI into Python-based workflows.

Highlights

  • Typed Extraction: Uses Pydantic models to ensure extracted data matches a specific schema.
  • Grounded Output: Provides bounding boxes and character ranges to map extracted data back to the original document.
  • Async Support: Includes both a sync and an async client, as well as a job system for processing large files.
  • Flexible Input: Handles local files, URLs, and password-protected PDFs.

Related

  • Project
  • Project
  • Project
  • Project
  • Project