Tax Form 1040

Extract structured data from US IRS Form 1040 individual income tax returns, including filing status, income, deductions, and tax liability.

The fields this preset extracts.

tax_yearinteger

The tax year this form covers (e.g., 2023).

filing_statusstring

Tax filing status of the taxpayer.

taxpayer_namestring

Full legal name of the taxpayer (primary filer).

taxpayer_ssnstring

Social Security Number of the taxpayer in format XXX-XX-XXXX.

spouse_namestring

Full legal name of the spouse, if filing jointly.

spouse_ssnstring

Social Security Number of the spouse in format XXX-XX-XXXX.

addressstring

Full mailing address including street, city, state, and ZIP code.

total_income_usd_centsinteger

Total income reported on the form, in cents (e.g., $50,000.00 = 5000000).

agi_usd_centsinteger

Adjusted Gross Income (AGI), in cents.

taxable_income_usd_centsinteger

Taxable income after deductions, in cents.

total_tax_usd_centsinteger

Total tax liability computed or reported, in cents.

refund_or_owed_usd_centsinteger

Amount refunded (positive) or owed (negative), in cents.

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":"tax_form_1040"}'
Call mode
Text only
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 US IRS Form 1040 tax returns. Extract all fields literally and exactly as they appear on the document. Do not infer, estimate, or guess values. If a field is absent, omit it from the output. Social Security Numbers must be in XXX-XX-XXXX format. All monetary amounts are in cents as integers. For married filing jointly, include both taxpayer and spouse information. Dates and income figures must match the document exactly. 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.