# Stock Analysis API

> Stock Analysis returns company financials, stock statistics, ETF holdings, and IPO data as a workflow and API.

Stock Analysis reads annual or quarterly company statements using a company name or ticker, fiscal period, and statement type. Get key statistics reads stock valuation ratios and company figures by company name or ticker; figures include an update date. Get etf holdings reads ETF holdings and fund details by ETF name or ticker; List recent ipos reads US IPOs by year.

- Page: https://fous.com/workflows/stock-analysis
- Handle: `@stock-analysis`
- Category: [Finance](https://fous.com/workflows/category/finance)
- Source website: https://stockanalysis.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Stock Analysis.

## Methods

### Get etf holdings

Operation `get_etf_holdings`, version 1. 1 credit per call.

Get an ETF’s free holdings, weight, shares, expense ratio, total holdings, dated holdings list and exact assets under management when shown. Stock Analysis generally shows only the top 25 holdings free; assets may be unavailable as a full dollar figure for some funds.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `etf` | string | yes | `"VOO"` | ETF name or ticker, for example Vanguard S&P 500 ETF or VOO. |
| `max_results` | integer | no | `10` | Maximum holdings to return, for example 10; never more than the free list. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "etf"
  ],
  "properties": {
    "etf": {
      "type": "string",
      "description": "ETF name or ticker, for example Vanguard S&P 500 ETF or VOO.",
      "examples": [
        "VOO",
        "Vanguard S&P 500 ETF",
        "BND"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 25,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum holdings to return, for example 10; never more than the free list.",
      "x-fous-developer": true,
      "examples": [
        10,
        5
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "etf": "VOO"
    },
    {
      "etf": "Vanguard S&P 500 ETF",
      "max_results": 10
    },
    {
      "etf": "BND",
      "max_results": 5
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `ticker` | string | `"VOO"` | ETF ticker. |
| `etf_name` | string | `"Vanguard S&P 500 ETF"` | ETF name. |
| `holdings` | array |  | Largest free holdings first. |
| `holdings[].name` | string | `"NVIDIA Corporation"` | Company or asset name. |
| `holdings[].rank` | integer | `1` | Position by weight. |
| `holdings[].ticker` | string or null | `"NVDA"` | Holding ticker, when shown. |
| `holdings[].page_url` | string or null | `"https://stockanalysis.com/stocks/nvda/"` | Stock Analysis page for this holding, when linked. |
| `holdings[].shares_held` | integer or null | `643435730` | Number of shares held, when shown. |
| `holdings[].weight_percent` | number | `8.08` | Share of the fund, in percent. |
| `page_url` | string | `"https://stockanalysis.com/etf/voo/holdings/"` | Stock Analysis ETF holdings page. |
| `holdings_date` | string | `"2026-08-31"` | Date the listed holdings were reported. |
| `number_of_holdings` | integer | `516` | Total number of holdings in the ETF. |
| `expense_ratio_percent` | number or null | `0.03` | Annual expense ratio in percent, when shown. |
| `assets_under_management_usd` | integer or null | `1041349610639` | Exact assets under management in USD, when shown. |

**Example input**

```json
{
  "etf": "VOO"
}
```

**Example output**

```json
{
  "ticker": "VOO",
  "etf_name": "Vanguard S&P 500 ETF",
  "holdings": [
    {
      "name": "NVIDIA Corporation",
      "rank": 1,
      "ticker": "NVDA",
      "page_url": "https://stockanalysis.com/stocks/nvda/",
      "shares_held": 643435730,
      "weight_percent": 8.08
    },
    {
      "name": "Apple Inc.",
      "rank": 2,
      "ticker": "AAPL",
      "page_url": "https://stockanalysis.com/stocks/aapl/",
      "shares_held": 390202069,
      "weight_percent": 7.03
    },
    {
      "name": "Microsoft Corporation",
      "rank": 3,
      "ticker": "MSFT",
      "page_url": "https://stockanalysis.com/stocks/msft/",
      "shares_held": 197352378,
      "weight_percent": 5.7
    }
  ],
  "page_url": "https://stockanalysis.com/etf/voo/holdings/",
  "holdings_date": "2026-08-31",
  "number_of_holdings": 516,
  "expense_ratio_percent": 0.03,
  "assets_under_management_usd": 1041349610639
}
```

### Get financial statements

Operation `get_financial_statements`, version 1. 1 credit per call.

Get a company’s annual or quarterly income statement, balance sheet, or cash flow statement from public Stock Analysis pages. Returns the periods visible for free; annual results exclude the separate trailing-twelve-month column.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `period` | string | no | `"quarterly"` | Fiscal period to read, for example quarterly. |
| `company` | string | yes | `"AAPL"` | Company name or stock ticker, for example Microsoft or MSFT. |
| `statement` | string | no | `"income_statement"` | Financial statement to read, for example balance_sheet. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "company"
  ],
  "properties": {
    "period": {
      "enum": [
        "annual",
        "quarterly"
      ],
      "type": "string",
      "default": "annual",
      "description": "Fiscal period to read, for example quarterly.",
      "examples": [
        "quarterly",
        "annual"
      ]
    },
    "company": {
      "type": "string",
      "description": "Company name or stock ticker, for example Microsoft or MSFT.",
      "examples": [
        "AAPL",
        "Microsoft",
        "Apple"
      ]
    },
    "statement": {
      "enum": [
        "income_statement",
        "balance_sheet",
        "cash_flow"
      ],
      "type": "string",
      "default": "income_statement",
      "description": "Financial statement to read, for example balance_sheet.",
      "examples": [
        "income_statement",
        "balance_sheet",
        "cash_flow"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "period": "quarterly",
      "company": "AAPL",
      "statement": "income_statement"
    },
    {
      "company": "Microsoft"
    },
    {
      "period": "annual",
      "company": "Apple",
      "statement": "balance_sheet"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `rows` | array |  | Available free fiscal periods, newest first. Each row contains the requested statement’s fields. |
| `rows[].cash` | number or null | `35934000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].revenue` | number or null | `109417000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].page_url` | string | `"https://stockanalysis.com/stocks/aapl/financials/income-statement/?p=quarterly"` | Link to the public statement page. |
| `rows[].net_income` | number or null | `29789000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].total_debt` | number or null | `112377000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].diluted_eps` | number or null | `2.02` | Diluted earnings per share in the stated currency. |
| `rows[].gross_profit` | number or null | `54770000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].period_label` | string | `"Q3 2026"` | Fiscal year or quarter, such as FY 2025 or Q2 2026. |
| `rows[].total_assets` | number or null | `359241000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].dividends_paid` | number or null | `-6758000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].free_cash_flow` | number or null | `19639000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].net_margin_pct` | number or null | `27.22` | Percentage points, or null when not shown. |
| `rows[].period_end_date` | string | `"2026-06-27"` | Last day of the fiscal period. |
| `rows[].gross_margin_pct` | number or null | `50.06` | Percentage points, or null when not shown. |
| `rows[].operating_income` | number or null | `35695000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].total_liabilities` | number or null | `285508000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].revenue_growth_pct` | number or null | `16.36` | Percentage points, or null when not shown. |
| `rows[].operating_cash_flow` | number or null | `55441000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].shareholders_equity` | number or null | `73733000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].capital_expenditures` | number or null | `-35802000000` | Full amount in the stated currency, or null when not shown. |
| `rows[].operating_margin_pct` | number or null | `32.62` | Percentage points, or null when not shown. |
| `ticker` | string | `"AAPL"` | Stock ticker. |
| `company` | string | `"Apple Inc."` | Company name. |
| `currency` | string | `"USD"` | Three-letter currency code for statement values. |

**Example input**

```json
{
  "period": "quarterly",
  "company": "AAPL",
  "statement": "income_statement"
}
```

**Example output**

```json
{
  "rows": [
    {
      "revenue": 109417000000,
      "page_url": "https://stockanalysis.com/stocks/aapl/financials/income-statement/?p=quarterly",
      "net_income": 29789000000,
      "diluted_eps": 2.02,
      "gross_profit": 54770000000,
      "period_label": "Q3 2026",
      "net_margin_pct": 27.22,
      "period_end_date": "2026-06-27",
      "gross_margin_pct": 50.06,
      "operating_income": 35695000000,
      "revenue_growth_pct": 16.36,
      "operating_margin_pct": 32.62
    },
    {
      "revenue": 111184000000,
      "page_url": "https://stockanalysis.com/stocks/aapl/financials/income-statement/?p=quarterly",
      "net_income": 29578000000,
      "diluted_eps": 2.01,
      "gross_profit": 54781000000,
      "period_label": "Q2 2026",
      "net_margin_pct": 26.6,
      "period_end_date": "2026-03-28",
      "gross_margin_pct": 49.27,
      "operating_income": 35885000000,
      "revenue_growth_pct": 16.59,
      "operating_margin_pct": 32.27
    },
    {
      "revenue": 143756000000,
      "page_url": "https://stockanalysis.com/stocks/aapl/financials/income-statement/?p=quarterly",
      "net_income": 42097000000,
      "diluted_eps": 2.84,
      "gross_profit": 69231000000,
      "period_label": "Q1 2026",
      "net_margin_pct": 29.28,
      "period_end_date": "2025-12-27",
      "gross_margin_pct": 48.16,
      "operating_income": 50852000000,
      "revenue_growth_pct": 15.65,
      "operating_margin_pct": 35.37
    }
  ],
  "ticker": "AAPL",
  "company": "Apple Inc.",
  "currency": "USD"
}
```

### Get key statistics

Operation `get_key_statistics`, version 1. 1 credit per call.

Get current stock valuation ratios and company statistics by company name or ticker. Figures reflect the update date shown by Stock Analysis; unavailable figures are null.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `company` | string | yes | `"Nvidia"` | Company name or stock ticker, for example Nvidia or NVDA. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "company"
  ],
  "properties": {
    "company": {
      "type": "string",
      "description": "Company name or stock ticker, for example Nvidia or NVDA.",
      "examples": [
        "Nvidia",
        "NVDA",
        "Tesla"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "company": "Nvidia"
    },
    {
      "company": "NVDA"
    },
    {
      "company": "Tesla"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `beta` | number or null | `2.217` | Five-year stock beta. |
| `price` | number or null | `228.86` | Stock price in the stated currency. |
| `ticker` | string | `"NVDA"` | Stock ticker. |
| `company` | string | `"NVIDIA Corporation"` | Company name. |
| `currency` | string | `"USD"` | Currency code of prices and company values. |
| `exchange` | string | `"NASDAQ"` | Stock exchange. |
| `pe_ratio` | number or null | `28.939` | Trailing price-to-earnings ratio. |
| `employees` | number or null | `42000` | Employee count. |
| `as_of_date` | string | `"2026-09-29"` | Date the figures were last updated, YYYY-MM-DD. |
| `market_cap` | number or null | `5526282420000` | Market capitalization in full currency units. |
| `ev_to_ebitda` | number or null | `27.34` | Enterprise value to EBITDA ratio. |
| `price_to_book` | number or null | `24.134` | Price-to-book ratio. |
| `price_to_sales` | number or null | `18.24` | Price-to-sales ratio. |
| `enterprise_value` | number or null | `5502673420000` | Enterprise value in full currency units. |
| `forward_pe_ratio` | number or null | `18.995` | Forward price-to-earnings ratio. |
| `shares_outstanding` | number or null | `24147000000` | Number of shares outstanding. |
| `stock_analysis_link` | string | `"https://stockanalysis.com/stocks/nvda/statistics/"` | Stock Analysis statistics page link. |
| `dividend_yield_percent` | number or null | `0.437` | Annual dividend yield as a percent, null when none. |

**Example input**

```json
{
  "company": "Nvidia"
}
```

**Example output**

```json
{
  "beta": 2.217,
  "price": 228.86,
  "ticker": "NVDA",
  "company": "NVIDIA Corporation",
  "currency": "USD",
  "exchange": "NASDAQ",
  "pe_ratio": 28.939,
  "employees": 42000,
  "as_of_date": "2026-09-29",
  "market_cap": 5526282420000,
  "ev_to_ebitda": 27.34,
  "price_to_book": 24.134,
  "price_to_sales": 18.24,
  "enterprise_value": 5502673420000,
  "forward_pe_ratio": 18.995,
  "shares_outstanding": 24147000000,
  "stock_analysis_link": "https://stockanalysis.com/stocks/nvda/statistics/",
  "dividend_yield_percent": 0.437
}
```

### List recent ipos

Operation `list_recent_ipos`, version 1. 1 credit per call.

List US IPOs from a chosen year, newest first, with IPO price, current price, and return since IPO. Prices and returns may be missing; coverage begins in 2019.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `year` | integer | no | `2025` | IPO listing year, such as 2025. Defaults to this year. |
| `max_results` | integer | no | `5` | Maximum number of IPOs to return, for example 50. |

**Input schema**

```json
{
  "type": "object",
  "properties": {
    "year": {
      "type": "integer",
      "minimum": 1,
      "description": "IPO listing year, such as 2025. Defaults to this year.",
      "examples": [
        2025,
        2027,
        2021
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 50,
      "maximum": 500,
      "minimum": 1,
      "description": "Maximum number of IPOs to return, for example 50.",
      "x-fous-developer": true,
      "examples": [
        5,
        10,
        500
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "max_results": 5
    },
    {
      "year": 2025,
      "max_results": 5
    },
    {
      "year": 2027,
      "max_results": 10
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `ipos` | array |  | US IPOs sorted newest first. |
| `ipos[].ticker` | string | `"ADRX"` |  |
| `ipos[].company` | string | `"ADARx Pharmaceuticals, Inc."` |  |
| `ipos[].ipo_date` | string | `"2026-09-25"` |  |
| `ipos[].page_link` | string | `"https://stockanalysis.com/stocks/adrx/"` |  |
| `ipos[].ipo_price_usd` | number or null | `17` |  |
| `ipos[].current_price_usd` | number or null | `20.09` |  |
| `ipos[].return_since_ipo_percent` | number or null | `18.18` |  |

**Example input**

```json
{
  "max_results": 5
}
```

**Example output**

```json
{
  "ipos": [
    {
      "ticker": "ADRX",
      "company": "ADARx Pharmaceuticals, Inc.",
      "ipo_date": "2026-09-25",
      "page_link": "https://stockanalysis.com/stocks/adrx/",
      "ipo_price_usd": 17,
      "current_price_usd": 20.09,
      "return_since_ipo_percent": 18.18
    },
    {
      "ticker": "BRRK",
      "company": "Bluerock Acquisition Corp. II",
      "ipo_date": "2026-09-25",
      "page_link": "https://stockanalysis.com/stocks/brrk/",
      "ipo_price_usd": 10,
      "current_price_usd": 9.99,
      "return_since_ipo_percent": null
    },
    {
      "ticker": "LOVI",
      "company": "Live Oak Acquisition Corp. VI",
      "ipo_date": "2026-09-23",
      "page_link": "https://stockanalysis.com/stocks/lovi/",
      "ipo_price_usd": 10,
      "current_price_usd": 10.01,
      "return_since_ipo_percent": 0.1
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@stock-analysis",
  "visibility": "public",
  "operation": "get_etf_holdings",
  "version": 1,
  "input": {
    "etf": "VOO"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@stock-analysis\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_etf_holdings\",\n  \"version\": 1,\n  \"input\": {\n    \"etf\": \"VOO\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@stock-analysis",
  "visibility": "public",
  "operation": "get_etf_holdings",
  "version": 1,
  "input": {
    "etf": "VOO"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@stock-analysis","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Compare company revenue and cash flow across fiscal periods.
- Review valuation ratios and company statistics for a stock.
- Examine an ETF’s largest holdings, weights, and expense ratio.
- Track US IPO prices and returns by listing year.

## FAQ

### Is Fous affiliated with Stock Analysis?

No. Fous is not affiliated with Stock Analysis. This workflow reads the public stockanalysis.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Stock Analysis account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from stockanalysis.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What were a company’s recent revenue and net income?

Get financial statements returns income statement periods, including revenue and net income, for a company name or ticker.

### What are a stock’s valuation ratios and market capitalization?

Get key statistics returns valuation ratios and market capitalization for a company name or ticker.

### Which companies are among an ETF’s largest holdings?

Get etf holdings returns the largest free holdings first, with their weights when shown.

## Related

- [Yahoo Finance API](https://fous.com/workflows/yahoo-finance.md): Yahoo Finance provides quotes, movers, company financials, analyst ratings, earnings, news, and up to 5,000 price rows with adjusted returns; prices may be delayed.
- [Google Finance API](https://fous.com/workflows/google-finance.md): Google Finance returns possibly delayed prices and figures, indexes, up to four movers timed by oldest quote, currency conversions, and up to five financial periods.
- [Nasdaq API](https://fous.com/workflows/nasdaq.md): Nasdaq provides market activity, scheduled earnings by date with fiscal quarter-end month, monthly US IPO listings, and dated ex-dividend entries; dividend histories cover Nasdaq-listed stocks only.
- [Finviz API](https://fous.com/workflows/finviz.md): Finviz provides delayed US stock snapshots, screening by company and trading criteria, and up to 200 recent public executive and director Form 4 trades.
- [SEC EDGAR API](https://fous.com/workflows/sec-edgar.md): SEC EDGAR provides filings, annual and quarterly financials, exact-phrase matches, up to 200 insider trades, and quarterly 13F manager holdings; older filings appear when available.
- [CompaniesMarketCap API](https://fous.com/workflows/companiesmarketcap.md): CompaniesMarketCap ranks public companies worldwide or by country and industry across size and financial measures, and provides company figures with market-cap history for completed years.
- [MSN Money API](https://fous.com/workflows/msn-money.md): MSN Money provides stock quotes, key facts, financial news, and market data, including current market movers; quotes and prices may be delayed.
- [Macrotrends API](https://fous.com/workflows/macrotrends.md): Macrotrends provides long-term financial and economic charts, company metric histories, and yearly commodity and index prices; current-year prices may be incomplete.
- [All Finance workflows](https://fous.com/workflows/category/finance)
