For AI agents: complete Markdown index · compact index. Follow the explicit .md links for the Markdown version of each page.

Economic Indicators

GDP Data

GET/v2/economy/gdp/{country}

Returns real gross domestic product data for a country, grouped by metric. For AE, SA, QA and KW this shortcut selects GDP_REAL_WB: annual GDP in constant 2015 US dollars, unscaled (not billions), rather than quarterly GDP_REAL. Source publication years can differ by country.

Included in: Growth.

Authentication

Send your API key in the x-api-key header on every request to https://api.bavest.co. The samples read it from the BAVEST_API_KEY environment variable. Get an API key (free trial) · Authentication guide.

Parameters

  • stringpath · yes

    ISO 3166-1 alpha-2 country code (e.g., US, DE, JP)

    Example US

Response 200

Successful response · application/json

  • data
    EconomyIndicatorResponse

    Macroeconomic indicator data grouped by metric.

    3 fields in data
    • category
      string | null

      Metric category

      One of 16 values

      One of business_confidence, consumer_confidence, consumer_spending, economic_sentiment, employment, gdp, government, housing, income, industrial_production, inflation, interest_rates, investment, manufacturing, money_supply, trade.

      Example: inflation

    • country
      string | null

      ISO 3166-1 alpha-2 country code

      Example: US

    • metrics
      array of EconomyMetric
      required

      Metrics matching the query, each with its own data array

      6 fields in metrics
      • code
        string
        required

        Machine-readable metric code

        Example: CPI

      • name
        string
        required

        Human-readable metric name

        Example: CPI All Urban Consumers

      • frequency
        string

        Data release frequency

        Example: Monthly

      • data
        array of EconomyMetricObservation
        required

        Time-series observations, ordered by referencePeriod descending

        2 fields in data
        • referencePeriod
          string (date)
          required

          Observation date (YYYY-MM-DD)

          Example: 2026-02-01

        • value
          number | null

          Observed value

          Example: 326.785

      • seriesCode
        string

        Data source series identifier (e.g. CUUR0000SA0)

        Example: CUUR0000SA0

      • unit
        string

        Measurement unit (e.g. PCT, INDEX_1982, USD_REAL_BN)

        Example: INDEX_1982

  • meta
    ResponseMeta

    Response metadata, including server-side processing time and resolved request parameters. Successful and error responses use the same metadata shape.

    2 fields in meta
    • time
      integer

      Server-side processing time in milliseconds

      Example: 17

    • parameters
      object

      Echo of the request parameters the endpoint resolved

Errors

  • 400 Invalid request parameters. Returned when required query parameters are missing, have invalid types, or violate constraints (e.g., providing both symbol and isin when they are mutually exclusive).
  • 401 Missing or invalid API key.
  • 404 Resource not found.
  • 429 Rate limit exceeded. Retry after the `Retry-After` header interval.
  • 500 An unexpected error occurred on the server. If the issue persists, contact support with the X-Request-Id header value.
  • 502 Upstream data provider returned an error or is temporarily unavailable. Retry after a short delay.
  • 504 The request timed out waiting for a response from the upstream data provider. This may occur for complex queries or during peak load.
  • default An unexpected error occurred on the server. If the issue persists, contact support with the X-Request-Id header value.
  • 403 from the gateway: the API key is invalid or switched off.

  • 429 with message Limit Exceeded: the monthly quota of the key is used up. With Too Many Requests: the key is throttled, or this route is not in the key's plan. Wait for Retry-After when it is sent.

For AI agents: this page as Markdown at /docs/v2_economy_gdp_country.md, every route in /llms.txt, the OpenAPI spec at /openapi.json.