Skip to main content
GET
/
api
/
history
CPIx History
curl --request GET \
  --url https://api.example.com/api/history
{
  "history": [
    {
      "date": "<string>",
      "value": 123
    }
  ],
  "count": 123,
  "from": "<string>",
  "to": "<string>",
  "lastUpdated": "<string>"
}
Returns a time series of historical CPIx scores within a specified date range. Useful for trend analysis, charting, and strategy backtesting.

Authentication

Requires a valid JWT token in the Authorization header.
Authorization: Bearer <token>

Query Parameters

geography
string
default:"US"
Target geography. Supported values: US, UK.
from
string
default:"2020-01-01"
Start date for the time series in YYYY-MM-DD format.
to
string
End date for the time series in YYYY-MM-DD format. Defaults to the current date.

Response

history
array
Array of date/value pairs ordered chronologically.
count
number
Total number of observations returned.
from
string
Effective start date of the returned series.
to
string
Effective end date of the returned series.
lastUpdated
string
ISO 8601 timestamp of the last data refresh.

Examples

curl -X GET "https://api.consumersignals.io/api/history?geography=US&from=2024-01-01&to=2026-03-31" \
  -H "Authorization: Bearer <token>"

Example Response

{
  "history": [
    { "date": "2024-01-05", "value": 58.3 },
    { "date": "2024-01-12", "value": 59.1 },
    { "date": "2024-01-19", "value": 58.7 },
    { "date": "2024-01-26", "value": 60.2 }
  ],
  "count": 4,
  "from": "2024-01-01",
  "to": "2024-01-31",
  "lastUpdated": "2026-03-29T04:12:00Z"
}