# Use cases of the TickerInside API

6 questions, each with a page: the question, a live example, the shortest working code, the fields to read and the limits. Every block of code below is a file that runs against each night's build of the site that has the files it reads, through the Worker that serves the API, before it is published. Data through 2026-10-16. The reference: https://tickerinside.com/api/

## ETF holdings API

What does a US ETF hold, at what weight, and from which file? Page: https://tickerinside.com/etf-holdings-api/, as Markdown: https://tickerinside.com/etf-holdings-api/index.md

cURL:

```sh
curl -s https://tickerinside.com/api/v1/fund/voo.json
```

Python:

```python
import tickerinside as ti

voo = ti.holdings("VOO")
print(voo.holdings_as_of, voo.source)
for row in voo.data[:5]:
    print(row["ticker"], row["weight_pct"])
```

JavaScript:

```js
const url = "https://tickerinside.com/api/v1/fund/voo.json";
const voo = await (await fetch(url)).json();
console.log(voo.holdings_as_of, voo.source_layer);
const rows = Object.entries(voo.holdings).sort((a, b) => b[1] - a[1]);
for (const [ticker, weight] of rows.slice(0, 5)) console.log(ticker, weight);
```

Google Sheets:

```text
=IMPORTDATA("https://tickerinside.com/api/v1/fund/voo.csv")
```

## ETF overlap API

How much do two ETFs hold in common? Page: https://tickerinside.com/etf-overlap-api/, as Markdown: https://tickerinside.com/etf-overlap-api/index.md

cURL:

```sh
curl -s "https://tickerinside.com/api/v1/overlap?funds=VOO,QQQ"
```

Python:

```python
import tickerinside as ti

pair = ti.compare("VOO", "QQQ")
for fund, date in pair.holdings_as_of.items():
    print(fund, date)
o = pair.data["overlap"]
print(o["by_weight"], o["share_of_a"], o["share_of_b"], o["companies_in_both"])
```

JavaScript:

```js
const url = "https://tickerinside.com/api/v1/overlap?funds=VOO,QQQ";
const pair = await (await fetch(url)).json();
for (const [fund, date] of Object.entries(pair.holdings_as_of)) {
  console.log(fund, date);
}
const o = pair.overlap;
console.log(o.by_weight, o.share_of_a, o.share_of_b, o.companies_in_both);
```

Google Sheets:

```text
=IMPORTDATA("https://tickerinside.com/api/v1/overlap.csv?funds=VOO,QQQ")
```

MCP tool, over HTTP:

```sh
curl -s https://tickerinside.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params":
      {"name": "compare_etfs", "arguments": {"a": "VOO", "b": "QQQ"}}}'
```

## Which ETFs hold a stock, by API

Which ETFs hold a given stock, and at what weight? Page: https://tickerinside.com/which-etfs-hold-a-stock-api/, as Markdown: https://tickerinside.com/which-etfs-hold-a-stock-api/index.md

cURL:

```sh
curl -s https://tickerinside.com/api/v1/sec/nvda.json
```

Python:

```python
import tickerinside as ti

nvda = ti.holders("NVDA")
print(nvda.data["counts"]["issuer"], nvda.data["counts"]["sec_nport"])
for row in nvda.data["issuer"][:5]:
    print(row["fund"], row["weight_pct"], row["holdings_as_of"])
```

JavaScript:

```js
const url = "https://tickerinside.com/api/v1/sec/nvda.json";
const nvda = await (await fetch(url)).json();
console.log(nvda.held_by, nvda.held_by_sec_nport);
for (const [fund, weight, date] of nvda.holders.slice(0, 5)) {
  console.log(fund, weight, date);
}
```

Google Sheets:

```text
=IMPORTDATA("https://tickerinside.com/api/v1/sec/nvda.csv")
```

## ETF holdings history API

How did an ETF's holdings change from one file to the next? Page: https://tickerinside.com/etf-holdings-history-api/, as Markdown: https://tickerinside.com/etf-holdings-history-api/index.md

cURL:

```sh
curl -s https://tickerinside.com/api/v1/history/spy.json
```

Python:

```python
import tickerinside as ti

spy = ti.history("SPY").data
print(spy["first"], spy["last"], spy["file_dates"])
for step in spy["changes"][-5:]:
    for ticker, weight in step.get("entered", []):
        print(step["date"], "entered", ticker, weight)
    for ticker, weight in step.get("exited", []):
        print(step["date"], "exited", ticker, weight)
```

JavaScript:

```js
const url = "https://tickerinside.com/api/v1/history/spy.json";
const spy = await (await fetch(url)).json();
console.log(spy.first, spy.last, spy.file_dates);
for (const step of spy.changes.slice(-5)) {
  for (const [t, w] of step.entered ?? []) {
    console.log(step.date, "entered", t, w);
  }
  for (const [t, w] of step.exited ?? []) {
    console.log(step.date, "exited", t, w);
  }
}
```

## Portfolio exposure API

What does a portfolio of ETFs hold underneath, and where does its risk come from? Page: https://tickerinside.com/portfolio-exposure-api/, as Markdown: https://tickerinside.com/portfolio-exposure-api/index.md

cURL:

```sh
curl -s "https://tickerinside.com/api/v1/lookthrough?portfolio=VOO:60,QQQ:40&top=5"
```

Python:

```python
import tickerinside as ti

mix = ti.look_through({"VOO": 60, "QQQ": 40}, top=5)
for fund, date in mix.holdings_as_of.items():
    print(fund, date)
print(mix.data["distinct_companies"], mix.data["top_10_weight_pct"])
for company in mix.data["companies"]:
    print(company["ticker"], company["weight_pct"])
```

JavaScript:

```js
const url = "https://tickerinside.com/api/v1/lookthrough"
  + "?portfolio=VOO:60,QQQ:40&top=5";
const mix = await (await fetch(url)).json();
for (const [fund, date] of Object.entries(mix.holdings_as_of)) {
  console.log(fund, date);
}
console.log(mix.distinct_companies, mix.top_10_weight_pct);
for (const c of mix.companies) console.log(c.ticker, c.weight_pct);
```

Google Sheets:

```text
=IMPORTDATA("https://tickerinside.com/api/v1/lookthrough.csv?portfolio=VOO:60,QQQ:40")
```

MCP tool, over HTTP:

```sh
curl -s https://tickerinside.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params":
      {"name": "get_etf_portfolio_risk", "arguments": {"positions": [
        {"ticker": "VOO", "amount": 60}, {"ticker": "QQQ", "amount": 40}]}}}'
```

## ETF screener API

Which ETFs hold a stock at a given weight, under a given cost? Page: https://tickerinside.com/etf-screener-api/, as Markdown: https://tickerinside.com/etf-screener-api/index.md

cURL:

```sh
curl -s "https://tickerinside.com/api/v1/screen?holds=NVDA&min_weight=10&expense_ratio_max=0.4&limit=5"
```

Python (standard library):

```python
import json
from urllib.request import urlopen

url = ("https://tickerinside.com/api/v1/screen"
       "?holds=NVDA&min_weight=10&expense_ratio_max=0.4&limit=5")
screen = json.load(urlopen(url))
print(screen["total"])
for f in screen["funds"]:
    print(f["ticker"], f["weight_pct"], f["holdings_as_of"], f["expense_ratio"])
```

JavaScript:

```js
const url = "https://tickerinside.com/api/v1/screen"
  + "?holds=NVDA&min_weight=10&expense_ratio_max=0.4&limit=5";
const screen = await (await fetch(url)).json();
console.log(screen.total);
for (const f of screen.funds) {
  console.log(f.ticker, f.weight_pct, f.holdings_as_of, f.expense_ratio);
}
```

Google Sheets:

```text
=IMPORTDATA("https://tickerinside.com/api/v1/screen.csv?holds=NVDA&min_weight=10&expense_ratio_max=0.4")
```
