Economic data series
Time series for a selected macroeconomic indicator — GDP, CPI, PCE or import-export — for a country, over a chosen look-back window.
Authorizations
Your HayInsights API key (prefixed apk_). Create and manage keys in the
HayInsights dashboard (Account → API keys).
Send it in the X-API-Key header on every request to /openapi/v1/*.
Which data domains you may access and your request quota are both governed by
the subscription plan attached to the key — see the Plans & features and
Rate limits guides.
Query Parameters
Macroeconomic indicator to return.
| Value | Description |
|---|---|
gdp | Gross Domestic Product |
cpi | Consumer Price Index |
pce | Personal Consumption Expenditures |
import-export | Import & export trade |
gdp, cpi, pce, import-export "gdp"
ISO country code.
"JP"
Look-back window.
1Y, 3Y, 10Y Response
Selected economic data series.
Standard success envelope shared by every endpoint. Each operation's response
wrapper extends this (via allOf) and adds a typed data property.
Always true for a successful response.
true
Mirrors the HTTP status code.
200
Array of observations whose item shape depends on the type query
parameter:
gdp→EconomicDataPointcpi→MacroCpiDatapce→MacroPceDataimport-export→MacroImportExportData
One observation in an economic data series (GDP / CPI / PCE / import-export). Shared by the GDP growth-rate and economic-data endpoints.
- Option 1
- MacroCpiData
- MacroPceData
- MacroImportExportData
Response metadata. Always present; timestamp is the server time the response was generated.