# screenCompaniesByMetric

**Identifier:** `sec_screenCompaniesByMetric`

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

Screen all SEC-reporting companies on one financial metric for one calendar period (XBRL frames): e.g. the largest revenues in 2025, companies with over $1B cash at Q2 2026 end, or California companies by R&D spend. Each company contributes the reported value whose fiscal period best matches the calendar period. US GAAP filers only.

## Run it with the CLI

```bash
kirha tools run sec_screenCompaniesByMetric \
  --input '{
    "metric": "revenue",
    "year": 2009
  }'
```

`--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_screenCompaniesByMetric",
  "input": {
    "metric": "revenue",
    "year": 2009
  }
}'
```

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": {
    "limit": {
      "default": 25,
      "maximum": 100,
      "minimum": 1,
      "type": "number"
    },
    "maxValue": {
      "type": "number"
    },
    "metric": {
      "enum": [
        "revenue",
        "grossProfit",
        "operatingIncome",
        "netIncome",
        "epsDiluted",
        "researchAndDevelopment",
        "operatingCashFlow",
        "capitalExpenditure",
        "cashAndEquivalents",
        "totalAssets",
        "totalLiabilities",
        "stockholdersEquity",
        "longTermDebt",
        "sharesOutstanding"
      ],
      "type": "string"
    },
    "minValue": {
      "type": "number"
    },
    "quarter": {
      "description": "Omit for the full year (balance-sheet metrics then use the year-end value)",
      "maximum": 4,
      "minimum": 1,
      "type": "integer"
    },
    "sortOrder": {
      "default": "desc",
      "enum": [
        "desc",
        "asc"
      ],
      "type": "string"
    },
    "state": {
      "description": "US state of the company's business address, e.g. CA",
      "maxLength": 2,
      "minLength": 2,
      "type": "string"
    },
    "year": {
      "maximum": 2030,
      "minimum": 2009,
      "type": "integer"
    }
  },
  "required": [
    "metric",
    "year"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "ciks": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "companies": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "accessionNo": {
            "type": "string"
          },
          "cik": {
            "type": "string"
          },
          "entityName": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "periodEnd": {
            "type": "string"
          },
          "periodStart": {
            "type": "string"
          },
          "ticker": {
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "cik",
          "entityName",
          "value",
          "periodEnd",
          "accessionNo"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "context": {
      "type": "string"
    },
    "metric": {
      "type": "string"
    },
    "period": {
      "description": "XBRL frame: CY2025 = calendar year, CY2025Q2 = quarter, trailing I = instant",
      "type": "string"
    },
    "totalCompanies": {
      "description": "Companies matching the filters",
      "type": "number"
    },
    "unit": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "metric",
    "period",
    "unit",
    "totalCompanies",
    "companies",
    "ciks"
  ],
  "type": "object"
}
```

## Related tools

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

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

-----

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