# getCompanyFinancials

**Identifier:** `sec_getCompanyFinancials`

**Provider:** [SEC](https://kirha.com/providers/sec.md)

Get a public company's reported financial metrics over time from its XBRL filings (10-K/10-Q/20-F): revenue, net income, cash, assets, shares outstanding and more, annual or quarterly, each value tied to the accession number of the filing that reported it. Values are as reported (latest restatement wins). Use screenCompaniesByMetric to compare many companies on one metric.

## Run it with the CLI

```bash
kirha tools run sec_getCompanyFinancials \
  --input '{}'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "sec_getCompanyFinancials",
  "input": {}
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "cik": {
      "description": "SEC CIK, e.g. 320193. From getCompanyCik or any SEC tool output",
      "type": "string"
    },
    "companyName": {
      "description": "Used only when cik and ticker are missing; matches any EDGAR filer incl. private companies and funds",
      "type": "string"
    },
    "customConcepts": {
      "description": "Any XBRL concept as taxonomy:Tag, e.g. us-gaap:InventoryNet, dei:EntityPublicFloat",
      "items": {
        "pattern": "^[a-z-]+:[A-Za-z0-9]+$",
        "type": "string"
      },
      "maxItems": 5,
      "type": "array"
    },
    "metrics": {
      "description": "Defaults to revenue, netIncome, operatingIncome, cashAndEquivalents, totalAssets",
      "items": {
        "enum": [
          "revenue",
          "grossProfit",
          "operatingIncome",
          "netIncome",
          "epsDiluted",
          "researchAndDevelopment",
          "operatingCashFlow",
          "capitalExpenditure",
          "cashAndEquivalents",
          "totalAssets",
          "totalLiabilities",
          "stockholdersEquity",
          "longTermDebt",
          "sharesOutstanding"
        ],
        "type": "string"
      },
      "minItems": 1,
      "type": "array"
    },
    "periodType": {
      "default": "annual",
      "enum": [
        "annual",
        "quarterly"
      ],
      "type": "string"
    },
    "periods": {
      "default": 8,
      "description": "Most recent periods per metric",
      "maximum": 20,
      "minimum": 1,
      "type": "number"
    },
    "ticker": {
      "description": "e.g. AAPL",
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "cik": {
      "type": "string"
    },
    "context": {
      "type": "string"
    },
    "entityName": {
      "type": "string"
    },
    "metrics": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "concepts": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "metric": {
            "type": "string"
          },
          "points": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "accessionNo": {
                  "type": "string"
                },
                "derived": {
                  "description": "Fiscal Q4 computed as annual minus nine-month year-to-date",
                  "type": "boolean"
                },
                "filedAt": {
                  "type": "string"
                },
                "form": {
                  "type": "string"
                },
                "periodEnd": {
                  "type": "string"
                },
                "periodStart": {
                  "type": "string"
                },
                "value": {
                  "type": "number"
                }
              },
              "required": [
                "periodEnd",
                "value",
                "form",
                "accessionNo",
                "filedAt"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "unit": {
            "type": "string"
          }
        },
        "required": [
          "metric",
          "concepts",
          "unit",
          "points"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "metricsNotReported": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "ticker": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "cik",
    "entityName",
    "metrics",
    "metricsNotReported"
  ],
  "type": "object"
}
```

## Related tools

Other SEC tools that this tool refers to, or that refer to it.

- [`screenCompaniesByMetric`](https://kirha.com/providers/sec/screenCompaniesByMetric.md)
- [`getCompanyCik`](https://kirha.com/providers/sec/getCompanyCik.md)

-----

[All SEC tools](https://kirha.com/providers/sec.md) · [< Back to tools list](https://kirha.com/tools.md)