Stop wasting time
extracting PDFs.

Transform your PDF documents into structured data with Documind. Simple, powerful and open-source.

View on GitHub
import { extract } from 'documind';

const result = await extract({
  file: 'https://example.com/bank_statement.pdf',
  schema: [
    {
      "name": "accountNumber",
      "type": "string",
      "description": "The account number of the bank statement."
    },
    {
      "name": "openingBalance",
      "type": "number",
      "description": "The opening balance in the account."
    },
    {
      "name": "transactions",
      "type": "array",
      "description": "A list of transactions in the account.",
      "children": [
        {
          "name": "date",
          "type": "string",
          "description": "The date of the transaction."
        },
        {
          "name": "creditAmount",
          "type": "number",
          "description": "The amount credited in the transaction."
        },
        {
          "name": "debitAmount",
          "type": "number",
          "description": "The amount debited in the transaction."
        },
        {
          "name": "description",
          "type": "string",
          "description": "A short note about the transaction."
        }
      ]
    },
    {
      "name": "closingBalance",
      "type": "number",
      "description": "The closing balance in the account."
    }
  ]
})