Integrate
Quick start
From zero to a successful API call. No SDK to install — it is plain HTTPS + JSON from any language.
curl -X GET "https://api.economicsapi.com/v1/indicators?country=mexico" \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx"{
"data": [
{
"kpi_id": "PR.CPI.Yoy",
"slug": "inflation-rate",
"name": "Inflation (headline CPI year-over-year)",
"group": "prices",
"unit": "%",
"unit_code": "PCT",
"frequency": "monthly",
"aliases": [
"inflation",
"inflation rate"
]
}
]
}- 1
Create an API key
Sign up at the dashboard, open API keys, create one, and export it:export API_KEY=sk_live_… - 2
Make the request
Call Indicators (GET /v1/indicators) with the example on the right. Swap the placeholder values for real ones. - 3
Read the response
A200with the JSON body shown on the right. Store thex-request-idresponse header with the result. Success bodies differ by endpoint. - 4
Handle errors
Let an agent do it
Latest and history
Use /v1/latest?country=mexico&indicator=inflation for the latest headline inflation rate. Add a date range with /v1/history?country=mexico&indicator=inflation&from=2020.
For currency pairs, search /v1/fx/available?q=USD; for commodities, /v1/commodities/available?q=gold; for government yields, /v1/yields/available?q=canada. Replace /available with a returned slug for the latest observation, or append /history for dated observations.
Forecasts
/v1/forecast?country=mexico&indicator=inflation returns predicted values by date, with lower and upper bounds. No model configuration is needed.