Documentation

API URL


GET /api/v1/gdp

Headers
Code
Content-Type: application/json
Query Parameters


Example GET Request

Code
GET https://datpaq.com/api/v1/gdp?api_key=your-api-key&dataset=nominal&source=snapshot

Successful Response

Status
HTML
200 OK
Body
Code
{
  "success": true,
  "source": "snapshot",
  "requestedSource": "snapshot",
  "resolvedSource": "snapshot",
  "dataset": "nominal",
  "name": "Nominal GDP",
  "unit": "Billions of Dollars",
  "seriesId": "GDP",
  "latest": {
    "date": "2026-06-01",
    "value": 30834.1
  },
  "changes": null,
  "snapshotAsOf": "2026-06-30",
  "sourceCoverage": {
    "firstObservationDate": "2026-06-01",
    "lastObservationDate": "2026-06-01",
    "observationCount": 1
  },
  "fallbackReason": null,
  "metadata": {
    "correlationId": "req-example-gdp",
    "timestamp": "2026-10-12T12:00:00.000Z",
    "processingTime": "3ms",
    "api_token_name": null,
    "rate_limit": {
      "limit": null,
      "remaining": null,
      "reset": null
    }
  }
}

Error Response

Example
Code
HTTP 400 ValidationError: Invalid dataset/source/period/points value, malformed calendar date, unsupported compare dataset, or startDate later than endDate — Request rejected by query validation; HTTP 401 AuthenticationError: Gateway rejects a missing or invalid API key — Request is unauthorized; HTTP 404 NotFound: No route matches the requested path — Endpoint not found response returned; HTTP 429 RateLimitError: More than 200 requests reach /api/* routes in 15 minutes — Request returns Too many requests; HTTP 502 UpstreamError: Explicit live mode fails or selected snapshot range has no observations — Result maps to Bad Gateway; HTTP 503 FeatureGateError: source=live requested without FRED_API_KEY — Response returns available false and gdp-live-data feature

Last Updated:  May 4, 2026