Marketstack API
Real-time, intraday and historical stock market data via a simple REST API.
What it does
marketstack provides end-of-day and (on paid plans) intraday stock prices for 70+ exchanges worldwide, plus ticker, exchange, index, dividend and split reference data, through a straightforward REST interface.
Base URL
Authentication
Sign up for a free API key and pass it as ?access_key=YOUR_KEY.
Code examples
curl -s "https://api.marketstack.com/v2/eod?access_key=$MS_KEY&symbols=AAPL&limit=5"
import requests
r = requests.get("https://api.marketstack.com/v2/eod/latest",
params={"access_key": KEY, "symbols": "MSFT,GOOGL"}, timeout=10)
for row in r.json()["data"]:
print(row["symbol"], row["date"][:10], row["close"])Rate limits & quotas
Free plan: about 100 requests/month, end-of-day data only, and historically HTTP-only (check the current plan). Each response is paginated (pagination.limit, .offset, .total). Errors return a JSON error object with a code.
Key response fields
| data[].symbol / date / close | Per-day EOD record |
| data[].open / high / low / volume | The rest of the OHLCV bar |
| data[].adj_close | Split/dividend-adjusted close |
| pagination.total | Total matching records (for paging) |
Common errors
| 401 invalid_access_key | Key missing or wrong. |
| 403 https_access_restricted / function_access_restricted | Feature not on the free plan. |
| 429 rate_limit_reached | Per-second or monthly limit exceeded. |
| 422 no_valid_symbols_provided | Bad or empty symbols. |
When to use it (and alternatives)
Only worth it if 100 calls/month covers your need (a nightly job pulling a handful of symbols). For anything interactive, Twelve Data (800/day) and Finnhub (60/min) are far more usable on free.
FAQ
Is 100 requests a month a typo?
No — marketstack’s free tier really is that small, and it is EOD-only. It is best treated as an evaluation tier; plan around a paid plan or a different provider for production.
Does one request return one day or many?
The /eod endpoint returns a paginated history (default 100 rows) for the symbols you pass, so a single request can cover a long span — use date_from/date_to and limit.
Can I get real-time or intraday prices?
Intraday is a paid feature; the free plan is strictly end-of-day.
New to APIs?
Short guides for working with this API — and any other.