Try the API without a key
Try the demo without a key. Use your own key for full data requests.
curl --fail-with-body 'https://etflayers.com/v1/demo'
{
"comparison": {
"common_count": 3,
"demonstration": true,
"methodology": "nport-common-equity-v1",
"overlap_pct": 60.0
}
}
QQQ / SPY · ETF Holdings Overlap
Integrate with your API key
as_of limits the portfolio date. known_at limits the response to filings whose availability is documented in our archive. For older imports, the first observation may be later than the original publication.
cURL
curl 'https://etflayers.com/en/compare/qqq-vs-spy/sample.json'
curl 'https://etflayers.com/v1/overlap?funds=QQQ,SPY&as_of=2026-06-30' -H 'Authorization: Bearer YOUR_API_KEY'
curl 'https://etflayers.com/v1/overlap/history?funds=QQQ,SPY' -H 'Authorization: Bearer YOUR_API_KEY'
curl -X POST 'https://etflayers.com/v1/exports' -H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Idempotency-Key: my-qqq-spy-export-1' \
-H 'Content-Type: application/json' -d '{"funds":["QQQ","SPY"],"format":"parquet"}'
Python
import os
import requests
api_key = os.environ["ETFLAYERS_API_KEY"]
response = requests.get("https://etflayers.com/v1/overlap",
params={"funds": "SPY,QQQ"}, headers={"Authorization": f"Bearer {api_key}"}, timeout=15)
response.raise_for_status()
print(response.json()["overlap_pct"])
JavaScript (Node.js)
const apiKey = process.env.ETFLAYERS_API_KEY;
const r = await fetch("https://etflayers.com/v1/overlap?funds=SPY,QQQ", {
headers: { Authorization: "Bearer " + apiKey },
});
if (!r.ok) throw new Error("HTTP " + r.status);
console.log((await r.json()).overlap_pct);
Share class IDs
security_id is the ETFLayers ID for a share class. Use it to join fund holdings, comparisons, report CSV and data exports. Different share classes of a company can have different IDs.
Find ETFs holding a shared position in QQQ and SPY
SECURITY_ID=$(curl -fsS 'https://etflayers.com/v1/overlap?funds=QQQ,SPY&limit=1' \
-H "Authorization: Bearer $ETFLAYERS_API_KEY" | jq -er '.positions[0].security_id') && \
curl -fsS "https://etflayers.com/v1/securities/$SECURITY_ID/funds" \
-H "Authorization: Bearer $ETFLAYERS_API_KEY"
Each ETF contributes its latest available portfolio, which may be from a different date. Check report_date.
Webhooks and scheduled exports
On a paid API plan, register an approved HTTPS endpoint to receive signed notices with a stable event ID. Each dataset notice links to the funds, dates and filing versions affected. Check GET /v1/webhooks/deliveries to inspect retries.
Growth and Distribution can schedule CSV or Parquet archives. GET /v1/export-schedule shows the next run and the most recent export, so you can retrieve it even if you missed the notification.
cURL
curl -X PUT 'https://etflayers.com/v1/webhooks' \
-H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' \
-d '{"url":"https://webhooks.example.com/etflayers"}'
curl -X PUT 'https://etflayers.com/v1/export-schedule' \
-H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' \
-d '{"funds":["QQQ","SPY"],"format":"parquet","interval":"week"}'
curl 'https://etflayers.com/v1/export-schedule' -H 'Authorization: Bearer YOUR_API_KEY'