API documentation
A REST API over the data behind Sentiment Index. Every endpoint returns JSON, is authenticated with a bearer token and is rate limited per plan.
Quickstart
- Create a key from your dashboard. It is shown once, so copy it straight into an environment variable.
- Send it as a bearer token on every request.
- Read the JSON response.
Request
curl https://sentimentindex.io/api/v1/fear-greed \
-H "Authorization: Bearer $SENTIMENT_API_KEY"Response
{
"as_of": "2026-08-29",
"current": 54,
"zone": "Neutral",
"previous_close": 51,
"indicators": { "market_momentum": 52.4, "...": null },
"plan": "free"
}Python
import os, requests
r = requests.get(
"https://sentimentindex.io/api/v1/fear-greed",
headers={"Authorization": f"Bearer {os.environ['SENTIMENT_API_KEY']}"},
timeout=10,
)
r.raise_for_status()
print(r.json()["current"])JavaScript
const res = await fetch("https://sentimentindex.io/api/v1/fear-greed", {
headers: { Authorization: `Bearer ${process.env.SENTIMENT_API_KEY}` },
});
if (!res.ok) throw new Error(await res.text());
const { current, zone } = await res.json();Authentication
Pass your key in the Authorization header using the Bearer scheme. Keys begin with sk_live_.
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxThere is no query-string parameter for the key, deliberately: URLs are written to server logs, browser history and Referer headers, and a key that reaches any of those is compromised.
Rate limits
Limits are applied per key on a rolling hourly window. Every response carries the current state:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57| Plan | Requests / hour | Historical lookback |
|---|---|---|
| Free | 60 | 90 days |
| Pro | 2,500 | Full history |
Exceeding the limit returns 429 with a Retry-After header in seconds. Back off for that long rather than retrying immediately.
Errors
Errors return the appropriate status with a JSON body of the form { "error": "..." }.
| Status | Meaning | Cause |
|---|---|---|
200 | OK | The request succeeded. |
401 | Unauthorized | The key is missing, malformed, unknown or revoked. |
403 | Forbidden | The key is valid but the endpoint requires the Pro plan. |
429 | Too Many Requests | Hourly rate limit exhausted. See the Retry-After header. |
503 | Service Unavailable | An upstream data source is temporarily unreachable. |
Endpoints
Endpoints marked live are available now. The rest are documented ahead of release and are not yet callable.
| Endpoint | Description | Plan | Status |
|---|---|---|---|
/v1/fear-greed | Current reading, zone, previous close and indicators. | Free | Live |
/v1/fear-greed?history=true | Adds the daily series. Free keys get the trailing 90 days. | Free | Live |
/v1/prices | OHLC price candles for a ticker. | Free | Planned |
/v1/stock-profile | Company profile, sector, market cap and fundamentals. | Free | Planned |
/v1/earnings-calendar | Upcoming and historical earnings dates. | Free | Planned |
/v1/screener | Screen the market by fundamentals and performance. | Pro | Planned |
/v1/hedge-funds | 13F filings by institution and quarter. | Pro | Planned |
/v1/spy-gex | Dealer gamma exposure by strike and expiration. | Pro | Planned |
/v1/implied-move | Options-implied move into the next earnings date. | Pro | Planned |
Key security
- Store keys in environment variables, never in source control. If a key reaches a public repository, revoke it immediately.
- Use one key per application. A leak then costs you one revocation rather than every integration you run.
- Rotate on staff changes and whenever a key may have been exposed. Create the replacement, deploy it, then revoke the old one for zero downtime.
- We cannot recover a key. Only a hash is stored, so support cannot read one back to you. Rotation is always the answer.
Manage all of this from your API keys dashboard.