# Stock API for Python Historical Daily Data

Source: https://finzdata.com/stock-api

Stock API for Python provides historical and daily US stock data for backtesting. One API key covers 16,000+ US stocks back 26+ years, delisted included.

Stock API

# Stock API for Python, built for backtesting

One API key for 16,000+ US stocks going back more than 26 years, delisted names included (survivorship-free), 5,100+ ETFs, daily, hourly, 5-minute and 1-minute bars, plus COT, 13F, short interest, fundamentals and macro. The Python client mirrors yfinance, so existing code keeps working.

[Get a free API key](https://api.finzdata.com/) [See pricing](https://finzdata.com/shop) [Download free samples](https://finzdata.com/samples)

## Get stock prices in three lines

```
import finzdata as yf                     # pip install finzdata
df = yf.Ticker("AAPL").history(start="2025-01-01")   # daily OHLCV
c = yf.Client()
c.prices("LEHMQ-DELISTED", adjust="all")   # delisted names too (look-back plans)
```

Prices are stored as traded and adjusted on read: `adjust='none'`, `'splits'` or `'all'` (splits and dividends). Responses come back as pandas DataFrames, or as JSON, CSV or Parquet over REST.

## What the stock API covers

- Daily OHLCV for every US-listed stock going back more than 26 years, including the ones that later delisted

- Intraday bars: hourly, 5-minute and 1-minute ([intraday data](https://finzdata.com/intraday-data))

- Splits and dividends as dated events, company profiles, sectors and industries

- Positioning and ownership: [COT](https://finzdata.com/datasets#cot), [13F holdings](https://data.finzdata.com/13f), [short interest](https://data.finzdata.com/short-interest), insider trades

- SEC fundamentals and financial statements, point in time; 22,700+ macro series with every revision

## Free, then pay for history

The free key returns the last 12 months of daily bars and of every other dataset, with 1,000 calls a day. Longer history is bought once by look-back: $195 for the first 5 years, $95 for each further 5, plus $19.95 a month for daily updates. See [pricing](https://finzdata.com/shop).

## Frequently asked questions

### Is there a free stock API?

Yes. A free FinzData key returns the last 12 months of daily US stock prices and every other dataset, 1,000 calls a day, with no card.

### Does the stock API include delisted stocks?

Yes. Delisted names keep their full history, so backtests are free of survivorship bias. Older history comes with a look-back plan.

### Can I use it like yfinance?

Yes. `yf.Ticker("AAPL").history()`, `.info`, `.financials` and other familiar calls work, with clean, licensed data and no download limits on paid plans.

### What formats does the API return?

pandas DataFrames in Python; JSON, CSV and Parquet over REST.

## Related

- [Historical stock data API guide](https://finzdata.com/guides/historical-stock-data-api)

- [FinzData vs yfinance](https://finzdata.com/compare/yfinance)

- [Market data API](https://finzdata.com/market-data-api)

- [Browse every stock](https://data.finzdata.com/stocks)

[Get a free API key](https://api.finzdata.com/) [See pricing](https://finzdata.com/shop) [Download free samples](https://finzdata.com/samples)
🌐EnglishDeutschEspañolFrançaisItalianoPortuguês日本語简体中文한국어PolskiעבריתNorsk
