What GDP datasets are available?
Nominal GDP, real (inflation-adjusted) GDP, and the GDP deflator. Select any with dataset=nominal, real, or deflator.
Nominal, real, and deflator datasets with QoQ, annualized QoQ, and YoY growth already calculated — snapshot mode always on, live FRED mode when you need it.
This calls the live GDP API in snapshot mode. Switch between nominal, real, and deflator datasets.
Loading live value...
Why GDP API
Three datasets, one API
Nominal GDP, real (inflation-adjusted) GDP, and the GDP deflator, selected with a single dataset parameter.
Snapshot always available
Snapshot mode never depends on an upstream key, so your demo and staging environments always return data.
Live FRED mode
Pass source=live to hit FRED directly when FRED_API_KEY is configured, or auto to let the server decide.
Growth built in
GET /growth returns QoQ, annualized QoQ, and YoY percentages so you never compute period math client-side.
Cross-dataset comparison
GET /compare returns latest values and changes for any set of datasets in a single request.
Catalog discovery
GET /catalog returns dataset metadata and every valid query option for building dynamic pickers.
/api/v1/gdp
Latest value
Latest datapoint for the selected dataset and source mode.
History
Historical observations by period window, with optional date-range filtering.
Growth
Trailing observations plus QoQ, annualized QoQ, and YoY growth calculations.
Compare
Latest values and changes for a requested set of datasets.
Catalog
Dataset metadata and valid query option sets.
| Parameter | Type | Required | Description |
|---|---|---|---|
| dataset | string | no | nominal, real, or deflator. Defaults to nominal. |
| datasets | string | no | Comma-separated dataset list for /compare. Defaults to all. |
| source | string | no | auto, snapshot, or live. Defaults to auto. |
| period | string | no | latest, 1y, 5y, or 10y for history-oriented endpoints. |
| points | integer | no | Trailing observations for /growth. 2 to 80, default 12. |
| startDate / endDate | string | no | Inclusive date bounds (YYYY-MM-DD) for history/growth. |
Error reference
Invalid query parameter values or ranges.
Missing or invalid gateway API key. Send x-api-key or api_key with every request.
Unknown route under /api/v1/gdp.
More than 200 requests in a 15-minute window per IP.
Live source call to FRED failed.
source=live requested without FRED_API_KEY configured server-side.
Example gated response (503)
{
"success": false,
"available": false,
"feature": "gdp-live-data",
"reason": "This feature requires FRED API key. Contact Datpaq to enable.",
"correlationId": "1784849006675-l88eays9m"
}FAQ
Nominal GDP, real (inflation-adjusted) GDP, and the GDP deflator. Select any with dataset=nominal, real, or deflator.
Snapshot mode is always available and returns the latest cached dataset. Live mode calls FRED directly and requires a FRED_API_KEY to be configured — pass source=live, source=snapshot, or leave it as source=auto to let the server decide.
GET /growth returns trailing observations plus a changes object with qoq_percent, qoq_annualized_percent, and yoy_percent so you don't need to compute period-over-period math yourself.
Yes. GET /compare accepts a comma-separated datasets list (defaults to all three) and returns latest values and changes for each in one response.
Send your Datpaq API key as an x-api-key header or an api_key query parameter. Keys are created in the Datpaq dashboard and a free tier is included.
Nominal, real, and deflator datasets with growth calculations and cross-dataset comparison, backed by FRED.