> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chunkr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Extract Examples

> Extract structured data from documents using defined schemas.

Practical examples showing how to extract structured data from different document types using Python (Pydantic) and TypeScript (Zod) schemas.

<Tip>
  For a complete understanding of Extract outputs, see [Extract
  Outputs](/pages/features/extract/outputs). For configuration options, see
  [Extract Overview](/pages/features/extract/overview).
</Tip>

## Financial Report

Extract key financial metrics and data from financial statements, earnings reports, and other financial documents.

<Frame>
  <iframe src="https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/financial_report.pdf" title="Financial Report" className="w-full h-96 rounded-xl" />
</Frame>

### Schema

<CodeGroup>
  ```python Python theme={"system"}
  import os
  from typing import List, Optional

  from chunkr_ai import Chunkr
  from pydantic import BaseModel, Field

  class FinancialPositionItem(BaseModel):
      category: str
      subcategory: Optional[str]
      account_name: str
      amount: float

  class FinancialPositionPeriod(BaseModel):
      as_of_date: str = Field(description="Date for this financial position snapshot")
      items: List[FinancialPositionItem]

  class StatementOfFinancialPosition(BaseModel):
      currency: str
      periods: List[FinancialPositionPeriod]

  class ProfitOrLossItem(BaseModel):
      account_name: str = Field(description="Name of the profit and loss account")
      amount: float

  class StatementOfProfitAndLoss(BaseModel):
      period_start: str
      period_end: str
      currency: str
      items: List[ProfitOrLossItem] = Field(description="List of profit and loss items")
      net_income: float = Field(description="Total net income for this period")


  class ComprehensiveIncomeItem(BaseModel):
      account_name: str = Field(description="Name of the comprehensive income account")
      amount: float = Field(description="Monetary value in the statement's base currency")

  class ComprehensiveIncomePeriod(BaseModel):
      period_end: str = Field(description="Ending date for this period (YYYY-MM-DD)")
      items: List[ComprehensiveIncomeItem]
      total_comprehensive_income: float

  class StatementOfComprehensiveIncome(BaseModel):
      currency: str
      periods: List[ComprehensiveIncomePeriod]

  class EquityChangeItem(BaseModel):
      component: str = Field(description="Name of the equity component")
      opening_balance: float = Field(description="Balance at the beginning of the period")
      changes: List[str] = Field(description="Descriptions of changes during the period")
      closing_balance: float = Field(description="Balance at the end of the period")


  class StatementOfChangesInEquity(BaseModel):
      period_end: str
      currency: str
      items: List[EquityChangeItem]

  class CashFlowItem(BaseModel):
      activity_type: str = Field(description="Type of cash flow activity")
      account_name: str = Field(description="Name of the cash flow account")
      amount: float

  class CashFlowPeriod(BaseModel):
      period_end: str
      items: List[CashFlowItem] = Field(description="List of cash flow items")
      net_increase_in_cash: float = Field(description="Net increase for this period")
      closing_cash_balance: float = Field(description="Balance at the end of this period")


  class StatementOfCashFlows(BaseModel):
      currency: str
      periods: List[CashFlowPeriod] = Field(description="List of cash flow periods")


  class FinancialReport(BaseModel):
      entity_name: str = Field(description="Name of the reporting entity")
      report_title: Optional[str]
      reporting_period_start: Optional[str]
      reporting_period_end: Optional[str]
      reporting_as_of_date: Optional[str]
      currency: str
      statement_of_financial_position: Optional[StatementOfFinancialPosition]
      statement_of_profit_or_loss: Optional[StatementOfProfitAndLoss]
      statement_of_comprehensive_income: Optional[StatementOfComprehensiveIncome]
      statement_of_changes_in_equity: Optional[StatementOfChangesInEquity]
      statement_of_cash_flows: Optional[StatementOfCashFlows]
  ```

  ```typescript TypeScript theme={"system"}
  import * as z from "zod";
  import Chunkr from "chunkr-ai";

  const FinancialPositionItemSchema = z.object({
    category: z.string(),
    subcategory: z.string().optional(),
    account_name: z.string(),
    amount: z.number(),
  });

  const FinancialPositionPeriodSchema = z.object({
    as_of_date: z.string().describe("Date for this financial position snapshot"),
    items: z.array(FinancialPositionItemSchema),
  });

  const StatementOfFinancialPositionSchema = z.object({
    currency: z.string(),
    periods: z.array(FinancialPositionPeriodSchema),
  });

  const ProfitOrLossItemSchema = z.object({
    account_name: z.string().describe("Name of the profit and loss account"),
    amount: z.number(),
  });

  const StatementOfProfitAndLossSchema = z.object({
    period_start: z.string(),
    period_end: z.string(),
    currency: z.string(),
    items: z
      .array(ProfitOrLossItemSchema)
      .describe("List of profit and loss items"),
    net_income: z.number().describe("Total net income for this period"),
  });

  const ComprehensiveIncomeItemSchema = z.object({
    account_name: z.string().describe("Name of the comprehensive income account"),
    amount: z
      .number()
      .describe("Monetary value in the statement's base currency"),
  });

  const ComprehensiveIncomePeriodSchema = z.object({
    period_end: z.string().describe("Ending date for this period (YYYY-MM-DD)"),
    items: z.array(ComprehensiveIncomeItemSchema),
    total_comprehensive_income: z.number(),
  });

  const StatementOfComprehensiveIncomeSchema = z.object({
    currency: z.string(),
    periods: z.array(ComprehensiveIncomePeriodSchema),
  });

  const EquityChangeItemSchema = z.object({
    component: z.string().describe("Name of the equity component"),
    opening_balance: z
      .number()
      .describe("Balance at the beginning of the period"),
    changes: z
      .array(z.string())
      .describe("Descriptions of changes during the period"),
    closing_balance: z.number().describe("Balance at the end of the period"),
  });

  const StatementOfChangesInEquitySchema = z.object({
    period_end: z.string(),
    currency: z.string(),
    items: z.array(EquityChangeItemSchema),
  });

  const CashFlowItemSchema = z.object({
    activity_type: z.string().describe("Type of cash flow activity"),
    account_name: z.string().describe("Name of the cash flow account"),
    amount: z.number(),
  });

  const CashFlowPeriodSchema = z.object({
    period_end: z.string(),
    items: z.array(CashFlowItemSchema).describe("List of cash flow items"),
    net_increase_in_cash: z.number().describe("Net increase for this period"),
    closing_cash_balance: z
      .number()
      .describe("Balance at the end of this period"),
  });

  const StatementOfCashFlowsSchema = z.object({
    currency: z.string(),
    periods: z.array(CashFlowPeriodSchema).describe("List of cash flow periods"),
  });

  const FinancialReportSchema = z.object({
    entity_name: z.string().describe("Name of the reporting entity"),
    report_title: z.string().optional(),
    reporting_period_start: z.string().optional(),
    reporting_period_end: z.string().optional(),
    reporting_as_of_date: z.string().optional(),
    currency: z.string(),
    statement_of_financial_position:
      StatementOfFinancialPositionSchema.optional(),
    statement_of_profit_or_loss: StatementOfProfitAndLossSchema.optional(),
    statement_of_comprehensive_income:
      StatementOfComprehensiveIncomeSchema.optional(),
    statement_of_changes_in_equity: StatementOfChangesInEquitySchema.optional(),
    statement_of_cash_flows: StatementOfCashFlowsSchema.optional(),
  });
  ```
</CodeGroup>

### Process

<CodeGroup>
  ```python Python theme={"system"}
  # Convert Pydantic model to JSON schema
  schema = FinancialReport.model_json_schema()
  client = Chunkr(api_key=os.environ["CHUNKR_API_KEY"])

  # Create extract task
  task = client.tasks.extract.create(
      file="https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/financial_report.pdf",
      schema=schema,
  )
  ```

  ```typescript TypeScript theme={"system"}
  // Convert Zod schema to JSON schema
  const schema = z.toJSONSchema(FinancialReportSchema);
  const client = new Chunkr({ apiKey: process.env.CHUNKR_API_KEY });

  // Create extract task
  const task = client.tasks.extract.create({
    file: "https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/financial_report.pdf",
    schema: schema,
  });
  ```
</CodeGroup>

### Output

<CodeGroup>
  ```json Result expandable theme={"system"}
  {
    "currency": "JPY",
    "entity_name": "SoftBank Group Corp.",
    "report_title": "Consolidated Financial Report",
    "reporting_as_of_date": "2025-03-31",
    "reporting_period_end": "2025-03-31",
    "reporting_period_start": "2024-04-01",
    "statement_of_cash_flows": {
      "currency": "JPY",
      "periods": [
        {
          "closing_cash_balance": 6186874,
          "items": [
            {
              "account_name": "Net income",
              "activity_type": "Operating Activities",
              "amount": 209217
            },
            {
              "account_name": "Depreciation and amortization",
              "activity_type": "Operating Activities",
              "amount": 858620
            },
            {
              "account_name": "Loss (gain) on investments at Investment Business of Holding Companies",
              "activity_type": "Operating Activities",
              "amount": 449817
            },
            {
              "account_name": "Loss (gain) on investments at SoftBank Vision Funds",
              "activity_type": "Operating Activities",
              "amount": 167290
            },
            {
              "account_name": "Finance cost",
              "activity_type": "Operating Activities",
              "amount": 556004
            },
            {
              "account_name": "Foreign exchange loss (gain)",
              "activity_type": "Operating Activities",
              "amount": 703122
            },
            {
              "account_name": "Derivative (gain) loss (excluding (gain) loss on investments)",
              "activity_type": "Operating Activities",
              "amount": -1502326
            },
            {
              "account_name": "Change in third-party interests in SVF",
              "activity_type": "Operating Activities",
              "amount": 390137
            },
            {
              "account_name": "(Gain) loss on other investments and other gain",
              "activity_type": "Operating Activities",
              "amount": -271064
            },
            {
              "account_name": "Income taxes",
              "activity_type": "Operating Activities",
              "amount": -151416
            },
            {
              "account_name": "Increase in investments from asset management subsidiaries",
              "activity_type": "Operating Activities",
              "amount": -230986
            },
            {
              "account_name": "Increase in trade and other receivables",
              "activity_type": "Operating Activities",
              "amount": -476511
            },
            {
              "account_name": "Decrease (increase) in inventories",
              "activity_type": "Operating Activities",
              "amount": 5436
            },
            {
              "account_name": "Increase in trade and other payables",
              "activity_type": "Operating Activities",
              "amount": 325731
            },
            {
              "account_name": "Other",
              "activity_type": "Operating Activities",
              "amount": 208593
            },
            {
              "account_name": "Interest and dividends received",
              "activity_type": "Operating Activities",
              "amount": 256083
            },
            {
              "account_name": "Interest paid",
              "activity_type": "Operating Activities",
              "amount": -430422
            },
            {
              "account_name": "Income taxes paid",
              "activity_type": "Operating Activities",
              "amount": -885617
            },
            {
              "account_name": "Income taxes refunded",
              "activity_type": "Operating Activities",
              "amount": 68839
            },
            {
              "account_name": "Payments for acquisition of investments",
              "activity_type": "Investing Activities",
              "amount": -800925
            },
            {
              "account_name": "Proceeds from sales/redemption of investments",
              "activity_type": "Investing Activities",
              "amount": 219668
            },
            {
              "account_name": "Payments for acquisition of investments by SVF",
              "activity_type": "Investing Activities",
              "amount": -212045
            },
            {
              "account_name": "Proceeds from sales of investments by SVF",
              "activity_type": "Investing Activities",
              "amount": 922020
            },
            {
              "account_name": "Payments for acquisition of investments by asset management subsidiaries",
              "activity_type": "Investing Activities",
              "amount": -76877
            },
            {
              "account_name": "Payments (net) for acquisition of control over subsidiaries",
              "activity_type": "Investing Activities",
              "amount": -104484
            },
            {
              "account_name": "Proceeds (net) from loss of control over subsidiaries",
              "activity_type": "Investing Activities",
              "amount": 96755
            },
            {
              "account_name": "Purchase of property, plant and equipment, and intangible assets",
              "activity_type": "Investing Activities",
              "amount": -622612
            },
            {
              "account_name": "Payments for loan receivables",
              "activity_type": "Investing Activities",
              "amount": -313686
            },
            {
              "account_name": "Collection of loan receivables",
              "activity_type": "Investing Activities",
              "amount": 107481
            },
            {
              "account_name": "Payments into time deposits",
              "activity_type": "Investing Activities",
              "amount": -148657
            },
            {
              "account_name": "Proceeds from withdrawal of time deposits",
              "activity_type": "Investing Activities",
              "amount": 77954
            },
            {
              "account_name": "Other",
              "activity_type": "Investing Activities",
              "amount": 13947
            },
            {
              "account_name": "Proceeds in (repayment of) short-term interest-bearing debt, net",
              "activity_type": "Financing Activities",
              "amount": 202074
            },
            {
              "account_name": "Proceeds from interest-bearing debt",
              "activity_type": "Financing Activities",
              "amount": 5181190
            },
            {
              "account_name": "Repayment of interest-bearing debt",
              "activity_type": "Financing Activities",
              "amount": -5175486
            },
            {
              "account_name": "Repayment of lease liabilities",
              "activity_type": "Financing Activities",
              "amount": -211231
            },
            {
              "account_name": "Distribution/repayment from SVF to third-party investors",
              "activity_type": "Financing Activities",
              "amount": -783522
            },
            {
              "account_name": "Proceeds from the partial sales of shares of subsidiaries to non-controlling interests",
              "activity_type": "Financing Activities",
              "amount": 747565
            },
            {
              "account_name": "Purchase of shares of subsidiaries from non-controlling interests",
              "activity_type": "Financing Activities",
              "amount": -112009
            },
            {
              "account_name": "Redemption of other equity instruments",
              "activity_type": "Financing Activities",
              "amount": -277760
            },
            {
              "account_name": "Distribution to owners of other equity instruments",
              "activity_type": "Financing Activities",
              "amount": -25624
            },
            {
              "account_name": "Proceeds from the issuance of other equity instruments in subsidiaries",
              "activity_type": "Financing Activities",
              "amount": 120000
            },
            {
              "account_name": "Purchase of treasury stock",
              "activity_type": "Financing Activities",
              "amount": -8
            },
            {
              "account_name": "Cash dividends paid",
              "activity_type": "Financing Activities",
              "amount": -64356
            },
            {
              "account_name": "Cash dividends paid to non-controlling interests",
              "activity_type": "Financing Activities",
              "amount": -288119
            },
            {
              "account_name": "Other",
              "activity_type": "Financing Activities",
              "amount": 81064
            },
            {
              "account_name": "Effect of exchange rate changes on cash and cash equivalents",
              "activity_type": "Other",
              "amount": 491868
            },
            {
              "account_name": "(Decrease) increase in cash and cash equivalents relating to transfer of assets classified as held for sale",
              "activity_type": "Other",
              "amount": -33011
            }
          ],
          "net_increase_in_cash": -738279,
          "period_end": "2024-03-31"
        },
        {
          "closing_cash_balance": 3713028,
          "items": [
            {
              "account_name": "Net income",
              "activity_type": "Operating Activities",
              "amount": 1603108
            },
            {
              "account_name": "Depreciation and amortization",
              "activity_type": "Operating Activities",
              "amount": 866823
            },
            {
              "account_name": "Loss (gain) on investments at Investment Business of Holding Companies",
              "activity_type": "Operating Activities",
              "amount": -3422188
            },
            {
              "account_name": "Loss (gain) on investments at SoftBank Vision Funds",
              "activity_type": "Operating Activities",
              "amount": -387584
            },
            {
              "account_name": "Finance cost",
              "activity_type": "Operating Activities",
              "amount": 581559
            },
            {
              "account_name": "Foreign exchange loss (gain)",
              "activity_type": "Operating Activities",
              "amount": -27055
            },
            {
              "account_name": "Derivative (gain) loss (excluding (gain) loss on investments)",
              "activity_type": "Operating Activities",
              "amount": 2034029
            },
            {
              "account_name": "Change in third-party interests in SVF",
              "activity_type": "Operating Activities",
              "amount": 491898
            },
            {
              "account_name": "(Gain) loss on other investments and other gain",
              "activity_type": "Operating Activities",
              "amount": -253953
            },
            {
              "account_name": "Income taxes",
              "activity_type": "Operating Activities",
              "amount": 101613
            },
            {
              "account_name": "Increase in investments from asset management subsidiaries",
              "activity_type": "Operating Activities",
              "amount": -769572
            },
            {
              "account_name": "Increase in trade and other receivables",
              "activity_type": "Operating Activities",
              "amount": -508544
            },
            {
              "account_name": "Decrease (increase) in inventories",
              "activity_type": "Operating Activities",
              "amount": -40000
            },
            {
              "account_name": "Increase in trade and other payables",
              "activity_type": "Operating Activities",
              "amount": 237030
            },
            {
              "account_name": "Other",
              "activity_type": "Operating Activities",
              "amount": 93974
            },
            {
              "account_name": "Interest and dividends received",
              "activity_type": "Operating Activities",
              "amount": 299714
            },
            {
              "account_name": "Interest paid",
              "activity_type": "Operating Activities",
              "amount": -482111
            },
            {
              "account_name": "Income taxes paid",
              "activity_type": "Operating Activities",
              "amount": -380008
            },
            {
              "account_name": "Income taxes refunded",
              "activity_type": "Operating Activities",
              "amount": 164847
            },
            {
              "account_name": "Payments for acquisition of investments",
              "activity_type": "Investing Activities",
              "amount": -1625245
            },
            {
              "account_name": "Proceeds from sales/redemption of investments",
              "activity_type": "Investing Activities",
              "amount": 1180746
            },
            {
              "account_name": "Payments for acquisition of investments by SVF",
              "activity_type": "Investing Activities",
              "amount": -578927
            },
            {
              "account_name": "Proceeds from sales of investments by SVF",
              "activity_type": "Investing Activities",
              "amount": 458319
            },
            {
              "account_name": "Payments for acquisition of investments by asset management subsidiaries",
              "activity_type": "Investing Activities",
              "amount": 0
            },
            {
              "account_name": "Payments (net) for acquisition of control over subsidiaries",
              "activity_type": "Investing Activities",
              "amount": -194216
            },
            {
              "account_name": "Proceeds (net) from loss of control over subsidiaries",
              "activity_type": "Investing Activities",
              "amount": 94862
            },
            {
              "account_name": "Purchase of property, plant and equipment, and intangible assets",
              "activity_type": "Investing Activities",
              "amount": -854173
            },
            {
              "account_name": "Payments for loan receivables",
              "activity_type": "Investing Activities",
              "amount": -36538
            },
            {
              "account_name": "Collection of loan receivables",
              "activity_type": "Investing Activities",
              "amount": 119384
            },
            {
              "account_name": "Payments into time deposits",
              "activity_type": "Investing Activities",
              "amount": -139211
            },
            {
              "account_name": "Proceeds from withdrawal of time deposits",
              "activity_type": "Investing Activities",
              "amount": 166897
            },
            {
              "account_name": "Other",
              "activity_type": "Investing Activities",
              "amount": -223438
            },
            {
              "account_name": "Proceeds in (repayment of) short-term interest-bearing debt, net",
              "activity_type": "Financing Activities",
              "amount": -421723
            },
            {
              "account_name": "Proceeds from interest-bearing debt",
              "activity_type": "Financing Activities",
              "amount": 5313665
            },
            {
              "account_name": "Repayment of interest-bearing debt",
              "activity_type": "Financing Activities",
              "amount": -3809082
            },
            {
              "account_name": "Repayment of lease liabilities",
              "activity_type": "Financing Activities",
              "amount": -186441
            },
            {
              "account_name": "Distribution/repayment from SVF to third-party investors",
              "activity_type": "Financing Activities",
              "amount": -1485774
            },
            {
              "account_name": "Proceeds from the partial sales of shares of subsidiaries to non-controlling interests",
              "activity_type": "Financing Activities",
              "amount": 0
            },
            {
              "account_name": "Purchase of shares of subsidiaries from non-controlling interests",
              "activity_type": "Financing Activities",
              "amount": -79581
            },
            {
              "account_name": "Redemption of other equity instruments",
              "activity_type": "Financing Activities",
              "amount": 0
            },
            {
              "account_name": "Distribution to owners of other equity instruments",
              "activity_type": "Financing Activities",
              "amount": -18867
            },
            {
              "account_name": "Proceeds from the issuance of other equity instruments in subsidiaries",
              "activity_type": "Financing Activities",
              "amount": 200000
            },
            {
              "account_name": "Purchase of treasury stock",
              "activity_type": "Financing Activities",
              "amount": -237058
            },
            {
              "account_name": "Cash dividends paid",
              "activity_type": "Financing Activities",
              "amount": -64020
            },
            {
              "account_name": "Cash dividends paid to non-controlling interests",
              "activity_type": "Financing Activities",
              "amount": -368678
            },
            {
              "account_name": "Other",
              "activity_type": "Financing Activities",
              "amount": 41175
            },
            {
              "account_name": "Effect of exchange rate changes on cash and cash equivalents",
              "activity_type": "Other",
              "amount": 37487
            },
            {
              "account_name": "(Decrease) increase in cash and cash equivalents relating to transfer of assets classified as held for sale",
              "activity_type": "Other",
              "amount": 33011
            }
          ],
          "net_increase_in_cash": -2473846,
          "period_end": "2025-03-31"
        }
      ]
    },
    "statement_of_changes_in_equity": {
      "currency": "JPY",
      "items": [
        {
          "changes": [],
          "closing_balance": 238772,
          "component": "Common stock",
          "opening_balance": 238772
        },
        {
          "changes": [
            "Changes in interests in subsidiaries",
            "Share-based payment transactions",
            "Other"
          ],
          "closing_balance": 3376724,
          "component": "Capital surplus",
          "opening_balance": 3326093
        },
        {
          "changes": [],
          "closing_balance": 193199,
          "component": "Other equity instruments",
          "opening_balance": 193199
        },
        {
          "changes": [
            "Net income",
            "Cash dividends",
            "Distribution to owners of other equity instruments",
            "Transfer of accumulated other comprehensive income to retained earnings",
            "Purchase and disposal of treasury stock"
          ],
          "closing_balance": 2701792,
          "component": "Retained earnings",
          "opening_balance": 1632966
        },
        {
          "changes": [
            "Purchase and disposal of treasury stock"
          ],
          "closing_balance": -256251,
          "component": "Treasury stock",
          "opening_balance": -22725
        },
        {
          "changes": [
            "Other comprehensive income",
            "Transfer of accumulated other comprehensive income to retained earnings"
          ],
          "closing_balance": 5307305,
          "component": "Accumulated other comprehensive income",
          "opening_balance": 5793820
        }
      ],
      "period_end": "2025-03-31"
    },
    "statement_of_comprehensive_income": {
      "currency": "JPY",
      "periods": [
        {
          "items": [
            {
              "account_name": "Net income",
              "amount": 209217
            },
            {
              "account_name": "Remeasurements of defined benefit plan",
              "amount": -308
            },
            {
              "account_name": "Equity financial assets at FVTOCI",
              "amount": 10777
            },
            {
              "account_name": "Share of other comprehensive income of associates",
              "amount": 326
            },
            {
              "account_name": "Debt financial assets at FVTOCI",
              "amount": -286
            },
            {
              "account_name": "Cash flow hedges",
              "amount": 24007
            },
            {
              "account_name": "Exchange differences on translating foreign operations",
              "amount": 2000916
            },
            {
              "account_name": "Share of other comprehensive income of associates",
              "amount": -3208
            }
          ],
          "period_end": "2024-03-31",
          "total_comprehensive_income": 2241441
        },
        {
          "items": [
            {
              "account_name": "Net income",
              "amount": 1603108
            },
            {
              "account_name": "Remeasurements of defined benefit plan",
              "amount": 2598
            },
            {
              "account_name": "Equity financial assets at FVTOCI",
              "amount": -13757
            },
            {
              "account_name": "Share of other comprehensive income of associates",
              "amount": 162
            },
            {
              "account_name": "Debt financial assets at FVTOCI",
              "amount": -2373
            },
            {
              "account_name": "Cash flow hedges",
              "amount": 42263
            },
            {
              "account_name": "Exchange differences on translating foreign operations",
              "amount": -547774
            },
            {
              "account_name": "Share of other comprehensive income of associates",
              "amount": -1879
            }
          ],
          "period_end": "2025-03-31",
          "total_comprehensive_income": 1082348
        }
      ]
    },
    "statement_of_financial_position": {
      "currency": "JPY",
      "periods": [
        {
          "as_of_date": "2024-03-31",
          "items": [
            {
              "account_name": "Cash and cash equivalents",
              "amount": 6186874,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Trade and other receivables",
              "amount": 2868767,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Derivative financial assets",
              "amount": 852350,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Other financial assets",
              "amount": 777996,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Inventories",
              "amount": 161863,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Other current assets",
              "amount": 550984,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Assets classified as held for sale",
              "amount": 42559,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Property, plant and equipment",
              "amount": 1895289,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Right-of-use assets",
              "amount": 746903,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Goodwill",
              "amount": 5709874,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Intangible assets",
              "amount": 2448840,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Costs to obtain contracts",
              "amount": 317650,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Investments accounted for using the equity method",
              "amount": 839208,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Investments from SVF (FVTPL)",
              "amount": 11014487,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Investment securities",
              "amount": 9061972,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Derivative financial assets",
              "amount": 385528,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Other financial assets",
              "amount": 2424282,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Deferred tax assets",
              "amount": 245954,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Other non-current assets",
              "amount": 192863,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Interest-bearing debt",
              "amount": 8271143,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Lease liabilities",
              "amount": 149801,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Deposits for banking business",
              "amount": 1643155,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Trade and other payables",
              "amount": 2710529,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Derivative financial liabilities",
              "amount": 195090,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Other financial liabilities",
              "amount": 31801,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Income taxes payable",
              "amount": 163226,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Provisions",
              "amount": 44704,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Other current liabilities",
              "amount": 801285,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Liabilities directly relating to assets classified as held for sale",
              "amount": 9561,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Interest-bearing debt",
              "amount": 12296381,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Lease liabilities",
              "amount": 644706,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Third-party interests in SVF",
              "amount": 4694503,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Derivative financial liabilities",
              "amount": 41238,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Other financial liabilities",
              "amount": 57017,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Provisions",
              "amount": 167902,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Deferred tax liabilities",
              "amount": 1253039,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Other non-current liabilities",
              "amount": 311993,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Common stock",
              "amount": 238772,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Capital surplus",
              "amount": 3326093,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Other equity instruments",
              "amount": 193199,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Retained earnings",
              "amount": 1632966,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Treasury stock",
              "amount": -22725,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Accumulated other comprehensive income",
              "amount": 5793820,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Non-controlling interests",
              "amount": 2075044,
              "category": "Equity",
              "subcategory": null
            }
          ]
        },
        {
          "as_of_date": "2025-03-31",
          "items": [
            {
              "account_name": "Cash and cash equivalents",
              "amount": 3713028,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Trade and other receivables",
              "amount": 3008144,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Derivative financial assets",
              "amount": 111258,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Other financial assets",
              "amount": 1485877,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Inventories",
              "amount": 198291,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Other current assets",
              "amount": 365880,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Assets classified as held for sale",
              "amount": 550440,
              "category": "Assets",
              "subcategory": "Current assets"
            },
            {
              "account_name": "Property, plant and equipment",
              "amount": 2830185,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Right-of-use assets",
              "amount": 857961,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Goodwill",
              "amount": 5781931,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Intangible assets",
              "amount": 2414562,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Costs to obtain contracts",
              "amount": 383022,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Investments accounted for using the equity method",
              "amount": 502995,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Investments from SVF (FVTPL)",
              "amount": 11410922,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Investment securities",
              "amount": 8040068,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Derivative financial assets",
              "amount": 168248,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Other financial assets",
              "amount": 2767625,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Deferred tax assets",
              "amount": 207987,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Other non-current assets",
              "amount": 215332,
              "category": "Assets",
              "subcategory": "Non-current assets"
            },
            {
              "account_name": "Interest-bearing debt",
              "amount": 5629648,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Lease liabilities",
              "amount": 165355,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Deposits for banking business",
              "amount": 1795965,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Trade and other payables",
              "amount": 3036349,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Derivative financial liabilities",
              "amount": 840469,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Other financial liabilities",
              "amount": 5940,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Income taxes payable",
              "amount": 444180,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Provisions",
              "amount": 54047,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Other current liabilities",
              "amount": 629717,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Liabilities directly relating to assets classified as held for sale",
              "amount": 0,
              "category": "Liabilities",
              "subcategory": "Current liabilities"
            },
            {
              "account_name": "Interest-bearing debt",
              "amount": 12376682,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Lease liabilities",
              "amount": 741665,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Third-party interests in SVF",
              "amount": 3652797,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Derivative financial liabilities",
              "amount": 104197,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Other financial liabilities",
              "amount": 199284,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Provisions",
              "amount": 155436,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Deferred tax liabilities",
              "amount": 924392,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Other non-current liabilities",
              "amount": 304607,
              "category": "Liabilities",
              "subcategory": "Non-current liabilities"
            },
            {
              "account_name": "Common stock",
              "amount": 238772,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Capital surplus",
              "amount": 3376724,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Other equity instruments",
              "amount": 193199,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Retained earnings",
              "amount": 2701792,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Treasury stock",
              "amount": -256251,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Accumulated other comprehensive income",
              "amount": 5307305,
              "category": "Equity",
              "subcategory": "Equity attributable to owners of the parent"
            },
            {
              "account_name": "Non-controlling interests",
              "amount": 2391485,
              "category": "Equity",
              "subcategory": null
            }
          ]
        }
      ]
    },
    "statement_of_profit_or_loss": {
      "currency": "JPY",
      "items": [
        {
          "account_name": "Net sales",
          "amount": 7243752
        },
        {
          "account_name": "Cost of sales",
          "amount": -3489549
        },
        {
          "account_name": "Gross profit",
          "amount": 3754203
        },
        {
          "account_name": "Gain (loss) on investments at Investment Business of Holding Companies",
          "amount": 3413821
        },
        {
          "account_name": "Gain (loss) on investments at SoftBank Vision Funds",
          "amount": 387584
        },
        {
          "account_name": "Gain (loss) on other investments",
          "amount": -100298
        },
        {
          "account_name": "Total gain on investments",
          "amount": 3701107
        },
        {
          "account_name": "Selling, general and administrative expenses",
          "amount": -3024409
        },
        {
          "account_name": "Finance cost",
          "amount": -581559
        },
        {
          "account_name": "Foreign exchange gain (loss)",
          "amount": 27055
        },
        {
          "account_name": "Derivative gain (loss) (excluding gain (loss) on investments)",
          "amount": -2034029
        },
        {
          "account_name": "Change in third-party interests in SVF",
          "amount": -491898
        },
        {
          "account_name": "Other gain",
          "amount": 354251
        },
        {
          "account_name": "Income before income tax",
          "amount": 1704721
        },
        {
          "account_name": "Income taxes",
          "amount": -101613
        }
      ],
      "net_income": 1603108,
      "period_end": "2025-03-31",
      "period_start": "2024-04-01"
    }
  }
  ```

  ```json Citations expandable theme={"system"}
  {
    "currency": [
      {
        "bboxes": [
          {
            "height": 20.03041076660156,
            "left": 955.2528076171876,
            "top": 156.55679321289062,
            "width": 122.904052734375
          }
        ],
        "citation_id": "smyIOGl",
        "citation_type": "Segment",
        "content": "(Millions yen) of",
        "page_height": 1684,
        "page_number": 1,
        "page_width": 1190,
        "segment_id": "msfcd8k",
        "segment_type": "Caption"
      },
      {
        "bboxes": [
          {
            "height": 19.39678955078125,
            "left": 1043.5679931640625,
            "top": 156.64320373535156,
            "width": 34.5888671875
          }
        ],
        "citation_id": "P41EBY9",
        "citation_type": "Word",
        "content": "yen)",
        "page_height": 1684,
        "page_number": 1,
        "page_width": 1190,
        "segment_type": "Text"
      },
      // .. more citations
    ],
    "entity_name": [
      {
        "bboxes": [
          {
            "height": 34.08674621582031,
            "left": 793.8571166992188,
            "top": 50.41603088378906,
            "width": 343.96636962890625
          }
        ],
        "citation_id": "_jotB2i",
        "citation_type": "Segment",
        "content": "SoftBank Group Corp. Consolidated Financial Report\nFor the Fiscal Year Ended March 31, 2025",
        "page_height": 1684,
        "page_number": 1,
        "page_width": 1190,
        "segment_id": "Amt340p",
        "segment_type": "PageHeader"
      },
      // .. more citations
    ],
    "report_title": [
      {
        "bboxes": [
          {
            "height": 34.08674621582031,
            "left": 793.8571166992188,
            "top": 50.41603088378906,
            "width": 343.96636962890625
          }
        ],
        "citation_id": "9E7BaA8",
        "citation_type": "Segment",
        "content": "SoftBank Group Corp. Consolidated Financial Report\nFor the Fiscal Year Ended March 31, 2025",
        "page_height": 1684,
        "page_number": 1,
        "page_width": 1190,
        "segment_id": "Amt340p",
        "segment_type": "PageHeader"
      },
      // .. more citations
    ],
    "reporting_as_of_date": [
      {
        "bboxes": [
          {
            "height": 34.08674621582031,
            "left": 793.8571166992188,
            "top": 50.41603088378906,
            "width": 343.96636962890625
          }
        ],
        "citation_id": "1pR8imf",
        "citation_type": "Segment",
        "content": "SoftBank Group Corp. Consolidated Financial Report\nFor the Fiscal Year Ended March 31, 2025",
        "page_height": 1684,
        "page_number": 1,
        "page_width": 1190,
        "segment_id": "Amt340p",
        "segment_type": "PageHeader"
      },
      // .. more citations
    ],
    "reporting_period_end": [
      {
        "bboxes": [
          {
            "height": 34.08674621582031,
            "left": 793.8571166992188,
            "top": 50.41603088378906,
            "width": 343.96636962890625
          }
        ],
        "citation_id": "S7ocr4q",
        "citation_type": "Segment",
        "content": "SoftBank Group Corp. Consolidated Financial Report\nFor the Fiscal Year Ended March 31, 2025",
        "page_height": 1684,
        "page_number": 1,
        "page_width": 1190,
        "segment_id": "Amt340p",
        "segment_type": "PageHeader"
      },
      // .. more citations
    ],
    "reporting_period_start": [
      {
        "bboxes": [
          {
            "height": 854.3191528320312,
            "left": 119.18824005126952,
            "top": 209.4170684814453,
            "width": 973.8115234375
          }
        ],
        "citation_id": "HiQ_2nI",
        "citation_type": "Segment",
        "content": "<table>\n  <thead>\n    <tr>\n      <th></th>\n      <th>Common stock</th>\n      <th>Capital surplus</th>\n      <th>Other equity instruments</th>\n      <th>Retained earnings</th>\n      <th>Treasury stock</th>\n      <th>Accumulated other comprehensive income</th>\n      <th>Total</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>As of April 1, 2024</td>\n      <td>238,772</td>\n      <td>3,326,093</td>\n      <td>193,199</td>\n      <td>1,632,966</td>\n      <td>(22,725)</td>\n      <td>5,793,820</td>\n      <td>11,162,125</td>\n    </tr>\n    <tr>\n      <td>Comprehensive income</td>\n      <td></td>\n      <td></td>\n      <td></td>\n      <td></td>\n      <td></td>\n      <td></td>\n      <td></td>\n    </tr>\n    <tr>\n      <td>Net income</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>1,153,332</td>\n      <td>-</td>\n      <td>-</td>\n      <td>1,153,332</td>\n    </tr>\n    <tr>\n      <td>Other comprehensive income</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>(487,095)</td>\n      <td>(487,095)</td>\n    </tr>\n    <tr>\n      <td>Total comprehensive income</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>1,153,332</td>\n      <td>-</td>\n      <td>(487,095)</td>\n      <td>666,237</td>\n    </tr>\n    <tr>\n      <td>Transactions with owners and other transactions</td>\n      <td></td>\n      <td></td>\n      <td></td>\n      <td></td>\n      <td></td>\n      <td></td>\n      <td></td>\n    </tr>\n    <tr>\n      <td>Cash dividends</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>(64,086)</td>\n      <td>-</td>\n      <td>-</td>\n      <td>(64,086)</td>\n    </tr>\n    <tr>\n      <td>Distribution to owners of other equity instruments</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>(18,867)</td>\n      <td>-</td>\n      <td>-</td>\n      <td>(18,867)</td>\n    </tr>\n    <tr>\n      <td>Transfer of accumulated other comprehensive income to retained earnings</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>(580)</td>\n      <td>-</td>\n      <td>580</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <td>Purchase and disposal of treasury stock</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>(973)</td>\n      <td>(233,526)</td>\n      <td>-</td>\n      <td>(234,499)</td>\n    </tr>\n    <tr>\n      <td>Changes from loss of control</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <td>Changes in interests in subsidiaries</td>\n      <td>-</td>\n      <td>49,732</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>49,732</td>\n    </tr>\n    <tr>\n      <td>Issuance of other equity instruments in subsidiaries</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n    </tr>\n    <tr>\n      <td>Share-based payment transactions</td>\n      <td>-</td>\n      <td>(1,049)</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>(1,049)</td>\n    </tr>\n    <tr>\n      <td>Other</td>\n      <td>-</td>\n      <td>1,948</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>-</td>\n      <td>1,948</td>\n    </tr>\n    <tr>\n      <td>Total transactions with owners and other transactions</td>\n      <td>-</td>\n      <td>50,631</td>\n      <td>-</td>\n      <td>(84,506)</td>\n      <td>(233,526)</td>\n      <td>580</td>\n      <td>(266,821)</td>\n    </tr>\n    <tr>\n      <td>As of March 31, 2025</td>\n      <td>238,772</td>\n      <td>3,376,724</td>\n      <td>193,199</td>\n      <td>2,701,792</td>\n      <td>(256,251)</td>\n      <td>5,307,305</td>\n      <td>11,561,541</td>\n    </tr>\n  </tbody>\n</table>",
        "page_height": 1684,
        "page_number": 7,
        "page_width": 1190,
        "segment_id": "N2J_j_e",
        "segment_type": "Table"
      },
      // .. more citations
    ],
    "statement_of_cash_flows": {
      "currency": [
        {
          "bboxes": [
            {
              "height": 17.33056640625,
              "left": 932.5235595703124,
              "top": 158.1707000732422,
              "width": 122.353271484375
            }
          ],
          "citation_id": "IIQwBAe",
          "citation_type": "Segment",
          "content": "(Millions of yen)",
          "page_height": 1684,
          "page_number": 9,
          "page_width": 1190,
          "segment_id": "cPeI4-1",
          "segment_type": "Text"
        },
        // .. more citations
      ],
      // .. more items
    }, 
    // .. more statements
  }
  ```

  ```json Metrics expandable theme={"system"}
  {
    "currency": {
      "citation_status": "Created",
      "confidence": "High"
    },
    "entity_name": {
      "citation_status": "Created",
      "confidence": "High"
    },
    "report_title": {
      "citation_status": "Created",
      "confidence": "High"
    },
    "reporting_as_of_date": {
      "citation_status": "Created",
      "confidence": "High"
    },
    "reporting_period_end": {
      "citation_status": "Created",
      "confidence": "High"
    },
    "reporting_period_start": {
      "citation_status": "Created",
      "confidence": "High"
    },
    "statement_of_cash_flows": {
      "currency": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "periods": [
        {
          "closing_cash_balance": {
            "citation_status": "Created",
            "confidence": "High"
          },
          "items": [
            {
              "account_name": {
                "citation_status": "Created",
                "confidence": "High"
              }
            }
            // .. more items
          ]
        }
        // .. more periods
      ]
    }
    // .. more metrics
  }
  ```
</CodeGroup>

## Medical Benefits Claim

Extract key medical benefits claim data from medical benefits claim documents.

<Frame>
  <iframe src="https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/medical_benefits_claim.pdf" title="Medical Benefits Claim" className="w-full h-96 rounded-xl" />
</Frame>

### Schema

<CodeGroup>
  ```python Python theme={"system"}
  import os
  from datetime import date
  from decimal import Decimal
  from typing import List, Optional

  from chunkr_ai import Chunkr
  from pydantic import BaseModel

  class Address(BaseModel):
      line1: Optional[str]
      line2: Optional[str]
      city: Optional[str]
      state: Optional[str]
      country: Optional[str]
      postal_code: Optional[str]
      raw: Optional[str]

  class EmployeeInfo(BaseModel):
      employer_name: Optional[str]
      policy_group_number: Optional[str]
      aetna_id: Optional[str]
      full_name: Optional[str]
      birthdate: Optional[date]
      employment_status: Optional[str]
      date_of_retirement: Optional[date]
      address: Optional[Address]
      phone: Optional[str]

  class PatientInfo(BaseModel):
      full_name: Optional[str]
      aetna_id: Optional[str]
      birthdate: Optional[date]
      relationship_to_employee: Optional[str]
      address: Optional[Address]
      gender: Optional[str]
      marital_status: Optional[str]
      employed: Optional[bool]
      employer_name: Optional[str]
      employer_address: Optional[Address]

  class ClaimCircumstances(BaseModel):
      accident_related: Optional[bool]
      accident_date: Optional[date]
      accident_time: Optional[str]
      employment_related: Optional[bool]
      other_coverage: Optional[bool]
      other_insurance_company: Optional[str]
      other_policy_number: Optional[str]
      other_policy_holder: Optional[str]

  class Authorization(BaseModel):
      patient_signature: Optional[str]
      patient_signature_date: Optional[date]
      assignment_of_benefits_signature: Optional[str]
      assignment_date: Optional[date]

  class FacilityInfo(BaseModel):
      name: Optional[str]
      address: Optional[Address]
      admission_date: Optional[date]
      discharge_date: Optional[date]

  class Diagnosis(BaseModel):
      primary: Optional[str]
      secondary: Optional[List[str]]
      icd_codes: Optional[List[str]]

  class ProcedureEntry(BaseModel):
      service_date: Optional[date]
      place_of_service: Optional[str]
      procedure_code: Optional[str]
      description: Optional[str]
      type_of_service: Optional[str]
      charge: Optional[Decimal]
      units: Optional[int]
      diagnosis_code: Optional[str]

  class PhysicianInfo(BaseModel):
      full_name: Optional[str]
      address: Optional[Address]
      phone: Optional[str]
      taxpayer_id: Optional[str]
      patient_account_number: Optional[str]
      national_provider_identifier: Optional[str]
      signature: Optional[str]
      signature_date: Optional[date]

  class BillingSummary(BaseModel):
      total_charge: Optional[Decimal]
      amount_paid: Optional[Decimal]
      balance_due: Optional[Decimal]

  class MedicalBenefitsClaim(BaseModel):
      employee: Optional[EmployeeInfo]
      patient: Optional[PatientInfo]
      claim_circumstances: Optional[ClaimCircumstances]
      authorization: Optional[Authorization]
      physician: Optional[PhysicianInfo]
      facility: Optional[FacilityInfo]
      diagnosis: Optional[Diagnosis]
      procedures: Optional[List[ProcedureEntry]]
      billing: Optional[BillingSummary]
  ```

  ```typescript TypeScript (Zod) theme={"system"}
  import * as z from "zod";
  import Chunkr from "chunkr-ai";

  const AddressSchema = z.object({
    line1: z.string().optional(),
    line2: z.string().optional(),
    city: z.string().optional(),
    state: z.string().optional(),
    country: z.string().optional(),
    postal_code: z.string().optional(),
    raw: z.string().optional(),
  });

  const EmployeeInfoSchema = z.object({
    employer_name: z.string().optional(),
    policy_group_number: z.string().optional(),
    aetna_id: z.string().optional(),
    full_name: z.string().optional(),
    birthdate: z.date().optional(),
    employment_status: z.string().optional(),
    date_of_retirement: z.date().optional(),
    address: AddressSchema.optional(),
    phone: z.string().optional(),
  });

  const PatientInfoSchema = z.object({
    full_name: z.string().optional(),
    aetna_id: z.string().optional(),
    birthdate: z.date().optional(),
    relationship_to_employee: z.string().optional(),
    address: AddressSchema.optional(),
    gender: z.string().optional(),
    marital_status: z.string().optional(),
    employed: z.boolean().optional(),
    employer_name: z.string().optional(),
    employer_address: AddressSchema.optional(),
  });

  const ClaimCircumstancesSchema = z.object({
    accident_related: z.boolean().optional(),
    accident_date: z.date().optional(),
    accident_time: z.string().optional(),
    employment_related: z.boolean().optional(),
    other_coverage: z.boolean().optional(),
    other_insurance_company: z.string().optional(),
    other_policy_number: z.string().optional(),
    other_policy_holder: z.string().optional(),
  });

  const AuthorizationSchema = z.object({
    patient_signature: z.string().optional(),
    patient_signature_date: z.date().optional(),
    assignment_of_benefits_signature: z.string().optional(),
    assignment_date: z.date().optional(),
  });

  const FacilityInfoSchema = z.object({
    name: z.string().optional(),
    address: AddressSchema.optional(),
    admission_date: z.date().optional(),
    discharge_date: z.date().optional(),
  });

  const DiagnosisSchema = z.object({
    primary: z.string().optional(),
    secondary: z.array(z.string()).optional(),
    icd_codes: z.array(z.string()).optional(),
  });

  const ProcedureEntrySchema = z.object({
    service_date: z.date().optional(),
    place_of_service: z.string().optional(),
    procedure_code: z.string().optional(),
    description: z.string().optional(),
    type_of_service: z.string().optional(),
    charge: z.number().optional(),
    units: z.number().int().optional(),
    diagnosis_code: z.string().optional(),
  });

  const PhysicianInfoSchema = z.object({
    full_name: z.string().optional(),
    address: AddressSchema.optional(),
    phone: z.string().optional(),
    taxpayer_id: z.string().optional(),
    patient_account_number: z.string().optional(),
    national_provider_identifier: z.string().optional(),
    signature: z.string().optional(),
    signature_date: z.date().optional(),
  });

  const BillingSummarySchema = z.object({
    total_charge: z.number().optional(),
    amount_paid: z.number().optional(),
    balance_due: z.number().optional(),
  });

  const MedicalBenefitsClaimSchema = z.object({
    employee: EmployeeInfoSchema.optional(),
    patient: PatientInfoSchema.optional(),
    claim_circumstances: ClaimCircumstancesSchema.optional(),
    authorization: AuthorizationSchema.optional(),
    physician: PhysicianInfoSchema.optional(),
    facility: FacilityInfoSchema.optional(),
    diagnosis: DiagnosisSchema.optional(),
    procedures: z.array(ProcedureEntrySchema).optional(),
    billing: BillingSummarySchema.optional(),
  });
  ```
</CodeGroup>

### Process

<CodeGroup>
  ```python Python theme={"system"}
  # Convert Pydantic model to JSON schema
  schema = MedicalBenefitsClaim.model_json_schema()
  client = Chunkr(api_key=os.environ["CHUNKR_API_KEY"])

  # Create extract task
  task = client.tasks.extract.create(
      file="https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/medical_benefits_claim.pdf",
      schema=schema,
  )
  ```

  ```typescript TypeScript theme={"system"}
  // Convert Zod schema to JSON schema
  const schema = z.toJSONSchema(MedicalBenefitsClaimSchema);
  const client = new Chunkr({ apiKey: process.env.CHUNKR_API_KEY });

  // Create extract task
  const task = client.tasks.extract.create({
    file: "https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/medical_benefits_claim.pdf",
    schema: schema,
  });
  ```
</CodeGroup>

### Output

<CodeGroup>
  ```json Result expandable theme={"system"}
  {
    "authorization": {
      "assignment_date": "2025-02-16",
      "assignment_of_benefits_signature": "Anderson MJ",
      "patient_signature": "Anderson MJ",
      "patient_signature_date": "2025-02-16"
    },
    "billing": {
      "amount_paid": 200,
      "balance_due": 1600,
      "total_charge": 1800
    },
    "claim_circumstances": {
      "accident_date": "2025-02-12",
      "accident_related": true,
      "accident_time": "15:30",
      "employment_related": false,
      "other_coverage": false,
      "other_insurance_company": null,
      "other_policy_holder": null,
      "other_policy_number": null
    },
    "diagnosis": {
      "icd_codes": [
        "S52.5",
        "S50.1"
      ],
      "primary": "Fractured Radius",
      "secondary": [
        "Contusion of Forearm"
      ]
    },
    "employee": {
      "address": {
        "city": "Springfield",
        "country": null,
        "line1": "145 E Indian Blvd",
        "line2": null,
        "postal_code": null,
        "raw": "145 E Indian Blvd, Springfield, IL",
        "state": "IL"
      },
      "aetna_id": "E451958",
      "birthdate": "1980-03-14",
      "date_of_retirement": null,
      "employer_name": "Technova Solutions Inc.",
      "employment_status": "Active",
      "full_name": "Anderson, Mary J.",
      "phone": "2155557890",
      "policy_group_number": "A124175"
    },
    "facility": {
      "address": {
        "city": "Springfield",
        "country": null,
        "line1": "451 Health Ave",
        "line2": null,
        "postal_code": "62704",
        "raw": "Springfield Community Hospital, 451 Health Ave, Springfield, IL 62704",
        "state": "IL"
      },
      "admission_date": "2025-02-15",
      "discharge_date": "2025-02-16",
      "name": "Springfield Community Hospital"
    },
    "patient": {
      "address": {
        "city": "Springfield",
        "country": null,
        "line1": "145 E Indian Blvd",
        "line2": null,
        "postal_code": null,
        "raw": "145 E Indian Blvd, Springfield, IL",
        "state": "IL"
      },
      "aetna_id": "P51309",
      "birthdate": "2010-06-24",
      "employed": false,
      "employer_address": null,
      "employer_name": null,
      "full_name": "John R.",
      "gender": "Male",
      "marital_status": "Single",
      "relationship_to_employee": "Child"
    },
    "physician": {
      "address": {
        "city": "Springfield",
        "country": null,
        "line1": "3 Health Ave",
        "line2": null,
        "postal_code": "62705",
        "raw": "Springfield Orthopedics, 3 Health Ave, Springfield, IL 62705",
        "state": "IL"
      },
      "full_name": "Dr. Jake Blakey",
      "national_provider_identifier": "502357115",
      "patient_account_number": "PT-20250215-001",
      "phone": "2171527785",
      "signature": "Jake B",
      "signature_date": "2025-02-16",
      "taxpayer_id": "IL-12458"
    },
    "procedures": [
      {
        "charge": 250,
        "description": "X-ray Forearm",
        "diagnosis_code": "S52.5",
        "place_of_service": "Outpatient",
        "procedure_code": "73090",
        "service_date": "2025-02-15",
        "type_of_service": "4",
        "units": 1
      },
      {
        "charge": 1200,
        "description": "Closed Treatment, Radius",
        "diagnosis_code": "S52.5",
        "place_of_service": "Outpatient",
        "procedure_code": "24500",
        "service_date": "2025-02-15",
        "type_of_service": "2",
        "units": 1
      },
      {
        "charge": 350,
        "description": "Cast Application",
        "diagnosis_code": "S52.5",
        "place_of_service": "Outpatient",
        "procedure_code": "29125",
        "service_date": "2025-02-15",
        "type_of_service": "1",
        "units": 1
      }
    ]
  }
  ```

  ```json Citations expandable theme={"system"}
  {
    "authorization": {
      "assignment_date": [
        {
          "bboxes": [
            {
              "height": 1757.04248046875,
              "left": 165.21835327148438,
              "top": 332.1818542480469,
              "width": 3398.235107421875
            }
          ],
          "citation_id": "RAkPJD2",
          "citation_type": "Segment",
          "content": "| TO BE COMPLETED BY EMPLOYEE | | | |\n| :--- | :--- | :--- | :--- |\n| 1. Employer's Name<br>**Technova Solutions Inc.** | 2. Policy/Group Number<br>**A124175** | | |\n| 3. Employee's Aetna ID Number<br>**E451958** | 4. Employee's Name<br>**Anderson, Mary J.** | 5. Employee's Birthdate (MM/DD/YYYY)<br>**03/14/1980** | |\n| 6. ☑ Active ☐ Retired<br>Date of Retirement | 7. Employee's Address (include ZIP Code)<br>**145 E Indian Blvd, Springfield, IL** | ☑ Address is new | 8. Employee's Daytime Telephone Number<br>**(** **215** **) 555-7890** |\n| 9. Patient's Name<br>**John R.** | 10. Patient's Aetna ID Number<br>**P51309** | 11. Patient's Birthdate (MM/DD/YYYY)<br>**06/24/2010** | 12. Patient's Relationship to Employee<br>☐ Self ☐ Spouse ☑ Child ☐ Other |\n| 13. Patient's Address (if different from employee) | | | 14. Patient's Gender<br>☑ Male ☐ Female |\n| 15. Patient's Marital Status<br>☐ Married ☑ Single | 16. Is patient employed?<br>☑ No ☐ Yes | 17. Name & Address of Employer | |\n| 18. Is claim related to an accident?<br>☐ No ☑ Yes If Yes, date **02/12/2025** time **3:30** ☐ am ☑ pm | 19. Is claim related to employment?<br>☑ No ☐ Yes | | |\n| 20. Are any family members expenses covered by another group health plan, group pre-payment plan (Blue Cross- Blue Shield, etc.), no fault auto insurance, Medicare or any federal, state or local government plan?<br>☑ No ☐ Yes | 21. If Yes, list policy or contract holder, policy or contract number(s) and name/address of insurance company or administrator: | | |\n| 22. Member's ID Number | 23. Member's Name | 24. Member's Birthdate (MM/DD/YYYY) | |\n| 25. To all providers of health care:<br>You are authorized to provide Aetna Life Insurance Company or one of its affiliated companies (\"Aetna\"), and any independent claim administrators and consulting health professionals and utilization review organizations with whom Aetna has contracted, information concerning health care advice, treatment or supplies provided the patient (including that relating to mental illness and/or AIDS/ARC/HIV). This information will be used to evaluate claims for benefits. Aetna may provide the employer named above with any benefit calculation used in payment of this claim for the purpose of reviewing the experience and operation of the policy or contract. This authorization is valid for the term of the policy or contract under which a claim has been submitted. I know that I have a right to receive a copy of this authorization upon request and agree that a photographic copy of this authorization is as valid as the original.<br>Patient's or Authorized Person's Signature _Anderson MJ_<br>Date **02/16/2025** | | | |\n| 26. I authorize payment of medical benefits to the physician or supplier of service.<br>Patient's or Authorized Person's Signature _Anderson MJ_<br>Date **02/16/2025** | | | |\n",
          "page_height": 5262,
          "page_number": 1,
          "page_width": 3720,
          "segment_id": "JKcpWlp",
          "segment_type": "FormRegion"
        },
        // .. more citations
      ],
      // .. more items
    },
    "billing": {
      "amount_paid": [
        {
          "bboxes": [
            {
              "height": 994.55126953125,
              "left": 164.0844268798828,
              "top": 3055.027587890625,
              "width": 3395.474365234375
            }
          ],
          "citation_id": "HHx7h7v",
          "citation_type": "Segment",
          "content": "| Date of Service | Place of Service* | Procedure Code Identify** | Description of Service | Type of Service † | Charges | Days or Units | Diagnosis Code †† |\n| :-------------- | :---------------- | :------------------------ | :--------------------- | :---------------- | :------ | :------------ | :---------------- |\n| 02/15/202       | Outpatient        | 73090                     | X-ray Forearm          | 4                 | $250    | 1             | S52.5             |\n| 02/15/202       | Outpatient        | 24500                     | Closed Treatment, Radius | 2                 | $1200   | 1             | S52.5             |\n| 02/15/202       | Outpatient        | 29125                     | Cast Application       | 1                 | $350    | 1             | S52.5             |\n\n| 39. Physician's Name & Address (include ZIP Code) | 40. Telephone Number | 41. Enter the taxpayer identifying number to be used for 1099 reporting purposes. You are required under authority of law to furnish your taxpayer identifying number. |\n| :------------------------------------------------ | :------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Dr. Jake Blakey, Springfield Orthopedics, 3 Health Ave, Springfield, IL 62705 | ( 217 ) 1527785 | IL-12458                                                                                                                                                          |\n\n| 42. Patient Account Number | 43. Total charge Amount paid Balance due | $ 1800 $ 200 $ 1600 |\n| :------------------------- | :--------------------------------------- | :------------------ |\n| PT-20250215-001            |                                          |                     |\n\n| 44. Physician's or Supplier's Signature | 45. National Provider Identifier | 46. Date |\n| :-------------------------------------- | :------------------------------- | :------- |\n| [Signature image]                       | 502357115                        | 02/16/2025 |\n",
          "page_height": 5262,
          "page_number": 1,
          "page_width": 3720,
          "segment_id": "LSu9eG3",
          "segment_type": "FormRegion"
        },
        // .. more citations
      ],
      // .. more items
    },
    "claim_circumstances": {
      "accident_date": [
        {
          "bboxes": [
            {
              "height": 1757.04248046875,
              "left": 165.21835327148438,
              "top": 332.1818542480469,
              "width": 3398.235107421875
            }
          ],
          "citation_id": "lXDxgTh",
          "citation_type": "Segment",
          "content": "| TO BE COMPLETED BY EMPLOYEE | | | |\n| :--- | :--- | :--- | :--- |\n| 1. Employer's Name<br>**Technova Solutions Inc.** | 2. Policy/Group Number<br>**A124175** | | |\n| 3. Employee's Aetna ID Number<br>**E451958** | 4. Employee's Name<br>**Anderson, Mary J.** | 5. Employee's Birthdate (MM/DD/YYYY)<br>**03/14/1980** | |\n| 6. ☑ Active ☐ Retired<br>Date of Retirement | 7. Employee's Address (include ZIP Code)<br>**145 E Indian Blvd, Springfield, IL** | ☑ Address is new | 8. Employee's Daytime Telephone Number<br>**(** **215** **) 555-7890** |\n| 9. Patient's Name<br>**John R.** | 10. Patient's Aetna ID Number<br>**P51309** | 11. Patient's Birthdate (MM/DD/YYYY)<br>**06/24/2010** | 12. Patient's Relationship to Employee<br>☐ Self ☐ Spouse ☑ Child ☐ Other |\n| 13. Patient's Address (if different from employee) | | | 14. Patient's Gender<br>☑ Male ☐ Female |\n| 15. Patient's Marital Status<br>☐ Married ☑ Single | 16. Is patient employed?<br>☑ No ☐ Yes | 17. Name & Address of Employer | |\n| 18. Is claim related to an accident?<br>☐ No ☑ Yes If Yes, date **02/12/2025** time **3:30** ☐ am ☑ pm | 19. Is claim related to employment?<br>☑ No ☐ Yes | | |\n| 20. Are any family members expenses covered by another group health plan, group pre-payment plan (Blue Cross- Blue Shield, etc.), no fault auto insurance, Medicare or any federal, state or local government plan?<br>☑ No ☐ Yes | 21. If Yes, list policy or contract holder, policy or contract number(s) and name/address of insurance company or administrator: | | |\n| 22. Member's ID Number | 23. Member's Name | 24. Member's Birthdate (MM/DD/YYYY) | |\n| 25. To all providers of health care:<br>You are authorized to provide Aetna Life Insurance Company or one of its affiliated companies (\"Aetna\"), and any independent claim administrators and consulting health professionals and utilization review organizations with whom Aetna has contracted, information concerning health care advice, treatment or supplies provided the patient (including that relating to mental illness and/or AIDS/ARC/HIV). This information will be used to evaluate claims for benefits. Aetna may provide the employer named above with any benefit calculation used in payment of this claim for the purpose of reviewing the experience and operation of the policy or contract. This authorization is valid for the term of the policy or contract under which a claim has been submitted. I know that I have a right to receive a copy of this authorization upon request and agree that a photographic copy of this authorization is as valid as the original.<br>Patient's or Authorized Person's Signature _Anderson MJ_<br>Date **02/16/2025** | | | |\n| 26. I authorize payment of medical benefits to the physician or supplier of service.<br>Patient's or Authorized Person's Signature _Anderson MJ_<br>Date **02/16/2025** | | | |\n",
          "page_height": 5262,
          "page_number": 1,
          "page_width": 3720,
          "segment_id": "JKcpWlp",
          "segment_type": "FormRegion"
        },
        {
          "bboxes": [
            {
              "height": 42.3504638671875,
              "left": 838.3680419921875,
              "top": 1198.1663818359375,
              "width": 245.69281005859375
            }
          ],
          "citation_id": "rP_peLy",
          "citation_type": "Word",
          "content": "02/12/2025",
          "page_height": 5262,
          "page_number": 1,
          "page_width": 3720,
          "segment_type": "Text"
        }
      ],
      // .. more items
      "other_insurance_company": null,
      "other_policy_holder": null,
      "other_policy_number": null
    },
    "diagnosis": {
      "icd_codes": [
        [
          {
            "bboxes": [
              {
                "height": 356.846435546875,
                "left": 178.343994140625,
                "top": 2652.0048828125,
                "width": 1702.4400634765625
              }
            ],
            "citation_id": "Yg3yi0-",
            "citation_type": "Segment",
            "content": "Springfield 62704 Community IL Springfield, Hospital, Ave, 451 Health 37. Diagnosis or nature of illness or injury (please secondary) indicate primary and Radius (ICD-10 S52.5) Fractured 1. 2. Contusion S50.1) of Forearm (ICD-10 3. 4.",
            "page_height": 5262,
            "page_number": 1,
            "page_width": 3720,
            "segment_id": "B3r1dMj",
            "segment_type": "Text"
          },
          {
            "bboxes": [
              {
                "height": 44.107177734375,
                "left": 734.3712158203125,
                "top": 2775.801513671875,
                "width": 123.407958984375
              }
            ],
            "citation_id": "bdwQSHk",
            "citation_type": "Word",
            "content": "S52.5)",
            "page_height": 5262,
            "page_number": 1,
            "page_width": 3720,
            "segment_type": "Text"
          },
          {
            "bboxes": [
              {
                "height": 994.55126953125,
                "left": 164.0844268798828,
                "top": 3055.027587890625,
                "width": 3395.474365234375
              }
            ],
            "citation_id": "qOOUXsQ",
            "citation_type": "Segment",
            "content": "| Date of Service | Place of Service* | Procedure Code Identify** | Description of Service | Type of Service † | Charges | Days or Units | Diagnosis Code †† |\n| :-------------- | :---------------- | :------------------------ | :--------------------- | :---------------- | :------ | :------------ | :---------------- |\n| 02/15/202       | Outpatient        | 73090                     | X-ray Forearm          | 4                 | $250    | 1             | S52.5             |\n| 02/15/202       | Outpatient        | 24500                     | Closed Treatment, Radius | 2                 | $1200   | 1             | S52.5             |\n| 02/15/202       | Outpatient        | 29125                     | Cast Application       | 1                 | $350    | 1             | S52.5             |\n\n| 39. Physician's Name & Address (include ZIP Code) | 40. Telephone Number | 41. Enter the taxpayer identifying number to be used for 1099 reporting purposes. You are required under authority of law to furnish your taxpayer identifying number. |\n| :------------------------------------------------ | :------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Dr. Jake Blakey, Springfield Orthopedics, 3 Health Ave, Springfield, IL 62705 | ( 217 ) 1527785 | IL-12458                                                                                                                                                          |\n\n| 42. Patient Account Number | 43. Total charge Amount paid Balance due | $ 1800 $ 200 $ 1600 |\n| :------------------------- | :--------------------------------------- | :------------------ |\n| PT-20250215-001            |                                          |                     |\n\n| 44. Physician's or Supplier's Signature | 45. National Provider Identifier | 46. Date |\n| :-------------------------------------- | :------------------------------- | :------- |\n| [Signature image]                       | 502357115                        | 02/16/2025 |\n",
            "page_height": 5262,
            "page_number": 1,
            "page_width": 3720,
            "segment_id": "LSu9eG3",
            "segment_type": "FormRegion"
          },
          {
            "bboxes": [
              {
                "height": 44.467041015625,
                "left": 3064.593505859375,
                "top": 3214.814453125,
                "width": 141.796875
              }
            ],
            "citation_id": "qDvQzGU",
            "citation_type": "Word",
            "content": "S52.5",
            "page_height": 5262,
            "page_number": 1,
            "page_width": 3720,
            "segment_type": "Text"
          }
        ], // .. more icd codes
        // .. more citations
      ],
      // .. more items
    },
    "employee": {
      "address": {
        "city": [
          {
            "bboxes": [
              {
                "height": 1757.04248046875,
                "left": 165.21835327148438,
                "top": 332.1818542480469,
                "width": 3398.235107421875
              }
            ],
            "citation_id": "GLYPlMg",
            "citation_type": "Segment",
            "content": "| TO BE COMPLETED BY EMPLOYEE | | | |\n| :--- | :--- | :--- | :--- |\n| 1. Employer's Name<br>**Technova Solutions Inc.** | 2. Policy/Group Number<br>**A124175** | | |\n| 3. Employee's Aetna ID Number<br>**E451958** | 4. Employee's Name<br>**Anderson, Mary J.** | 5. Employee's Birthdate (MM/DD/YYYY)<br>**03/14/1980** | |\n| 6. ☑ Active ☐ Retired<br>Date of Retirement | 7. Employee's Address (include ZIP Code)<br>**145 E Indian Blvd, Springfield, IL** | ☑ Address is new | 8. Employee's Daytime Telephone Number<br>**(** **215** **) 555-7890** |\n| 9. Patient's Name<br>**John R.** | 10. Patient's Aetna ID Number<br>**P51309** | 11. Patient's Birthdate (MM/DD/YYYY)<br>**06/24/2010** | 12. Patient's Relationship to Employee<br>☐ Self ☐ Spouse ☑ Child ☐ Other |\n| 13. Patient's Address (if different from employee) | | | 14. Patient's Gender<br>☑ Male ☐ Female |\n| 15. Patient's Marital Status<br>☐ Married ☑ Single | 16. Is patient employed?<br>☑ No ☐ Yes | 17. Name & Address of Employer | |\n| 18. Is claim related to an accident?<br>☐ No ☑ Yes If Yes, date **02/12/2025** time **3:30** ☐ am ☑ pm | 19. Is claim related to employment?<br>☑ No ☐ Yes | | |\n| 20. Are any family members expenses covered by another group health plan, group pre-payment plan (Blue Cross- Blue Shield, etc.), no fault auto insurance, Medicare or any federal, state or local government plan?<br>☑ No ☐ Yes | 21. If Yes, list policy or contract holder, policy or contract number(s) and name/address of insurance company or administrator: | | |\n| 22. Member's ID Number | 23. Member's Name | 24. Member's Birthdate (MM/DD/YYYY) | |\n| 25. To all providers of health care:<br>You are authorized to provide Aetna Life Insurance Company or one of its affiliated companies (\"Aetna\"), and any independent claim administrators and consulting health professionals and utilization review organizations with whom Aetna has contracted, information concerning health care advice, treatment or supplies provided the patient (including that relating to mental illness and/or AIDS/ARC/HIV). This information will be used to evaluate claims for benefits. Aetna may provide the employer named above with any benefit calculation used in payment of this claim for the purpose of reviewing the experience and operation of the policy or contract. This authorization is valid for the term of the policy or contract under which a claim has been submitted. I know that I have a right to receive a copy of this authorization upon request and agree that a photographic copy of this authorization is as valid as the original.<br>Patient's or Authorized Person's Signature _Anderson MJ_<br>Date **02/16/2025** | | | |\n| 26. I authorize payment of medical benefits to the physician or supplier of service.<br>Patient's or Authorized Person's Signature _Anderson MJ_<br>Date **02/16/2025** | | | |\n",
            "page_height": 5262,
            "page_number": 1,
            "page_width": 3720,
            "segment_id": "JKcpWlp",
            "segment_type": "FormRegion"
          },
          // .. more citations
        ],
        // .. more items
      },
      // .. more items
    },
    "facility": {
      "address": {
        "city": [
          {
            "bboxes": [
              {
                "height": 356.846435546875,
                "left": 178.343994140625,
                "top": 2652.0048828125,
                "width": 1702.4400634765625
              }
            ],
            "citation_id": "NnSB0Qs",
            "citation_type": "Segment",
            "content": "Springfield 62704 Community IL Springfield, Hospital, Ave, 451 Health 37. Diagnosis or nature of illness or injury (please secondary) indicate primary and Radius (ICD-10 S52.5) Fractured 1. 2. Contusion S50.1) of Forearm (ICD-10 3. 4.",
            "page_height": 5262,
            "page_number": 1,
            "page_width": 3720,
            "segment_id": "B3r1dMj",
            "segment_type": "Text"
          },
          // .. more citations
        ],
        // .. more items
      },
      // .. more items
    },
    // .. more items
  }
  ```

  ```json Metrics expandable theme={"system"}
  {
    "authorization": {
      "assignment_date": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "assignment_of_benefits_signature": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "patient_signature": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "patient_signature_date": {
        "citation_status": "Created",
        "confidence": "High"
      }
    },
    "billing": {
      "amount_paid": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "balance_due": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "total_charge": {
        "citation_status": "Created",
        "confidence": "High"
      }
    },
    "claim_circumstances": {
      "accident_date": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "accident_related": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "accident_time": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "employment_related": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "other_coverage": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "other_insurance_company": {
        "citation_status": "Skipped",
        "confidence": "High"
      },
      "other_policy_holder": {
        "citation_status": "Skipped",
        "confidence": "High"
      },
      "other_policy_number": {
        "citation_status": "Skipped",
        "confidence": "High"
      }
    },
    "diagnosis": {
      "icd_codes": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "primary": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "secondary": {
        "citation_status": "Created",
        "confidence": "High"
      }
    },
    "employee": {
      "address": {
        "city": {
          "citation_status": "Created",
          "confidence": "High"
        },
        // .. more items
      },
      "aetna_id": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "birthdate": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "date_of_retirement": {
        "citation_status": "Skipped",
        "confidence": "High"
      },
      "employer_name": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "employment_status": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "full_name": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "phone": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "policy_group_number": {
        "citation_status": "Created",
        "confidence": "High"
      }
    },
    "facility": {
      "address": {
        "city": {
          "citation_status": "Created",
          "confidence": "High"
        },
        // .. more items
      },
      "admission_date": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "discharge_date": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "name": {
        "citation_status": "Created",
        "confidence": "High"
      }
    },
    "patient": {
      "address": {
        "city": {
          "citation_status": "Created",
          "confidence": "High"
        },
        // .. more items
      },
      "aetna_id": {
        "citation_status": "Created",
        "confidence": "High"
      },
      // .. more items
    },
    "physician": {
      "address": {
        "city": {
          "citation_status": "Created",
          "confidence": "High"
        },
        // .. more items
      },
      "full_name": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "national_provider_identifier": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "patient_account_number": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "phone": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "signature": {
        "citation_status": "Created",
        "confidence": "Low"
      },
      "signature_date": {
        "citation_status": "Created",
        "confidence": "High"
      },
      "taxpayer_id": {
        "citation_status": "Created",
        "confidence": "High"
      }
    },
    "procedures": [
      {
        "charge": {
          "citation_status": "Created",
          "confidence": "High"
        },
        "description": {
          "citation_status": "Created",
          "confidence": "High"
        },
        "diagnosis_code": {
          "citation_status": "Created",
          "confidence": "High"
        },
        "place_of_service": {
          "citation_status": "Created",
          "confidence": "High"
        },
        "procedure_code": {
          "citation_status": "Created",
          "confidence": "High"
        },
        "service_date": {
          "citation_status": "Created",
          "confidence": "Low"
        },
        "type_of_service": {
          "citation_status": "Created",
          "confidence": "High"
        },
        "units": {
          "citation_status": "Created",
          "confidence": "High"
        }
      }
      // .. more procedures
    ]
  }
  ```
</CodeGroup>

## Best Practices

### Schema Design Tips

1. **Use Descriptive Field Names**: Choose clear, unambiguous field names that reflect the actual data being extracted.

2. **Handle Optional Fields Appropriately**: Mark fields as optional when they may not be present in all documents.

3. **Include Field Descriptions**: Use Pydantic's `Field(description="...")` or Zod's `.describe()` to provide context.

4. **Use Appropriate Data Types**: Choose the right types (string, number, boolean, array, date) for each field.

### Extraction Optimization

1. **Custom System Prompts**: Tailor prompts to your document type. See the [system prompt parameter](/api-references/tasks/create-extract-task#body-system-prompt) for details.

2. **Quality Validation**: Use citation trails alongside confidence scores to validate extractions.
