# Finviz Metrics API

Finviz stock metrics for US-listed stocks with company name, index membership, market cap class, valuation, growth, margins and ownership. Pass the US tickers to look up.

**Pricing:** $0.0025 per metric

**Endpoint:** `POST /v1/data/finviz/metrics/run`

**Auth:** `Authorization: Bearer mk_live_...`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tickers` | array | Yes | One or more US stock tickers, e.g. AAPL or BRK-B. Finviz covers US-listed companies only: non-US listings (RELIANCE.NS) and market indices (NIFTY, SENSEX) are refused with a clear error. One request reads them all. |

## Example

`?wait=true` holds the request open until the run finishes (up to 60s) and returns the rows inline: one request, no polling.

```bash
curl -X POST "https://api.mindcase.co/v1/data/finviz/metrics/run?wait=true" \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params":{"tickers":["..."]}}'
```

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/v1/data/finviz/metrics/run",
    params={"wait": "true"},
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {
    "tickers": [
        "..."
    ]
}},
)
rows = resp.json()["data"]
```

## Longer runs

If the run is still going at the 60s ceiling you get back `{ job_id, status: "running" }` instead of rows (same if the result is over 100 rows; those come back `truncated`). Poll with that `job_id`:

```bash
# 1) check status
curl https://api.mindcase.co/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/v1/jobs/JOB_ID/results \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"
```

Full API reference (auth, jobs, balance, SDKs, MCP): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `ticker` | Ticker | text |
| `companyName` | Company Name | text |
| `indexMembership` | Index Membership | text |
| `marketCapClass` | Market Cap Class | text |
| `price` | Price | currency |
| `marketCap` | Market Cap | currency |
| `enterpriseValue` | Enterprise Value | currency |
| `peRatio` | Pe Ratio | number |
| `forwardPeRatio` | Forward Pe Ratio | number |
| `pegRatio` | Peg Ratio | number |
| `priceToSales` | Price To Sales | number |
| `priceToBook` | Price To Book | number |
| `priceToFreeCashFlow` | Price To Free Cash Flow | number |
| `evToEbitda` | Ev To Ebitda | number |
| `epsTtm` | Eps Ttm | currency |
| `epsNextQuarter` | Eps Next Quarter | currency |
| `epsGrowthThisYearPercent` | Eps Growth This Year Percent | number |
| `epsGrowthNextYearPercent` | Eps Growth Next Year Percent | number |
| `salesTtm` | Sales Ttm | currency |
| `netIncomeTtm` | Net Income Ttm | currency |
| `grossMarginPercent` | Gross Margin Percent | number |
| `operatingMarginPercent` | Operating Margin Percent | number |
| `profitMarginPercent` | Profit Margin Percent | number |
| `roePercent` | Roe Percent | number |
| `roaPercent` | Roa Percent | number |
| `roicPercent` | Roic Percent | number |
| `debtToEquity` | Debt To Equity | number |
| `longTermDebtToEquity` | Long Term Debt To Equity | number |
| `currentRatio` | Current Ratio | number |
| `quickRatio` | Quick Ratio | number |
| `dividendYieldPercent` | Dividend Yield Percent | number |
| `payoutRatioPercent` | Payout Ratio Percent | number |
| `analystRecommendation` | Analyst Recommendation | number |
| `targetPrice` | Target Price | currency |
| `beta` | Beta | number |
| `sharesOutstanding` | Shares Outstanding | number |
| `insiderOwnershipPercent` | Insider Ownership Percent | number |
| `institutionalOwnershipPercent` | Institutional Ownership Percent | number |
| `shortFloatPercent` | Short Float Percent | number |
| `employees` | Employees | integer |
| `earningsDate` | Earnings Date | text |
| `ipoDate` | Ipo Date | text |
| `website` | Website | url |
| `description` | Description | text |
| `finvizUrl` | Finviz URL | url |
