Integrate

Quick start

https://docs.economicsapi.com/quick-start

From zero to a successful API call. No SDK to install — it is plain HTTPS + JSON from any language.

Request · Indicators
curl -X GET "https://api.economicsapi.com/v1/indicators?country=mexico" \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx"
Response
{
  "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. 1

    Create an API key

    Sign up at the dashboard, open API keys, create one, and export it: export API_KEY=sk_live_…
  2. 2

    Make the request

    Call Indicators (GET /v1/indicators) with the example on the right. Swap the placeholder values for real ones.
  3. 3

    Read the response

    A 200 with the JSON body shown on the right. Store the x-request-id response header with the result. Success bodies differ by endpoint.
  4. 4

    Handle errors

    Errors share one envelope: { error, message, request_id }. Branch on error; see Errors.

Let an agent do it

Paste the Integration Prompt into Claude Code or Cursor and it writes the client, wiring, and tests for you.

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.

Next