?>
ESC to close

ETF & Mutual Fund Comparison API

Maintained by Piyush Arora

Last updated:

Compare two to six ETFs or mutual funds across every metric on file — fees, returns, flows, concentration, sector and country exposure, look-through valuation and tracking — in a single call. The endpoint does the part a caller cannot do for itself: it works out which of the 99 comparable metrics actually differ at the precision a reader would see, names which way is better where that is a fact rather than an opinion, and tells you outright when two tickers are the same portfolio in different wrappers. The API is free to use.

Use this endpoint to:

Answer "VOO vs VTI" Surface Only What Differs Detect Share Classes Of One Fund
GET https://data.businessquant.com/funds/compare?tickers={tickers}&api_key={api_key}

Related endpoints: Find candidates to compare with the ETF & Mutual Fund Screener API. For one fund in depth, see the Fund Overview, Fund Holdings, Portfolio Exposure, Fund Flows and Fund Risk Factors APIs. To compare positions rather than metrics, pull both portfolios from Fund Holdings. New here? Start at the API Overview.

1. Request Parameters

Two parameters, one of them optional. A comparison is a small, bounded request by design.

ParameterDescription
api_key
Required
Your unique API key for authentication.
tickers
Required Identifier
Two to six comma-separated fund or ETF tickers. Duplicates are collapsed before the count is checked, so VOO,VOO is one ticker and returns a 400. Order is preserved: the columns come back in the order you asked for them.
Example: tickers=VOO,SPY,IVV
include_metrics
Optional
true also embeds the flat metric catalogue in metadata.metrics. You rarely need it here — metadata.groups already carries the label, unit, datatype and description of every metric in the comparison.
Example cURL Request
curl -X GET "https://data.businessquant.com/funds/compare?tickers=VOO,SPY,IVV&api_key=YOUR_API_KEY"
Sample Response (VOO vs SPY vs IVV, abridged)
{
    "metadata": {
        "endpoint": "/funds/compare",
        "grain": "share class ticker",
        "requested": [
            "VOO",
            "SPY",
            "IVV"
        ],
        "resolved": [
            "VOO",
            "SPY",
            "IVV"
        ],
        "missing": [],
        "count": 3,
        "max_compare": 6,
        "same_portfolio": false,
        "series_id": null,
        "metrics_total": 99,
        "differing_count": 74,
        "groups": [
            {
                "statement": "Fees",
                "order": 2,
                "metrics": [
                    {
                        "field": "gross_expense_ratio_pct",
                        "label": "Gross Expense",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Total annual operating expenses before any waiver. Above the net ratio when a waiver is in force, which may expire.",
                        "differs": true,
                        "direction": "lower",
                        "leaders": [
                            "VOO",
                            "IVV"
                        ],
                        "laggards": [
                            "SPY"
                        ]
                    },
                    {
                        "field": "net_expense_ratio_pct",
                        "label": "Net Expense",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "What the investor actually pays after fee waivers. THE expense ratio. 0.03 means three basis points, not 3%.",
                        "differs": true,
                        "direction": "lower",
                        "leaders": [
                            "VOO",
                            "IVV"
                        ],
                        "laggards": [
                            "SPY"
                        ]
                    }
                ]
            },
            {
                "statement": "Returns",
                "order": 4,
                "metrics": [
                    {
                        "field": "cal_return_2023_pct",
                        "label": "2023",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Calendar-year 2023 total return before taxes, as printed in the prospectus. Answers 'how did it do in a down year', which an average hides.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "IVV"
                        ],
                        "laggards": [
                            "VOO"
                        ]
                    },
                    {
                        "field": "cal_return_2025_pct",
                        "label": "2025",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Calendar-year 2025 total return before taxes, as printed in the prospectus. Answers 'how did it do in a down year', which an average hides.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "IVV"
                        ],
                        "laggards": [
                            "VOO"
                        ]
                    },
                    {
                        "field": "return_1m_pct",
                        "label": "1M",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Trailing one-month PRICE return. Excludes distributions, so it understates total return by roughly the yield.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "VOO",
                            "SPY"
                        ],
                        "laggards": [
                            "IVV"
                        ]
                    },
                    {
                        "field": "return_1y_pct",
                        "label": "1Y",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Trailing one-year PRICE return, measured back from Price As Of (the latest trading day). The primary performance filter — current, daily, ~77% of the universe. NOT comparable with Total Return 12M, whose window ends at the last N-PORT filing up to five months earlier.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "VOO",
                            "SPY"
                        ],
                        "laggards": [
                            "IVV"
                        ]
                    },
                    {
                        "field": "return_3m_pct",
                        "label": "3M",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Trailing three-month price return.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "IVV"
                        ],
                        "laggards": [
                            "VOO"
                        ]
                    }
                ]
            },
            {
                "statement": "Portfolio",
                "order": 11,
                "metrics": [
                    {
                        "field": "holdings_count",
                        "label": "Holdings",
                        "unit": "count",
                        "datatype": "int",
                        "description": "Number of positions in the latest snapshot. Median 87, maximum 18,136.",
                        "differs": true,
                        "direction": null,
                        "leaders": [],
                        "laggards": []
                    }
                ]
            },
            {
                "statement": "Flows",
                "order": 13,
                "metrics": [
                    {
                        "field": "flow_positive_months_pct",
                        "label": "Positive Months",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Share of observed months with net inflows. A persistence measure, not a magnitude.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "VOO"
                        ],
                        "laggards": [
                            "IVV"
                        ]
                    },
                    {
                        "field": "net_flow_12m_pct",
                        "label": "Flow 12M %",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Trailing twelve-month net flow as a percent of net assets.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "IVV"
                        ],
                        "laggards": [
                            "VOO"
                        ]
                    },
                    {
                        "field": "net_flow_12m_usd",
                        "label": "Flow 12M",
                        "unit": "usd",
                        "datatype": "int",
                        "description": "Trailing twelve-month net flow in dollars. Negative means redemptions exceeded sales. Sorting on this re-sorts by fund size; use the percent version.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "IVV"
                        ],
                        "laggards": [
                            "VOO"
                        ]
                    },
                    {
                        "field": "net_flow_1m_pct",
                        "label": "Flow 1M %",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Trailing one-month net flow as a percent of net assets. Size-neutral — rank on this, not the dollar figure.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "IVV"
                        ],
                        "laggards": [
                            "VOO"
                        ]
                    },
                    {
                        "field": "net_flow_3m_pct",
                        "label": "Flow 3M %",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Trailing three-month net flow as a percent of net assets.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "IVV"
                        ],
                        "laggards": [
                            "VOO"
                        ]
                    }
                ]
            },
            {
                "statement": "Identity",
                "order": 0,
                "metrics": [
                    {
                        "field": "cik",
                        "label": "CIK",
                        "unit": "id",
                        "datatype": "int",
                        "description": "SEC Central Index Key of the registrant (the trust), not the fund. Never format with thousands separators.",
                        "differs": true,
                        "direction": null,
                        "leaders": [],
                        "laggards": []
                    },
                    {
                        "field": "class_id",
                        "label": "Class ID",
                        "unit": "text",
                        "datatype": "text",
                        "description": "SEC share-class identifier (C000nnnnnn). Null for a UIT, which has no share classes.",
                        "differs": true,
                        "direction": null,
                        "leaders": [],
                        "laggards": []
                    },
                    {
                        "field": "className",
                        "label": "Share Class",
                        "unit": "text",
                        "datatype": "text",
                        "description": "Share class name, e.g. Admiral Shares, ETF Shares.",
                        "differs": true,
                        "direction": null,
                        "leaders": [],
                        "laggards": []
                    },
                    {
                        "field": "data_available",
                        "label": "Data",
                        "unit": "list",
                        "datatype": "list",
                        "description": "Which data families exist for this fund: Holdings, Flows, AUM, Returns, Profile, Prices. Use it to decide which page blocks to render.",
                        "differs": true,
                        "direction": null,
                        "leaders": [],
                        "laggards": []
                    },
                    {
                        "field": "flows_asof",
                        "label": "Flows Date",
                        "unit": "date",
                        "datatype": "date",
                        "description": "Latest month with a usable flow figure FOR THIS FUND. Trailing flow windows are measured back from here, not from today.",
                        "differs": true,
                        "direction": null,
                        "leaders": [],
                        "laggards": []
                    }
                ]
            }
        ],
        "identity_fields": [
            "ticker",
            "fund_name",
            "className",
            "vehicle",
            "series_id"
        ],
        "data_asof": {
            "portfolio": "2026-08-28",
            "aum": "2026-06-30",
            "flows": "2026-06-30",
            "price": "2026-08-28",
            "total_return": "2026-06-30",
            "prospectus": "2026-08-27"
        },
        "_note": "Abridged for the docs: a live response carries every statement group and all 99 comparable metrics, differing or not."
    },
    "data": [
        {
            "ticker": "VOO",
            "fund_name": "Vanguard 500 Index Fund",
            "className": "ETF Shares",
            "vehicle": "ETF",
            "series_id": "S000002839",
            "category": "Equity",
            "net_expense_ratio_pct": 0.03,
            "gross_expense_ratio_pct": 0.03,
            "net_assets_usd": 1421263311402.89,
            "return_1y_pct": 18.56,
            "return_ytd_pct": 12.77,
            "holdings_count": 506,
            "top1_weight_pct": 7.5525,
            "topholding_name": "NVIDIA Corp.",
            "topholding_ticker": "NVDA",
            "tracking_error_pct": 0.0127,
            "portfolio_turnover_pct": 2
        },
        {
            "ticker": "SPY",
            "fund_name": "SPDR S&P 500 ETF TRUST",
            "className": null,
            "vehicle": "UIT",
            "series_id": "UIT0000884394",
            "category": "Equity",
            "net_expense_ratio_pct": 0.0945,
            "gross_expense_ratio_pct": 0.0945,
            "net_assets_usd": null,
            "return_1y_pct": 18.56,
            "return_ytd_pct": 12.82,
            "holdings_count": 505,
            "top1_weight_pct": 8.3245,
            "topholding_name": "NVIDIA CORP",
            "tracking_error_pct": null,
            "portfolio_turnover_pct": null
        },
        {
            "ticker": "IVV",
            "fund_name": "iShares Core S&P 500 ETF",
            "className": "iShares Core S&P 500 ETF",
            "vehicle": "ETF",
            "series_id": "S000004310",
            "category": "Equity",
            "net_expense_ratio_pct": 0.03,
            "gross_expense_ratio_pct": 0.03,
            "net_assets_usd": 888128937468.17,
            "return_1y_pct": 18.53,
            "return_ytd_pct": 12.86,
            "holdings_count": 508,
            "top1_weight_pct": 8.2836,
            "topholding_name": "NVIDIA",
            "topholding_ticker": "NVDA",
            "tracking_error_pct": 0.03,
            "portfolio_turnover_pct": 3
        }
    ]
}

Six is the ceiling, and it is a readability limit rather than a technical one. A comparison is a table a person reads across; past six columns it stops being one. If you need to rank a larger set on a single metric, that is a screen — use the ETF & Mutual Fund Screener API instead.

2. Response Fields

data is one row per resolved ticker, carrying the whole record — a comparison is the whole record, and six rows is a small response. metadata.groups is where the analysis lives.

metadata

FieldTypeDescription
requested, resolved, missingarrayWhat you asked for, what was found, and what was not. A ticker outside the fund universe lands in missing rather than failing the whole call — unless fewer than two resolve, which is a 404.
count, max_compareintegerFunds actually compared, and the ceiling (6).
same_portfoliobooleantrue when every resolved ticker shares one series_id — they are share classes of a single fund. See the note below; this is the headline answer for a large class of comparisons.
series_idstringThe shared Series ID when same_portfolio is true, otherwise null.
metrics_total, differing_countintegerHow many metrics were compared, and how many actually differ. The ratio is the fastest read on whether a comparison is meaningful at all.
groupsarrayThe metrics arranged by statement — Fees, Returns, Flows, Portfolio, Sectors, Identity. Identity sorts last: its rows are the provenance of the record, not a property of the fund.
data_asofobjectSix as-of dates — portfolio, aum, flows, price, total_return, prospectus — one per column group.

metadata.groups[].metrics[] — the comparison itself

FieldTypeDescription
field, label, unit, datatypestringThe key on each data row, the label to print, and enough type information to format the value.
descriptionstringWhat the metric means, for a tooltip.
differsbooleanWhether the values actually differ — decided at the precision a reader would see, not at float precision. Two AUMs that both print $1.99T are not different. All-null is an absence, not a difference, and never counts.
directionstring|null"lower", "higher", or null. Set only where better is a fact — a lower fee, a lower tracking error, a higher return. Null for AUM, turnover and holdings count, where it is an opinion.
leaders, laggardsarrayWhich tickers sit at the good and bad ends. Both are empty when everything ties or everything leads — every fund leading is nobody leading.

No winner is declared. direction is set only for the metrics where "better" is not a matter of taste. A fund with more assets is not a better fund; a higher turnover is not a worse one; and tracking_difference_pct is deliberately left undirected because it is best near zero, which is neither the maximum nor the minimum. The endpoint reports and ranks; it does not recommend.

3. Response Viewer

A real response for tickers=VOO,SPY,IVV — three S&P 500 trackers, 74 of 99 metrics differing. Green is the leader on that metric, red the laggard; both come from the payload, not from this page.

Live Endpoint https://data.businessquant.com/funds/compare

API Response — Fund Comparison

VOO vs SPY vs IVV · three separate portfolios

Metric VOO SPY IVV
Share Class ETF SharesiShares Core S&P 500 ETF
Net Expense (lower is better) 0.03%0.09%0.03%
Gross Expense (lower is better) 0.03%0.09%0.03%
1Y Return (higher is better) 18.56%18.56%18.53%
AUM (no direction) $1.42T$888.13B
Holdings (no direction) 506505508
Top Holding NVIDIA Corp.NVIDIA CORPNVIDIA
Series ID S000002839UIT0000884394S000004310

4. The Share-Class Case

The single most-asked comparison in this category is between two tickers that turn out to be one fund. This is the case the endpoint is built to answer honestly.

VTSAX vs VTI returns same_portfolio: true. They share Series ID S000002848: one portfolio, two wrappers. Only 13 of 99 metrics differ, and every holdings, sector and concentration row is identical by construction — not because the data is thin.

That is the answer to the question, and it is more useful than eighty identical rows implying it. What actually separates them is the wrapper: the expense ratio, the minimum investment, and how you buy it.

What Differs — VTSAX vs VTI

Every metric where differs is true

Metric Group Direction Leaders
Gross Expense Fees lower VTI
Net Expense Fees lower VTI
2024 Returns higher VTI
1M Returns higher VTSAX
1Y Returns higher VTSAX
3M Returns higher VTSAX
3Y Ann. Returns higher VTSAX
6M Returns higher VTSAX
YTD Returns higher VTSAX
Total 6M Returns higher VTI
Class ID Identity tie
Share Class Identity tie
Price Date Identity tie
Full Response (VTSAX vs VTI, differing metrics only)
{
    "metadata": {
        "endpoint": "/funds/compare",
        "grain": "share class ticker",
        "requested": [
            "VTSAX",
            "VTI"
        ],
        "resolved": [
            "VTSAX",
            "VTI"
        ],
        "missing": [],
        "count": 2,
        "max_compare": 6,
        "same_portfolio": true,
        "series_id": "S000002848",
        "metrics_total": 99,
        "differing_count": 13,
        "groups": [
            {
                "statement": "Fees",
                "order": 2,
                "metrics": [
                    {
                        "field": "gross_expense_ratio_pct",
                        "label": "Gross Expense",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Total annual operating expenses before any waiver. Above the net ratio when a waiver is in force, which may expire.",
                        "differs": true,
                        "direction": "lower",
                        "leaders": [
                            "VTI"
                        ],
                        "laggards": [
                            "VTSAX"
                        ]
                    },
                    {
                        "field": "net_expense_ratio_pct",
                        "label": "Net Expense",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "What the investor actually pays after fee waivers. THE expense ratio. 0.03 means three basis points, not 3%.",
                        "differs": true,
                        "direction": "lower",
                        "leaders": [
                            "VTI"
                        ],
                        "laggards": [
                            "VTSAX"
                        ]
                    }
                ]
            },
            {
                "statement": "Returns",
                "order": 4,
                "metrics": [
                    {
                        "field": "cal_return_2024_pct",
                        "label": "2024",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Calendar-year 2024 total return before taxes, as printed in the prospectus. Answers 'how did it do in a down year', which an average hides.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "VTI"
                        ],
                        "laggards": [
                            "VTSAX"
                        ]
                    },
                    {
                        "field": "return_1m_pct",
                        "label": "1M",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Trailing one-month PRICE return. Excludes distributions, so it understates total return by roughly the yield.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "VTSAX"
                        ],
                        "laggards": [
                            "VTI"
                        ]
                    },
                    {
                        "field": "return_1y_pct",
                        "label": "1Y",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Trailing one-year PRICE return, measured back from Price As Of (the latest trading day). The primary performance filter — current, daily, ~77% of the universe. NOT comparable with Total Return 12M, whose window ends at the last N-PORT filing up to five months earlier.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "VTSAX"
                        ],
                        "laggards": [
                            "VTI"
                        ]
                    },
                    {
                        "field": "return_3m_pct",
                        "label": "3M",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Trailing three-month price return.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "VTSAX"
                        ],
                        "laggards": [
                            "VTI"
                        ]
                    },
                    {
                        "field": "return_3y_ann_pct",
                        "label": "3Y Ann.",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Annualised three-year price return. Null unless three years of history exist.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "VTSAX"
                        ],
                        "laggards": [
                            "VTI"
                        ]
                    },
                    {
                        "field": "return_6m_pct",
                        "label": "6M",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Trailing six-month price return.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "VTSAX"
                        ],
                        "laggards": [
                            "VTI"
                        ]
                    },
                    {
                        "field": "return_ytd_pct",
                        "label": "YTD",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Year-to-date price return, measured from the last close of the prior year.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "VTSAX"
                        ],
                        "laggards": [
                            "VTI"
                        ]
                    },
                    {
                        "field": "total_return_6m_pct",
                        "label": "Total 6M",
                        "unit": "percent",
                        "datatype": "%",
                        "description": "Six N-PORT monthly total returns chained geometrically. NULL unless all six months are on file.",
                        "differs": true,
                        "direction": "higher",
                        "leaders": [
                            "VTI"
                        ],
                        "laggards": [
                            "VTSAX"
                        ]
                    }
                ]
            },
            {
                "statement": "Identity",
                "order": 0,
                "metrics": [
                    {
                        "field": "class_id",
                        "label": "Class ID",
                        "unit": "text",
                        "datatype": "text",
                        "description": "SEC share-class identifier (C000nnnnnn). Null for a UIT, which has no share classes.",
                        "differs": true,
                        "direction": null,
                        "leaders": [],
                        "laggards": []
                    },
                    {
                        "field": "className",
                        "label": "Share Class",
                        "unit": "text",
                        "datatype": "text",
                        "description": "Share class name, e.g. Admiral Shares, ETF Shares.",
                        "differs": true,
                        "direction": null,
                        "leaders": [],
                        "laggards": []
                    },
                    {
                        "field": "price_asof",
                        "label": "Price Date",
                        "unit": "date",
                        "datatype": "date",
                        "description": "Latest trading day priced for this ticker. Price returns are measured back from here.",
                        "differs": true,
                        "direction": null,
                        "leaders": [],
                        "laggards": []
                    }
                ]
            }
        ],
        "identity_fields": [
            "ticker",
            "fund_name",
            "className",
            "vehicle",
            "series_id"
        ],
        "data_asof": {
            "portfolio": "2026-08-28",
            "aum": "2026-06-30",
            "flows": "2026-06-30",
            "price": "2026-08-28",
            "total_return": "2026-06-30",
            "prospectus": "2026-08-27"
        },
        "_note": "Abridged: only the metrics where differs=true are shown. A live response returns all 99."
    },
    "data": [
        {
            "ticker": "VTSAX",
            "fund_name": "Vanguard Total Stock Market Index Fund",
            "className": "Admiral Shares",
            "vehicle": "Mutual Fund",
            "series_id": "S000002848",
            "category": "Equity",
            "net_expense_ratio_pct": 0.04,
            "gross_expense_ratio_pct": 0.04,
            "net_assets_usd": 1991691212321.29,
            "return_1y_pct": 19.37,
            "return_ytd_pct": 13.55,
            "holdings_count": 3487,
            "top1_weight_pct": 6.3949,
            "topholding_name": "NVIDIA Corp.",
            "topholding_ticker": "NVDA",
            "tracking_error_pct": 0.0433,
            "portfolio_turnover_pct": 3
        },
        {
            "ticker": "VTI",
            "fund_name": "Vanguard Total Stock Market Index Fund",
            "className": "ETF Shares",
            "vehicle": "ETF",
            "series_id": "S000002848",
            "category": "Equity",
            "net_expense_ratio_pct": 0.03,
            "gross_expense_ratio_pct": 0.03,
            "net_assets_usd": 1991691212321.29,
            "return_1y_pct": 18.51,
            "return_ytd_pct": 13.15,
            "holdings_count": 3487,
            "top1_weight_pct": 6.3949,
            "topholding_name": "NVIDIA Corp.",
            "topholding_ticker": "NVDA",
            "tracking_error_pct": 0.0433,
            "portfolio_turnover_pct": 3
        }
    ]
}

5. More Request Examples

Comparisons people actually run.

The S&P 500 trio
GET /funds/compare?tickers=VOO,SPY,IVV&api_key=YOUR_API_KEY
Total market vs S&P 500
GET /funds/compare?tickers=VTI,VOO&api_key=YOUR_API_KEY
Share classes of one fund — which wrapper to buy
GET /funds/compare?tickers=VTSAX,VTI,VITSX&api_key=YOUR_API_KEY
Python — print only what differs
import requests

r = requests.get(
    "https://data.businessquant.com/funds/compare",
    params={"tickers": "VTSAX,VTI", "api_key": "YOUR_API_KEY"},
    timeout=30,
).json()

md   = r["metadata"]
rows = {row["ticker"]: row for row in r["data"]}

if md["same_portfolio"]:
    print(f"These are share classes of one fund (series {md['series_id']}).")
    print("Identical holdings by construction -- compare the wrapper, not the portfolio.\n")

print(f"{md['differing_count']} of {md['metrics_total']} metrics differ:\n")
for group in md["groups"]:
    for metric in group["metrics"]:
        if not metric["differs"]:
            continue
        values = "  ".join(
            f"{t}={rows[t].get(metric['field'])}" for t in md["resolved"]
        )
        arrow = ""
        if metric["direction"]:
            arrow = f"  ({metric['direction']} is better; leads: {', '.join(metric['leaders']) or 'tie'})"
        print(f"  {metric['label']:<28} {values}{arrow}")

6. Use Cases

Where a comparison beats two lookups.

"X vs Y" Content Pages

One call fills a whole comparison page, and differs tells you which rows are worth printing. A table of ninety identical values buries the ten that decide the question.

Share-Class Selection

same_portfolio plus the fee rows answer "which wrapper should I buy" directly — the portfolios are identical, so the decision is cost, minimum and account type.

Advisor Fund Swaps

Justify moving a client from one fund to another with the metrics that actually changed, and with direction distinguishing a real improvement from a difference of taste.

Model Portfolio Review

Compare the candidates for one sleeve — up to six at a time — on cost, tracking error and concentration in a single request rather than six.

Only-Differences UIs

Ship a "show only differences" toggle without computing it client-side. The server decides at display precision, so the flag and the rendered table can never disagree.

Screen, Then Compare

Feed the top rows of a Fund Screener result straight in. The screener narrows a universe; this explains the shortlist.

Frequently Asked Questions

The questions developers ask most often about this endpoint.

What does same_portfolio actually tell me?

That every ticker you sent resolves to the same SEC Series ID — they are share classes of one fund, not competing funds. VTSAX and VTI are the canonical example: one portfolio, two wrappers, identical holdings by construction. When it is true, the holdings, sector and concentration rows agreeing is the expected result rather than a sign of missing data, and the comparison is really about fee, minimum and how you buy it.

How is "differs" decided?

At the precision a reader would see, not at float precision. Dollar figures are compacted to three significant figures, percentages to one or two decimals depending on magnitude, counts to whole numbers. So two AUMs that both render as $1.99T are not "different", and a metric is flagged only when the difference would actually be visible. A metric that is null for every fund is an absence, not a difference, and never counts — it is still returned so you can render or hide it as you choose.

Why is direction null on so many metrics?

Because for most of them "better" is an opinion, and the endpoint does not have one. A fund with more assets under management is not a better fund. A higher portfolio turnover is not automatically worse. direction is set only where it is a fact — lower is better for fees, minimums and tracking error; higher is better for returns and flows. tracking_difference_pct is deliberately undirected because it is best near zero, so marking either extreme would be wrong.

Why are leaders and laggards sometimes both empty?

Because every fund leading is nobody leading. If all the compared values are equal — which includes the two-fund tie, where the best and worst value are the same number — both arrays come back empty rather than marking everything green. They are also empty wherever direction is null, since there is no good end to sit at.

What happens if one of my tickers is not a fund?

It is reported in metadata.missing and the comparison proceeds with the rest. If fewer than two tickers resolve, the call returns a 404 naming the ones that were not found — there is nothing to compare. Sending fewer than two, or more than six, returns a 400. Duplicates are collapsed before that count is taken, so tickers=VOO,VOO is one ticker.

Can I compare holdings overlap between two funds?

Not directly — this endpoint compares fund-level metrics, including concentration measures like top10_weight_pct and effective_holdings, but not position-by-position overlap. For that, pull both portfolios from the Fund Holdings API and intersect them on ticker, or use the Portfolio Exposure API to compare sector and country weights without transferring every position.

Is the ETF & Mutual Fund Comparison API free to use?

Yes. A comparison is bounded — at most six named funds, all of which a Free key could already read one at a time — so it is open on every account. What it adds is the analysis, not extra access. The ETF & Mutual Fund Screener API, which ranks the whole universe, is Max and Enterprise. See pricing.