Alpha Vantage API
Free stock, forex and crypto market data — quotes, time series and technical indicators.
What it does
Alpha Vantage offers stock, forex and crypto time series (intraday to monthly), 50+ technical indicators, fundamental data (income statements, balance sheets, earnings), FX rates and some economic indicators. Output is JSON or CSV from one query endpoint.
Base URL
Authentication
Claim a free API key on the site and pass it as &apikey=YOUR_KEY alongside a function= and the function’s parameters.
Code examples
curl -s "https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=IBM&apikey=$AV_KEY"
import requests
r = requests.get("https://www.alphavantage.co/query", params={
"function": "TIME_SERIES_DAILY", "symbol": "MSFT",
"outputsize": "compact", "apikey": KEY}, timeout=15)
data = r.json()
if "Note" in data or "Information" in data:
raise SystemExit("rate limited")
series = data["Time Series (Daily)"]
for day in list(series)[:5]:
print(day, series[day]["4. close"])Rate limits & quotas
The free tier is now very tight: about 25 requests/day (historically 5/minute & 500/day). When you hit it the response is a normal HTTP 200 containing a Note or Information field instead of data — you must check for that. Premium plans lift it to 75–1200 requests/minute.
Key response fields
| Global Quote.05. price | Latest price (GLOBAL_QUOTE) |
| Time Series (Daily) | Object keyed by date, each with open/high/low/close/volume |
| Note / Information | Present when you are rate limited — not real data |
| Error Message | Present on a bad symbol or malformed request |
| Meta Data | Symbol, last refreshed, timezone |
Common errors
| 200 + Note/Information | Daily/minute limit reached — back off, this is the usual failure. |
| 200 + Error Message | Invalid function, symbol or parameter. |
| (empty object) | Often a missing apikey. |
When to use it (and alternatives)
Fine for occasional lookups, learning, and technical-indicator prototypes if 25 calls/day is enough. For anything with real traffic, Twelve Data (800/day) or Finnhub (60/min) give far more free headroom.
FAQ
Why did I get HTTP 200 but no price data?
You are rate limited. Alpha Vantage returns 200 with a Note or Information message when you exceed the free quota. Always check for those keys before parsing.
Is intraday data available for free?
Yes — TIME_SERIES_INTRADAY with interval=1min..60min works on the free key, but the 25/day cap applies.
Can I get data as CSV?
Add datatype=csv to most functions. Handy for spreadsheets and pandas read_csv.
New to APIs?
Short guides for working with this API — and any other.