# AAII — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access weekly AAII Investor Sentiment Survey data tracking how individual investors feel about stock market direction — bullish, neutral, or bearish. Covers current readings, historical trends dating back to 1987, and state-by-state breakdowns.

**Category:** Finance & Markets | **Website:** [aaii.com/](https://aaii.com/) | **Docs:** [parse.bot/marketplace/fd220a6b-fcc3-47f5-99c5-723c27d3f4ff/aaii-com-api](https://parse.bot/marketplace/fd220a6b-fcc3-47f5-99c5-723c27d3f4ff/aaii-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-aaii-com-api-fd220a6b/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_current_sentiment

Retrieves the latest AAII investor sentiment survey snapshot. Returns the current week's bullish/neutral/bearish percentages, the last 4 weeks of data, live vote percentages (updated in real-time as members vote), long-term historical averages, 1-year sentiment highs, the weekly special question with answer breakdown, and a link to the latest commentary article. Data refreshes each Thursday when the new survey closes.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-aaii-com-api-fd220a6b/get_current_sentiment \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_historical_sentiment

Retrieves approximately 52 weeks of historical AAII sentiment data. Each week includes bullish/neutral/bearish percentages, running averages for bullish and bearish, and the bull-bear spread (bullish minus bearish). Useful for trend analysis, contrarian signals, and charting sentiment over one year. No input parameters required; the endpoint always returns the most recent year of weekly readings.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-aaii-com-api-fd220a6b/get_historical_sentiment \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_state_sentiment

Retrieves the state-by-state breakdown of investor sentiment for the current survey period. Returns bullish/neutral/bearish percentages for each US state and territory that has sufficient survey responses. Coverage varies week to week; typically 40-50 states report. Useful for identifying regional sentiment divergences from the national average.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-aaii-com-api-fd220a6b/get_state_sentiment \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
