R-Word Index
← Back to R-Word Index

API Documentation

Free, public REST API for recession sentiment data. No API key required.
Base URL: https://api.rwindex.app
Rate limit: 60 requests per minute per IP address.
Authentication: None required for read endpoints below.

Endpoints

GET/api/index/current
Returns today's index value, state label, interpretation text, and the AI-scored variant.
GET/api/index/history
Returns historical index data as a time series. Use the range parameter to control how far back to look.
ParameterTypeDescription
rangestringTime range: 30d, 90d, 1y, or all. Defaults to 30d.
GET/api/methodology
Returns a text summary of how the index is calculated — data sources, scoring formula, and aggregation method.
GET/api/insights/latest
Returns the most recent AI-generated analysis of recession sentiment. The analysis covers the previous day's data.
ParameterTypeDescription
localestringLanguage code: en, ru, ar, es, zh-Hans, or pt-BR. Defaults to en.
GET/api/insights/by-date/{date}
Returns the AI analysis for a specific historical date. Used by the /daily archive pages.
ParameterTypeDescription
datestring (path)Date in YYYY-MM-DD format.
localestringLanguage code: en, ru, ar, es, zh-Hans, or pt-BR. Defaults to en.

Notes

  • All endpoints return JSON. Dates are in YYYY-MM-DD format.
  • The llm_index and llm_state fields are the AI-scored variants displayed on the public website. The plain index and state fields are the keyword-based baseline.
  • New data is published daily at approximately 08:00 MSK (05:00 UTC). If you request /insights/latest before that time, you may receive a 503 DATA_NOT_READY response.
  • Generating new insights requires authentication and is not available publicly.

Attribution

The API is free to use. If you build something with it — a dashboard, a bot, a newsletter — please link back to rwindex.app and credit the R-Word Index. We are a small project and every backlink helps.

Questions or Issues?

Open an issue on GitHub.