Usage

Copy the code block, replace YOUR_API_KEY with your API key, then process documents quickly.
from abbyy_document_ai import DocumentAi

with DocumentAi(api_key_auth=YOUR_API_KEY) as document_ai:
  res = document_ai.models.brokerage_statement.begin_field_extraction(input_source={
    "url": "https://example.com/document.pdf",
  })

  assert res.documents is not None
  doc_id = res.documents[0].id

  processed = False
  while not processed:
      time.sleep(3)  # Wait 3 seconds between checks
      res = document_ai.models.brokerage_statement.get_extracted_fields(
          document_id=doc_id
      )
      processed = res.brokerage_statement.meta.status == "Processed"

  print(res.brokerage_statement.fields)

Extracted Fields

Field NameDescription
Account InformationInformation about the brokerage account.
  Account NumberThe brokerage account number.
  Account TypeThe type of brokerage account (e.g., Individual, Joint, IRA).
  Account NameThe name on the account.
Statement PeriodInformation about the statement period.
  Start DateThe start date of the statement period.
  End DateThe end date of the statement period.
Account ValueInformation about account values.
  Opening BalanceThe account value at the start of the period.
  Closing BalanceThe account value at the end of the period.
  Net ChangeThe change in account value during the period.
Income SummaryInformation about income earned.
  DividendsTotal dividends earned during the period.
  InterestTotal interest earned during the period.
  Capital GainsTotal capital gains realized during the period.
Transactions (repeating group)Information about individual transactions.
  DateThe date of the transaction.
  TypeThe type of transaction (buy, sell, dividend, etc.).
  DescriptionDescription of the transaction.
  SymbolThe security symbol.
  QuantityThe number of shares or units.
  PriceThe price per share or unit.
  AmountThe total amount of the transaction.
Holdings (repeating group)Information about securities held in the account.
  SymbolThe security symbol.
  DescriptionDescription of the security.
  QuantityThe number of shares or units held.
  PriceThe price per share or unit at period end.
  Market ValueThe total market value of the holding.
  Cost BasisThe total cost basis of the holding.
  Unrealized Gain/LossThe unrealized gain or loss on the holding.

Supported Languages

CountriesLanguages
GlobalEnglish