Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.landing.ai/llms.txt

Use this file to discover all available pages before exploring further.

Use the Playground to explore and understand basic concepts without writing code. When you’re ready to scale intelligent document processing, follow the tutorial below to get started with code.

Prerequisites

Tutorial: Parse and Extract a Document

This tutorial guides you through how to parse a sample bank statement and extract these fields: Account Holder Name and Number of Deposits.
1

Install jq

Install jq, a free third-party command-line tool that will help you save files later in this procedure. Some common install instructions are below; to see all installation methods, go the the jq site.
brew install jq
2

Parse a document

Run the code below to parse a sample bank statement with the API. The > at the end of the command saves the response to a file called parse-output.json.Replace YOUR_API_KEY with your API key.
curl -X POST 'https://api.va.landing.ai/v1/ade/parse' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'document_url=https://docs.landing.ai/examples/bank-statement.pdf' \
  -F 'model=dpt-2-latest' > parse-output.json
3

Save the Markdown content

To extract data from the document, you need to pass the markdown field from parse-output.json to the API.Run the following command to save the markdown field to a file called markdown-bank-statement.md.
jq -r .markdown parse-output.json > markdown-bank-statement.md
4

Extract fields from a document

Now that the parsed output is in a Markdown file, run the code below to extract the Account Holder Name and Number of Deposits fields using the API.Replace YOUR_API_KEY with your API key.
curl -X POST 'https://api.va.landing.ai/v1/ade/extract' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'schema={"type": "object", "properties": {"name": {"type": "string", "description": "Account holder name"}, "number_deposits": {"type": "integer", "description": "The number of deposits"}}}' \
  -F 'markdown=@markdown-bank-statement.md' \
  -F 'model=extract-latest'
The API response includes the extracted fields:
  • Account Holder Name: Sarah J. Mitchell
  • Number of Deposits: 5
    {
    "extraction":{
      "name":"Sarah J. Mitchell",
      "number_deposits":5
    },
    "extraction_metadata":{
      "name":{
        "references":[
          "8b70276e-a3ee-4ed4-9f11-15439c50d603"
        ],
        "value":"Sarah J. Mitchell"
      },
      "number_deposits":{
        "references":[
          "d9d59d6d-cf43-4ed2-8632-5f48d08885c5"
        ],
        "value":5
      }
    },
    "metadata":{
      "filename":"markdown-bank-statement.md",
      "org_id":"lgy5xucm9xnq",
      "duration_ms":6516,
      "credit_usage":1.5188,
      "job_id":"1bdcf9c99a614d698f3b4aca65f27935",
      "version":"extract-20260314",
      "schema_violation_error":null,
      "fallback_model_version":null,
      "warnings":[
        
      ]
    }
  }

Next Steps: Develop and Scale

Choose how you want to integrate into your workflow. Call the API directly for maximum flexibility, or use our Python or TypeScript libraries for faster development.

API

Call the API directly for language flexibility and advanced customization.

Python Library

Use our Python library to build custom scripts.

TypeScript Library

Use our TypeScript library to build custom scripts.

Sample Scripts & Projects

Use these sample scripts and projects for real-world use cases as templates to develop your own custom document processing solutions.

Sample Projects

Explore end-to-end examples for common document processing workflows.

Sample Scripts in Documentation

Browse code samples with examples for the Python and TypeScript libraries.