# SEC Company Financials XBRL

> SEC Company Financials XBRL is a paid API for AI agents from api.boscolabs.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-17).

Fetches structured financial statement data (income, balance sheet, cash flow, margins) from SEC XBRL filings (10-K/10-Q) by ticker or CIK, per fiscal year or quarter since 2009.

## Facts

- Endpoint: POST https://api.boscolabs.dev/v1/sec-company-financials?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sec-company-financials-xbrl-38221a2e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rBMVCwvZ0wecvBqBgV3T6

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sec-company-financials-xbrl-38221a2e -d '<json body>'
```

Example prompt: Pull Apple's (ticker AAPL) annual revenue, net income, free cash flow, and operating margin from SEC XBRL filings for the last 5 fiscal years.

## When to prefer this

Use this endpoint when you need structured, machine-readable financial statement data sourced directly from official SEC EDGAR XBRL submissions — ideal for fundamental analysis, equity research automation, financial modeling, or compliance workflows requiring cited, auditable figures. Prefer this over web-scraped or third-party financial data providers when you need official source links per data point, XBRL tag provenance, and precise as-filed values. Best suited for US public companies filing 10-K/10-Q since 2009. Not suited for real-time market prices, non-US companies, or companies not filing in XBRL.

## Known failure modes

- Ticker or CIK not found in SEC EDGAR — empty result, no charge
- Requested metrics not reported in XBRL for that company/period — metrics_found may be lower than requested
- Filing not yet available for the most recent period — older data returned
- Invalid ticker format rejected at input validation
- Network or upstream SEC EDGAR outage — error response, no charge
- Empty result for a company with no XBRL filings (e.g. pre-2009 or non-XBRL filer) — no charge

## How this service works

Data tools for AI agents and analysts: SEC filings, insider trades, company accounts, sanctions, EU law, tenders, contracts. Sourced JSON, pay per result.

## Output

Returns a JSON array of rows, one per company per fiscal year or quarter, each containing the requested financial metrics (e.g. revenue, net income, EPS, margins, cash flow items), fiscal period metadata (fiscal year, period start/end, form type, filing date, accession number), currency, company name, ticker, CIK, a source URL to the original SEC filing, and per-metric XBRL tag provenance. Also includes a charge summary (charged_usd, balance_usd), duration, and any warnings.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ciks": {
   "type": "array",
   "description": "SEC Central Index Keys as digits, leading zeros optional, e.g. [\"320193\"] for Apple"
  },
  "years": {
   "type": "integer",
   "default": 5,
   "maximum": 20,
   "minimum": 1,
   "description": "How many of the latest fiscal years to return per company"
  },
  "period": {
   "enum": [
    "annual",
    "quarterly"
   ],
   "type": "string",
   "default": "annual",
   "description": "\"annual\" = one row per fiscal year (FY)"
  },
  "metrics": {
   "type": "array",
   "items": {
    "enum": [
     "revenue",
     "cost_of_revenue",
     "gross_profit",
     "research_and_development",
     "selling_general_and_administrative",
     "operating_profit",
     "profit_before_tax",
     "net_income",
     "net_income_attributable_to_parent",
     "eps_basic",
     "eps_diluted",
     "weighted_average_shares_basic",
     "weighted_average_shares_diluted",
     "depreciation_amortisation",
     "total_assets",
     "current_assets",
     "cash_and_equivalents",
     "total_liabilities",
     "current_liabilities",
     "noncurrent_liabilities",
     "long_term_debt",
     "total_equity",
     "equity_attributable_to_parent",
     "shares_outstanding",
     "operating_cash_flow",
     "investing_cash_flow",
     "financing_cash_flow",
     "capex",
     "dividends_paid",
     "free_cash_flow",
     "ebitda",
     "gross_margin",
     "operating_margin",
     "net_margin",
     "return_on_equity",
     "equity_ratio",
     "revenue_growth"
    ],
    "type": "string"
   },
   "description": "Only these output fields, e.g. [\"revenue\", \"net_income\", \"free_cash_flow\", \"operating_margin\"]"
  },
  "tickers": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^\\s*[A-Za-z0-9][A-Za-z0-9./-]{0,9}\\s*$"
   },
   "description": "US tickers as listed by the SEC"
  },
  "includeSources": {
   "type": "boolean",
   "default": true,
   "description": "true = each row has `sources`"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "rows": [
   {
    "cik": "0000320193",
    "form": "10-K",
    "capex": 12715000000,
    "filed": "2025-10-31",
    "ticker": "AAPL",
    "filings": {
     "0000320193-25-000079": {
      "url": "https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/0000320193-...",
      "form": "10-K",
      "filed": "2025-10-31"
     }
    },
    "revenue": 416161000000,
    "sources": {
     "...": "one entry per reported metric",
     "revenue": {
      "tag": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "accession": "0000320193-25-000079"
     }
    },
    "currency": "USD",
    "warnings": [],
    "net_income": 112010000000,
    "net_margin": 0.2692,
    "period_end": "2025-09-27",
    "source_url": "https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/0000320193-...",
    "eps_diluted": 7.46,
    "fiscal_year": 2025,
    "company_name": "Apple Inc.",
    "gross_margin": 0.4691,
    "gross_profit": 195201000000,
    "period_start": "2024-09-29",
    "retrieved_at": "2026-11-05T21:38:54+00:00",
    "total_assets": 359241000000,
    "total_equity": 73733000000,
    "fiscal_period": "FY",
    "metrics_found": 29,
    "free_cash_flow": 98767000000,
    "long_term_debt": 78328000000,
    "revenue_growth": 0.0643,
    "schema_version": "1",
    "accession_number": "0000320193-25-000079",
    "operating_margin": 0.3197,
    "operating_profit": 133050000000,
    "operating_cash_flow": 111482000000,
    "cash_and_equivalents": 35934000000
   }
  ],
  "tool": "sec-company-financials",
  "count": 1,
  "message": "",
  "paid_via": "x402",
  "warnings": [],
  "balance_usd": 0,
  "charged_usd": 0.015,
  "duration_seconds": 1.2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sec-company-financials-xbrl-38221a2e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.boscolabs.dev](https://www.zero.xyz/host/api.boscolabs.dev/llms.txt)
