economics
Indicator history
https://docs.economicsapi.com/endpoints/gethistory
gethttps://api.economicsapi.com/v1/history
Use the same country and indicator as /v1/latest, with optional from/to years or dates. Example: country=mexico&indicator=inflation&from=2020. Follow next_cursor until null for the complete result.
curl -X GET "https://api.economicsapi.com/v1/history?country=mexico&indicator=inflation" \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx"Authorization
AuthorizationstringheaderrequiredBearer token. API key from your economicsapi dashboard Format: `Bearer sk_live_xxxxxxxxxxxxxxxxxxxx`.
Query parameters
countrystring | nullCountry name, ISO2/ISO3, slug or group; comma-listable
Example: "mexico"
indicatorstring | nullCommon name (inflation, unemployment), slug, or KPI ID; comma-listable
Example: "inflation"
fromstring | nullYYYY or YYYY-MM-DD
tostring | nullYYYY or YYYY-MM-DD
transformstringdefault "none"none | yoy | mom | log_diff | 3mma
cursorstring | nullnext_cursor from the previous page
Response
200Successful Response
application/jsondataObservationOut[]requirednext_cursorstring | nullretrieved_atstring<date-time>requiredreproduction_urlstringrequired401Missing or invalid API key
application/jsonerrorstringmessagestringrequest_idstring422Validation Error
application/jsondetailValidationError[]429Rate limit exceeded
application/jsonerrorstringmessagestringrequest_idstring