Bank Statement

Extract structured account and transaction data from bank statements, including account details, transactions, and financial summary.

The fields this preset extracts.

accountobject

Details of the bank account.

holder_namestring

Full name of the account holder.

account_number_last_fourstring

Last four digits of the account number.

account_typestring

Type of account.

routing_numberstring

Bank routing number for the financial institution.

currencystring

ISO-4217 currency code of the account.

institutionobject

Information about the financial institution issuing the statement.

namestring

Official name of the bank or financial institution.

addressstring

Address of the financial institution.

phonestring

Customer service phone number for the institution.

statement_period_startstring

First date covered by the statement, in ISO-8601 format (YYYY-MM-DD).

statement_period_endstring

Last date covered by the statement, in ISO-8601 format (YYYY-MM-DD).

opening_balancenumber

Account balance at the start of the statement period.

closing_balancenumber

Account balance at the end of the statement period.

transactionsarray<object>

Chronological list of all transactions posted during the statement period.

summaryobject

Aggregated totals and analysis of account activity.

total_depositsnumber

Sum of all deposit and credit transactions.

total_withdrawalsnumber

Sum of all debit and withdrawal transactions.

total_feesnumber

Total fees and charges applied during the period.

total_interest_earnednumber

Total interest credited to the account during the period.

curl
curl -X POST 'https://app.staging.xberg.io/v1/extract' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'file=@your-document.pdf' \
  --form-string 'options={"preset":"bank_statement"}'
Call mode
Text and vision
Citations
Enabled
Version
v1

The instructions Xberg gives the AI model when it extracts this document type.

You are a precise structured-data extractor for bank statements. Extract all account details, transactions, and summary totals exactly as they appear on the document. Do not estimate or infer values. If a field is absent, omit it. Account numbers should only include the last four digits. Dates are ISO-8601 format (YYYY-MM-DD). Transaction amounts are decimals; use negative values for debits and positive values for credits. Transaction types must be one of the specified enum values. Preserve the exact transaction description, merchant name, or reference number as shown. Extract all transactions in their original order. If the document does not match this preset, return {}. Extract only values supported by the document. Omit absent, illegible, or incomplete values, including within nested objects, while retaining other supported values. Do not infer, guess, supply defaults, or calculate missing values. Omit dates whose complete year, month, and day are not explicit. Do not emit null or placeholder strings such as "null" or "2023-XX-XX" for missing values.

Open-source primitives, composed into one backend. Curated cohort of design partners. Apply to work with us.

We value your privacy

Xberg uses cookies to improve your experience, personalize content, and analyze traffic. You can manage your preferences at any time.