Skip to main content

Trend History

Returns a time series of weekly observations for a specific trend basket. Use this endpoint to chart basket-level trends, detect inflection points, and compare momentum across periods.

Endpoint

GET /api/trends/history

Authentication

Requires a valid JWT passed via the Authorization header.

Query Parameters

basket
string
default:"discount_seeking"
Basket identifier to query (e.g. discount_seeking, trade_down, credit_stress). Defaults to discount_seeking.
weeks
number
default:"26"
Number of weeks of history to return. Maximum 52.

Response

basket
string
The basket identifier that was queried.
history
array
Array of weekly observations ordered by week_start ascending.
count
number
Number of observations returned.

Code Examples

curl -X GET "https://api.consumersignals.io/api/trends/history?basket=trade_down&weeks=12" \
  -H "Authorization: Bearer <token>"

Example Response

{
  "basket": "trade_down",
  "history": [
    { "week_start": "2026-01-05", "score": 58.3, "smoothed": 57.0, "momentum": 1.2 },
    { "week_start": "2026-01-12", "score": 60.1, "smoothed": 58.2, "momentum": 1.8 },
    { "week_start": "2026-01-19", "score": 59.4, "smoothed": 58.6, "momentum": -0.7 }
  ],
  "count": 3
}