Free returns data API
The same JSON that powers this site, served as static files. No key, no signup. Fair use — use it, cite it, build on it.
Everything on returnsview is precomputed into plain JSON and served from our CDN. That means you can read it directly — from a script, a spreadsheet, or your own app — for free. Data refreshes once a day around 00:30 UTC after markets settle. A polite request: if you publish with it, link back to returnsview.com.
Base URL
https://returnsview.com/dataEndpoints
| Path | What it returns |
|---|---|
| /meta.json | Generation timestamp and coin count. |
| /coins.json | Array of all coins with headline returns (24h/7d/30d/YTD/1y), rank, market cap. |
| /coins/{id}.json | Full history for one coin: monthly/quarterly/yearly returns matrices, weekly & daily, seasonality, and stats. id is the CoinGecko id, e.g. bitcoin. |
| /stocks.json | Array of all stocks, ETFs and world indices with headline returns and index-membership flags. |
| /stocks/{ticker}.json | Full history for one ticker, e.g. AAPL, GSPC (S&P 500 index), AZN-L (LSE). |
| /cycles.json | Bitcoin four-year halving cycles: growth-of-$1 series per coin per cycle. |
The id and ticker values are exactly the last path segment of any asset page — e.g. /coin/solana → /data/coins/solana.json.
Key fields
Returns are percentages. Matrices are keyed by year; monthly is a 12-slot array (Jan…Dec), quarterly 4, weekly 52 (ISO week), with nullwhere there's no data. Each has a parallel _valgrid of period-end closes in the asset's currency.stats holds ret_24h/7d/30d/ytd/1y, best/worst month, and the history span.
Examples
Shell:
curl https://returnsview.com/data/coins/bitcoin.json | jq .statsPython:
import requests
d = requests.get("https://returnsview.com/data/stocks/AAPL.json").json()
print(d["name"], d["stats"]["ret_1y"], "% (1y)")Google Sheets — pull Bitcoin's 1-year return:
=IMPORTDATA("https://returnsview.com/data/coins/bitcoin.json")JavaScript (server-side or same-origin):
const d = await (await fetch("https://returnsview.com/data/coins.json")).json();
const top = d.sort((a, b) => b.ret_1y - a.ret_1y)[0];Notes & fair use
- No authentication. It's a CDN — please cache responses and batch rather than hammering per-request. Abusive traffic may be throttled to keep it free for everyone.
- Updated daily (~00:30 UTC).
meta.jsontells you the freshness. - Browser cross-origin
fetch()from other domains may be blocked by CORS; server-side, curl, Python and Sheets work today. (CORS is being enabled — check back.) - Data is nominal returns in each asset's quote currency, from settled closes. See the methodology. Provided as-is, not financial advice.
- Attribution appreciated: “Data: returnsview.com” with a link.