Skip to main content
GET
/
index-funds
Get ETF / index-fund holdings
curl --request GET \
  --url https://api.financialdatasets.ai/index-funds \
  --header 'X-API-KEY: <api-key>'
{
  "ticker": "<string>",
  "fund": {
    "name": "<string>",
    "cik": "<string>",
    "asset_class": "<string>",
    "as_of": "2023-12-25",
    "filing_date": "2023-12-25",
    "source": "<string>",
    "total_net_assets": 123,
    "total_holdings": 123,
    "holdings_resolved": 123,
    "returned": 123,
    "offset": 123
  },
  "holdings": [
    {
      "ticker": "<string>",
      "name": "<string>",
      "cusip": "<string>",
      "isin": "<string>",
      "weight": 123,
      "market_value": 123,
      "shares": 123,
      "asset_class": "<string>",
      "resolution_status": "<string>"
    }
  ]
}

Overview

Give us a fund ticker, get its full list of holdings and each position’s percent of net assets. Constituents are returned sorted by weight descending, with a fund header that carries the as-of period and coverage counts. Use this to answer “what’s in SPY, and at what weight?” for index replication, exposure analysis, and overlap checks. To get started, please create an account and grab your API key at financialdatasets.ai. You will use the API key to authenticate your API requests.

The “latest” definition

Without an as_of filter, this endpoint returns the fund’s most recent filing. To reconstruct a historical composition, pass as_of=YYYY-MM-DD and the response is the composition in effect on or before that date.

All holdings, labeled

Every position is returned, including bonds, derivatives, and cash, each labeled with an asset_class (equity, bond, or other) and a resolution_status. Identifiers are always present; ticker is null when a security has not been resolved to a ticker. To narrow the list, pass asset_class=equity or asset_class=bond.

Find available tickers

To discover which funds are available, hit the helper endpoint:
Tickers
import requests

# free endpoint, no API key required
url = 'https://api.financialdatasets.ai/index-funds/tickers/'
response = requests.get(url)

tickers = response.json().get('tickers')
print(f'{len(tickers)} funds available')
This endpoint is free and does not require an API key.

Filtering the Data

ticker is required. Optional filters:
  • as_of — the composition in effect on/before this date (YYYY-MM-DD). Defaults to the latest filing.
  • asset_classequity or bond. Defaults to all holdings.
By default, limit is 50 (max 1000). Use offset to page through a fund’s constituents.

Examples

import requests

# add your API key to the headers
headers = {
    "X-API-KEY": "your_api_key_here"
}

# set your query params
ticker = 'SPY'              # fund ticker
limit = 50                  # number of holdings to return

# create the URL
url = (
    f'https://api.financialdatasets.ai/index-funds/'
    f'?ticker={ticker}'
    f'&limit={limit}'
)

# make API request
response = requests.get(url, headers=headers)

# parse holdings from the response
holdings = response.json().get('holdings')

Authorizations

X-API-KEY
string
header
required

API key for authentication.

Query Parameters

ticker
string

The fund's ticker symbol (e.g., SPY). Returns that fund's holdings. Mutually exclusive with holding.

holding
string

A held security's ticker symbol (e.g., AAPL). Returns the funds whose latest filing holds it. Mutually exclusive with ticker.

as_of
string<date>

Only valid with ticker. Returns the fund composition in effect on or before this date (YYYY-MM-DD). Without it, the fund's latest filing is returned.

asset_class
enum<string>

Only valid with ticker. Filter constituents by instrument type: equity or bond. Omit for all holdings.

Available options:
equity,
bond
limit
integer
default:50

The maximum number of rows to return (default: 50, max: 1000).

Required range: x <= 1000
offset
integer
default:0

The number of rows to skip, for pagination (default: 0).

Response

Index fund holdings response. The shape depends on the query direction: ticker returns a fund header + constituents; holding returns a security header + funds.

Forward response (?ticker=...): a fund header plus its constituents, sorted by weight descending.

ticker
string

The fund ticker echoed back from the request.

fund
object

Fund header: identity, the as-of period, and coverage counts for the full fund (not the returned page).

holdings
object[]