Alpha Vantage
Alpha Vantage — The best-known free stock API — daily bars, FX, some fundamentals — with a small daily quota
When you follow a tutorial or a library that already speaks Alpha Vantage, or want one call for a US company's overview (sector, PE, market cap) beside its prices — and 25 calls a day is enough.
Reach for it when…
When you follow a tutorial or a library that already speaks Alpha Vantage, or want one call for a US company's overview (sector, PE, market cap) beside its prices — and 25 calls a day is enough.
Not for: Anything with more than a couple of dozen requests a day on the free key, deep history for non-US symbols, intraday at scale.
Units, revisions, traps
Units. Prices in the listing currency; the TIME_SERIES_DAILY_ADJUSTED endpoint is premium — the free daily endpoint is unadjusted.
Revisions. Unadjusted history changes only with data corrections; adjusted endpoints reflect splits and dividends.
- The daily quota is small and the error comes back as a 200 with an 'Information' message, not an HTTP error — check for it.
- outputsize=compact (100 rows) is the default; full returns 20+ years.
- The demo key in the docs answers only the documented example URLs.
Classic mistake: Looping over a watchlist and burning the day's quota before the first chart.
Three recipes
Each recipe: Python · Excel · Sheets, with how to read the result. Python recipes run under pandas; recipe 1 is re-run by the weekly check where the source allows it.
How to use it in your own work
Copy the snippet, change the series id, read the result the way the footer says. Replace YOUR_…_KEY with your own key where one is needed.
Recipe 1Daily closes, full history
import requests, pandas as pd
KEY = "demo" # the demo key answers this IBM example; use your own key for anything else
u = f"https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=IBM&outputsize=full&apikey={KEY}"
j = requests.get(u, timeout=30).json()
assert "Time Series (Daily)" in j, j
df = pd.DataFrame(j["Time Series (Daily)"]).T.astype(float).sort_index()
df.index = pd.to_datetime(df.index)
print(df["4. close"].tail())- Data → From Web → the same URL with &datatype=csv → Load.
=IMPORTDATA("https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=IBM&outputsize=full&apikey=YOUR_KEY&datatype=csv")Recipe 2Company overview in one call
import requests, pandas as pd
KEY = "YOUR_ALPHAVANTAGE_KEY"
j = requests.get(f"https://www.alphavantage.co/query?function=OVERVIEW&symbol=IBM&apikey={KEY}", timeout=30).json()
print({k: j.get(k) for k in ["Name", "Sector", "MarketCapitalization", "PERatio", "DividendYield", "52WeekHigh", "52WeekLow"]})- From Web with the same URL.
- Use the Python recipe.
Recipe 3FX daily
import requests, pandas as pd
KEY = "YOUR_ALPHAVANTAGE_KEY"
u = f"https://www.alphavantage.co/query?function=FX_DAILY&from_symbol=USD&to_symbol=KRW&outputsize=compact&apikey={KEY}"
j = requests.get(u, timeout=30).json()
df = pd.DataFrame(j["Time Series FX (Daily)"]).T.astype(float).sort_index()
print(df.tail())- From Web with &datatype=csv.
=IMPORTDATA with &datatype=csv.Series → question map
The ids we use from Alpha Vantage, each with the question it answers. The catalog's compare view reads the concept tags behind these rows.
| Series | Answers | Region | Concept |
|---|---|---|---|
| TIME_SERIES_DAILY | Daily OHLC for a stock | global | ohlc_daily |
| OVERVIEW | A company's headline ratios | United States | fundamentals |
| FX_DAILY | An FX pair, daily | global | fx_usd |
| DIGITAL_CURRENCY_DAILY | Crypto daily | global | crypto_spot |
Compare with
Same question, different source: Twelve Data, EODHD, SEC EDGAR APIs. The compare view lines up coverage, frequency, history and access side by side and lists what the combination makes possible.
Questions readers ask
How many free requests?
25 a day at the time of writing (it was 500 until 2024). Check the pricing page — the quota has changed more than once.
Why do I get JSON with an 'Information' key?
That is the quota or a premium-only endpoint. It arrives as HTTP 200, so test for the key before parsing.
Is there adjusted daily data on the free key?
Not at the time of writing; TIME_SERIES_DAILY_ADJUSTED is premium.
Educational only — we explain, we never advise · snippet licence: public domain · corrections to [email protected], fixed within a day and logged in the changelog.