# SEC Company Financials (XBRL) (`sec.financials`)

Reported financial values of a US-listed company from its SEC filings: revenue, net income, assets or any XBRL concept, by period.

- **Route:** `POST /v1/run/sec.financials`
- **Price:** $0.002 per request ($2.00 per 1,000) · `cost_usd` on every response
- **Source:** SEC EDGAR APIs (`sec`) · failover: no
- **Measured latency:** p50 1040 ms · p95 1040 ms · p99 1040 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `ticker` | string | no |  | Stock ticker |
| `cik` | integer | no | 0 | SEC CIK number, instead of ticker (0 = use ticker) |
| `concept` | string | no | "NetIncomeLoss" | XBRL concept, e.g. Revenues, NetIncomeLoss, Assets, EarningsPerShareDiluted |
| `taxonomy` | string | no | "us-gaap" | XBRL taxonomy |
| `form` | string | no | "10-K" | Filing type |
| `limit` | integer | no | 10 | Periods to return |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `company` | Company name. |
| `label` | Concept label. |
| `unit` | Unit of the values. |
| `values` | period_start, period_end, value, fiscal_year, form, filed; newest first. |
| `count` | Periods returned. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/sec.financials \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ticker":"AAPL","concept":"NetIncomeLoss","form":"10-K","limit":5}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('sec.financials', {'ticker': 'AAPL', 'concept': 'NetIncomeLoss', 'form': '10-K', 'limit': 5})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run sec.financials '{"ticker":"AAPL","concept":"NetIncomeLoss","form":"10-K","limit":5}'
```

Quote first (free, validates input): `POST /v1/quote/sec.financials` with the same body.
