Free Shiller Data API

Historical stock market and economic data from Robert Shiller's research

Access 150+ Years of Market Data

Free REST API providing Robert Shiller's Nobel Prize-winning research data including the S&P 500, CAPE ratio, earnings, dividends, and U.S. home prices.

Current CAPE 39.42
S&P 500 6812.63
Last Updated 2025-12-01

API Endpoints

All endpoints return JSON data. No authentication required.

Latest Values

Get the most recent data points for quick access

GET /data/latest.json
View Response
{
  "stock_market": {
    "date": "2025-12-01",
    "sp500": 6812.63,
    "cape": 39.41935320301406,
    "dividend_yield": 1.34,
    "earnings": 197.45,
    "cpi": 310.33
  },
  "home_prices": {
    "date": "2024-01-01",
    "real_home_price_index": 206.85,
    "building_cost_index": 140.21
  }
}

Stock Market Data (Full History)

Complete S&P 500 data including prices, earnings, dividends, and CAPE ratio since 1871

GET /data/stock_market_data.json
Also available as: CSV
View Fields
  • date_string: Date in YYYY-MM-DD format
  • sp500: S&P 500 Composite Index
  • dividend: Dividends per share
  • earnings: Earnings per share
  • cpi: Consumer Price Index
  • cape: Cyclically Adjusted PE Ratio (Shiller PE)
  • real_price: Inflation-adjusted S&P 500 price
  • real_dividend: Inflation-adjusted dividends
  • real_earnings: Inflation-adjusted earnings
  • long_interest_rate: 10-Year Treasury Rate

Home Price Data

U.S. real home price index and related data since 1890

GET /data/home_price_data.json
Also available as: CSV
View Fields
  • date_string: Date in YYYY-MM-DD format
  • real_home_price_index: Inflation-adjusted home price index
  • building_cost_index: Construction cost index
  • us_population_millions: U.S. population in millions
  • long_rate: Long-term interest rate

Usage Examples

JavaScript / Fetch

fetch('https://yourusername.github.io/shiller_wrapper_data/data/latest.json')
  .then(response => response.json())
  .then(data => {
    console.log('Current CAPE Ratio:', data.stock_market.cape);
    console.log('S&P 500:', data.stock_market.sp500);
  });

Python

import requests

response = requests.get('https://yourusername.github.io/shiller_wrapper_data/data/stock_market_data.json')
data = response.json()

# Get the latest CAPE ratio
latest = data['data'][-1]
print(f"CAPE Ratio: {latest['cape']}")
print(f"S&P 500: {latest['sp500']}")

curl

curl https://yourusername.github.io/shiller_wrapper_data/data/latest.json

About the Data

This API provides free access to data compiled by Robert J. Shiller, Sterling Professor of Economics at Yale University and Nobel Laureate in Economics (2013).

Data Sources

  • Stock Market Data: Monthly S&P 500 data since 1871, including the famous CAPE (Cyclically Adjusted PE) ratio used for market valuation
  • Home Price Data: U.S. real estate prices since 1890, forming the basis of the Case-Shiller Home Price Index

Update Frequency

Data is automatically updated weekly from Professor Shiller's official sources at Yale University.

Academic Use

This data is widely used in academic research and has been featured in Shiller's book "Irrational Exuberance" and numerous economic studies.