QuantSet Docs Developer console

Endpoints / Macro and FX

US GDP, corporate profits & activity pack

Real & Nominal GDP, QoQ SAAR GDP growth, private investment, corporate profits after tax, retail sales, industrial production, and consumer sentiment.

GET/api/v1/macro/gdp

API key1 credit per request Use a key with access to this operation.

View as MarkdownWhole API as text

Parameters

modesnapshot | historical
series_idstring
limitinteger, 1 to 500

Historical mode only. Defaults to 50 observations.

snapshot_idstring

Pin the request to one immutable snapshot so a read across several pages stays consistent.

formatjson | csv

Return a JSON page or UTF-8 CSV rows.

Response

Each row has these fields. Rows arrive in data, next to schema_version, snapshot_id, total_count, next_cursor, provenance.

  • series_idstring

    The identifier of the economic or reference series.

  • namestring

    The company, fund or instrument name.

  • categorystring
  • frequencystring
  • unitstring
  • latest_datestring

    The date of the most recent price for this listing.

  • latest_valuenumber
  • prior_valuenumber
  • period_changenumber
  • mom_change_pctnumber

    In percent: 10 means 10%.

  • qoq_change_pctnumber

    In percent: 10 means 10%.

  • yoy_change_pctnumber

    In percent: 10 means 10%.

View response example or schema

Research questions

How do the latest output level and growth readings compare?

GET https://api.quantset.dev/api/v1/macro/gdp

Identify each series by name, unit and frequency before citing latest_value. A real GDP level and a reported growth rate have different units.

How did real output evolve across recent quarters?

GET https://api.quantset.dev/api/v1/macro/gdp?mode=historical&series_id=GDPC1&limit=8

Compare like units and consecutive quarterly observations. Identify the endpoints before calculating cumulative growth.

Reading the results

Read the frequency and rate convention before interpreting a quarterly change. A change in nominal output can include price effects.

Coverage and limits

Available series need not refer to the same latest quarter. Use the historical mode for a sequence of observations and retain revision caveats.

CSV, spreadsheets and agents

The same rows as a spreadsheet-ready table. Add format=csv to the request.

curl "https://api.quantset.dev/api/v1/macro/gdp?format=csv" -H "X-API-Key: YOUR_API_KEY"

Or pull it straight into Google Sheets with one formula. Excel and larger pulls

=IMPORTDATA("https://api.quantset.dev/api/v1/macro/gdp?format=csv&apikey=YOUR_API_KEY")

AI agents call this endpoint over HTTP, or read its Markdown version. Connect Claude, ChatGPT, Cursor or your own agent

Errors

StatusCodeWhat to do
400conflicting_credentialsSupply one credential.
401invalid_credentialsSupply a valid API key.
402insufficient_creditsReduce the request ceiling or refill your credits.
403insufficient_accessYour key does not have the required access.
409snapshot_changedStart the read again with the current snapshot.
413export_too_largeReduce the page size before requesting CSV again.
422invalid_parameterCorrect the named parameter and retry.
429rate_limitedWait for Retry-After seconds.
500internal_errorThe request could not be completed.
503temporarily_unavailableRetry safe reads after a short delay.

Questions

What does US GDP, corporate profits & activity pack cost?
1 credit for each successful request. A request that fails costs nothing.
Which plan includes it?
Every account. Free credits, credit packs and subscriptions all read this data.
Can I get it as CSV or in a spreadsheet?
Yes. Add format=csv to the request. In Google Sheets, put that URL inside IMPORTDATA with a data-only key in apikey.
Can an AI agent use this?
Yes. An agent calls it over HTTP like any client. Add .md to this page's address for a version written for agents.
What does null mean in the response?
The value could not be confirmed. It is never a zero, so treat it as missing in your own calculations.