Best Stock Data APIs for Python: yfinance vs Massive vs FMP
yfinance, Massive (formerly Polygon.io), FMP, Finnhub or Alpha Vantage? Free tiers, fundamentals and licensing compared, with Python examples.

client.vx.list_stock_financials, was shut down on 22 June 2026. If that's what brought you here, skip to the Replacing list_stock_financials section below.Most Python projects that need stock data start with yfinance. It's free and needs no key, but it isn't an official API and the data is for personal use. Official APIs are steadier, but their free tiers vary a lot: some include financial statements and others charge extra for them. This post compares five popular options on what you get for free, what you pay for next, and what the licence allows.
Comparison at a Glance
Free, no key
yfinance
Easiest start, with fundamentals included. Unofficial and personal use only.
Official prices
Massive
Formerly Polygon.io. Clean price data; financials are a paid add-on.
Fundamentals
FMP
Deep statements and ratios; the free plan covers a limited set of tickers.
Most free calls
Finnhub
60 calls a minute for quotes, news and basic metrics; no free price history.
Tightest limit
Alpha Vantage
Statements on a free key, but only 25 requests a day.
Swipe the table sideways to compare all five β
| Feature | yfinance | Massive | FMP | Finnhub | Alpha Vantage |
|---|---|---|---|---|---|
| Official API | β Unofficial, uses Yahoo's site | β Yes | β Yes | β Yes | β Yes |
| API key | Not needed | Free key | Free key | Free key | Free key |
| Free limit | None published; Yahoo throttles heavy use | 5 calls/min | 250 calls/day | 60 calls/min | 25 calls/day |
| Free price history | β Daily and intraday | β 2 years, end of day | β 5 years, end of day | β Paid only | β Daily |
| Free fundamentals | β Key stats and statements | β $29/mo add-on | Limited: about 87 tickers, 5 quarters | Basic metrics only | β Statements |
| Paid plans from | No paid plan | $29/mo | About $19/mo, billed yearly | About $50/mo per data module | $49.99/mo |
| Use terms | Personal use (Yahoo's terms) | Commercial plans published | Personal on standard plans | Personal on standard plans | Personal on standard plans |
| Python package | yfinance |
massive (official) |
REST with requests |
finnhub-python (official) |
REST, or community alpha_vantage |
Free tiers and prices checked November 2026 on each provider's pricing page. Limits and plans change often, so confirm before you build on one.
yfinance
yfinance is by far the most downloaded of these packages on PyPI. It reads Yahoo Finance data with no key or account: daily and intraday prices, company info, key stats and full financial statements.
import yfinance as yf
aapl = yf.Ticker("AAPL")
print(aapl.history(period="1mo")["Close"].tail())
print(aapl.income_stmt.loc["Total Revenue"])Yahoo throttles heavy use, especially from cloud servers, so cache what you fetch. Also, the yfinance project says it is meant for research and education, while Yahoo's terms limit the data to personal use. For a working example, see Stock Financial Analysis with Streamlit and yfinance. It is a dashboard you can deploy with one click.
Massive (formerly Polygon.io)
Massive is an official market data API. The free plan gives you 5 calls a minute, end-of-day prices with 2 years of history, reference data and technical indicators. Paid plans start at $29 a month. The Python package was renamed from polygon-api-client to massive.
from datetime import date, timedelta
from massive import RESTClient
client = RESTClient(api_key="YOUR_API_KEY")
end = date.today()
start = end - timedelta(days=30)
for bar in client.list_aggs("AAPL", 1, "day", start, end):
print(bar.timestamp, bar.close)Replacing list_stock_financials
The old experimental endpoint, vX/reference/financials, was deprecated in September 2025 and shut down on 22 June 2026, so client.vx.list_stock_financials no longer returns data. In its place are four endpoints, each with its own flat set of fields:
/stocks/financials/v1/income-statements/stocks/financials/v1/balance-sheets/stocks/financials/v1/cash-flow-statements/stocks/financials/v1/ratios
from itertools import islice
from massive import RESTClient
client = RESTClient(api_key="YOUR_API_KEY")
statements = client.list_financials_income_statements(
tickers="AAPL", timeframe="annual", sort="period_end.desc"
)
for s in islice(statements, 4):
print(s.fiscal_year, s.revenue, s.diluted_earnings_per_share)These endpoints arenβt on the free plan: you need the $29-a-month Financials add-on or the Stocks Advanced plan. Results also mix quarterly, annual and trailing twelve-month records, so always set timeframe. If you only need statements for personal projects, yfinance or Alpha Vantage's free tier will do.
Financial Modeling Prep (FMP)
FMP is built around fundamentals: statements, ratios, estimates and filings. The free plan allows 250 calls a day, but its fundamentals cover only a set of about 87 large-cap tickers and the last 5 quarters. Paid plans start at about $19 a month, billed yearly. There's an unofficial fmpsdk package, but most people call the REST API directly with requests.
Finnhub
Finnhub has the most generous free rate limit here, at 60 calls a minute. That covers US quotes, company news and basic financial metrics, but not historical candles or full statements. The free plan is for personal use, and paid data is sold in modules from about $50 a month each. The official package is finnhub-python.
Alpha Vantage
Alpha Vantage includes income statements, balance sheets and cash flow on a free key, but you only get 25 requests a day. That's enough to try it out, not to run an app. Premium plans start at $49.99 a month for 75 requests a minute.
Using Stock APIs with AI Assistants
Several providers now offer MCP servers, so Claude, ChatGPT and other AI assistants can query market data directly. Massive, Alpha Vantage and Twelve Data all publish official ones. The same free-tier limits apply, and an AI assistant can use up 25 calls a day very quickly.
Which One Should You Use?
- Learning, prototypes or a personal dashboard: yfinance. It's free, needs no key, and covers prices and statements.
- An app you plan to sell or run for users: Massive, or another provider whose plan includes commercial use.
- Deep fundamentals and historical financials: FMP on a paid plan.
- Real-time quotes and news on a free tier: Finnhub.
- Occasional free statements without scraping: Alpha Vantage.
To try yfinance first, deploy the Streamlit app on Railway with one click:
Frequently Asked Questions
Is Polygon.io the same as Massive? Yes. Polygon.io rebranded to Massive in October 2025, and the Python package is now massive.
What replaced list_stock_financials? Separate endpoints for income statements, balance sheets, cash flow statements and ratios under /stocks/financials/v1/. They need a paid plan or the Financials add-on.
Which stock API has free fundamentals? yfinance and Alpha Vantage both return full statements for free. FMP covers a limited set of tickers, and Finnhub has basic metrics only.
Is yfinance allowed for commercial use? Yahoo's terms limit the data to personal use. For a commercial product, pay for a plan that includes commercial use. Most standard plans don't, so check the terms.