# SEC EDGAR Financial Ratios API

> SEC EDGAR Financial Ratios API is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-12).

Computes key financial ratios (margins, liquidity, leverage, growth) from SEC EDGAR XBRL data for a given stock ticker or CIK, with source citations and anomaly flags.

## Facts

- Endpoint: GET https://api.agentstools.dev/edgar/ratios?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sec-edgar-financial-ratios-api-41d11cc6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_G6BgG_H6mkaGDgVOneKkh

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-edgar-financial-ratios-api-41d11cc6
```

Example prompt: Pull the key financial ratios for AAPL — margins, liquidity, leverage, and growth — from SEC EDGAR for the last 8 annual periods, and flag any anomalies or restatements.

## When to prefer this

Use this endpoint when you need auditable, source-cited financial ratios derived directly from SEC EDGAR XBRL filings rather than third-party financial data providers. Ideal for fundamental analysis, due diligence, or compliance workflows where provenance of each computed number matters. Prefer this over general financial data APIs when you need restatement detection and anomaly flags alongside ratio history.

## Known failure modes

- Ticker not found in EDGAR — returns error if the ticker is not mapped to a CIK
- CIK not found — invalid or unrecognized CIK returns an error
- Insufficient XBRL data — company may not have enough tagged XBRL periods to compute ratios
- Rate limit or payment failure — x402 payment not processed, returns 402
- periods parameter out of range — must be between 1 and 12
- freq must be 'annual' or 'quarterly' — invalid enum returns validation error

## How this service works

Key financial ratios computed from SEC EDGAR XBRL: margins, liquidity, leverage and growth. Give a ticker or CIK and get ratios over recent periods, each computed number citing the source facts it was derived from, plus restatement flags and simple anomaly flags.

## Output

A structured response containing financial ratios (profit margins, liquidity ratios, leverage ratios, growth metrics) computed from EDGAR XBRL data across recent reporting periods, each ratio citing the underlying XBRL source facts it was derived from, plus boolean restatement flags and anomaly flags per period.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "cik": {
       "type": "string",
       "description": "SEC EDGAR CIK, any zero-padding accepted"
      },
      "freq": {
       "enum": [
        "annual",
        "quarterly"
       ],
       "type": "string",
       "description": "Reporting frequency, default annual"
      },
      "ticker": {
       "type": "string",
       "description": "Stock ticker symbol, e.g. AAPL"
      },
      "periods": {
       "type": "integer",
       "maximum": 12,
       "minimum": 1,
       "description": "Number of recent periods to return, default 8"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sec-edgar-financial-ratios-api-41d11cc6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
