Synergic.APIs

US National Debt API — to the penny, back to 1790

What is the US national debt today — to the penny? Official U.S. Treasury Fiscal Data as clean, versioned JSON. Amounts as JSON numbers, exact to the cent as published. Every number traces to a named Treasury dataset.

500 req/mo · No credit card required

What you get

The debt, three ways

  • Daily to the penny since 1993-04-01: total public debt plus its two components (held by the public, intragovernmental)
  • Annual debt outstanding since 1790 — the full 235-year story in a single call (limit=250)
  • Real fiscal-year-end dates through history (the close date moved: Dec 31 → Jun 30 → Sep 30)

What the Treasury pays

  • Monthly average interest rates on the debt (2001+)
  • Eight security classes: total, marketable, non-marketable, bills, notes, bonds, TIPS, FRN
  • Refreshed every business day after publication (~3:00 PM ET, T+1)
  • The source never froze during federal shutdowns (verified through Oct–Nov 2025)

Endpoints

All paths relative to your gateway base URL. Auth: X-Api-Key header. Every 200 ships ETag, Cache-Control and RateLimit-* headers.

MethodPathSummary
GET/debt/latest Free+The US national debt today, to the penny.
GET/debt/history Free+Daily debt history (every business day since 1993). Keyset pagination via meta.next_end.
GET/debt/annual Free+Annual debt outstanding since 1790 (limit=250 = the complete series).
GET/debt/interest-rates Free+Latest average interest rate of each of the eight security classes.
GET/debt/interest-rates/{class}/history Free+Monthly average interest rate history of one class (2001+).

Free+ = included from the free plan up. Every endpoint and the full history are on every plan — paid tiers raise your monthly volume (500 → 50,000 → 500,000 → 5,000,000 req/mo). Compare plans.

Get a free API key 500 req/mo · No credit card required

Endpoint reference

Parameters, response fields, and real sample responses — including the error shapes, so you can code the unhappy path without guessing. Straight from the OpenAPI spec.

GET /debt/latest — the US national debt today, to the penny

Response fields (data)

FieldTypeDescription
periodstringBusiness day of the record, YYYY-MM-DD.
totalnumberTotal public debt outstanding — a JSON number, never a string, exact to the cent.
held_by_publicnumber · nullDebt held by the public — null before 2005-03-31 (the source didn't break components out).
intragovernmentalnumber · nullIntragovernmental holdings, same null rule.
unit"US dollars"Explicit on every point.
source"US Treasury"Per-point attribution.

Sample response — 200

{
  "data": {
    "period": "2026-07-20",
    "total": 39588242618845.71,
    "held_by_public": 31817640840048.45,
    "intragovernmental": 7770601778797.26,
    "unit": "US dollars",
    "source": "US Treasury"
  },
  "meta": { "source": "U.S. Treasury Fiscal Data", "area": "us" }
}

Sample response — 404 NO_DATA

{
  "error": { "code": "NO_DATA", "message": "No debt data available yet" }
}
GET /debt/history — daily debt, every business day since 1993

Parameters

ParamTypeDescription
start / endYYYY-MM-DDInclusive date range; pass meta.next_end as end for the next page (null on the last).
limitint 1–100Records per page (default 30).

Notes

Records most recent first; periods are business days. The two components are null before 2005-03-31. On rare days the published components don't sum exactly to the published total — a source anomaly, served as published, never "fixed".

Sample response — 400 VALIDATION_ERROR

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid query parameters",
    "details": [{ "param": "limit", "message": "Too big: expected number to be <=100" }]
  }
}
GET /debt/annual — every fiscal year end since 1790

Parameters

ParamTypeDescription
start / endYYYY-MM-DDInclusive range over the real fiscal-year-end dates.
limitint 1–250Default 100. limit=250 = the COMPLETE 235-year series in one call.

Response fields (data[])

FieldTypeDescription
periodstringThe REAL fiscal-year-end date — it moved through history: calendar year end through 1842, June 30 through 1976, September 30 since 1977. Fiscal 1843 has two closes; both are served.
valuenumberDebt outstanding at the close, in US dollars.
unit · sourceconst"US dollars" · "US Treasury".

Sample response — 200

{
  "data": [
    { "period": "2025-09-30", "value": 37637553494935.61,
      "unit": "US dollars", "source": "US Treasury" },
    { "period": "2024-09-30", "value": 35464673929171.69,
      "unit": "US dollars", "source": "US Treasury" }
  ],
  "meta": { "source": "U.S. Treasury Fiscal Data", "area": "us",
            "count": 2, "next_end": "2024-09-29" }
}
GET /debt/interest-rates — what the Treasury pays, latest rate per class

Response fields (data[])

FieldTypeDescription
classstringtotal, marketable, non-marketable, bills, notes, bonds, tips, frn.
periodstringMonth-end date, YYYY-MM-DD.
ratenumberAnnualized average interest rate, percent (3 decimals).
unit · sourceconst"percent" · "US Treasury".

Sample response — 200

{
  "data": [
    { "class": "total", "period": "2026-06-30", "rate": 3.409,
      "unit": "percent", "source": "US Treasury" },
    { "class": "bills", "period": "2026-06-30", "rate": 3.706,
      "unit": "percent", "source": "US Treasury" }
  ],
  "meta": { "source": "U.S. Treasury Fiscal Data", "area": "us" }
}
GET /debt/interest-rates/{class}/history — monthly rate history of one class

Parameters

ParamInTypeDescription
classpathenumCase-insensitive class id (the 8 above).
start / endqueryYYYY-MM-DDInclusive range; keyset pagination via meta.next_end.
limitqueryint 1–100Default 30.

Series depth

Totals and bills / notes / bonds since 2001-01 · tips since 2004-10 · frn since 2014-01. Periods are month-end dates.

Sample response — 404 CLASS_NOT_FOUND

{
  "error": {
    "code": "CLASS_NOT_FOUND",
    "message": "Unknown security class. Available classes: total, marketable, non-marketable, bills, notes, bonds, tips, frn"
  }
}

Errors, auth & limits

One uniform error contract everywhere: { "error": { "code", "message", "details?" } } with stable, machine-readable codes.

StatusCodeWhen
401UNAUTHORIZEDMissing X-Api-Key header, or invalid/revoked key.
400VALIDATION_ERRORBad query/path parameters — details[] lists each offending param.
404CLASS_NOT_FOUND · NO_DATA · NOT_FOUNDUnknown class, empty dataset, or unknown route.
429RATE_LIMITEDPer-minute limit of your plan exceeded — check Retry-After.
429QUOTA_EXCEEDEDMonthly cap reached. Nothing is billed on top — resets on the 1st (UTC).
502UPSTREAM_ERRORThe origin API was unreachable — retry shortly.
500INTERNAL_ERRORUnexpected error on our side.

Sample — 401

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Missing X-Api-Key header. Get a free key at https://synergicapis.com/signup.html"
  }
}

Sample — 429 QUOTA_EXCEEDED

{
  "error": {
    "code": "QUOTA_EXCEEDED",
    "message": "Monthly quota exhausted (500 requests on the free plan). Resets on the 1st (UTC) — or upgrade at https://synergicapis.com/#pricing"
  }
}

Every 200 (and monthly 429) carries RateLimit-Limit / RateLimit-Remaining / RateLimit-Reset describing your monthly quota; a per-minute 429 describes the minute window and adds Retry-After. Successful responses also ship ETag — send If-None-Match and a 304 costs you nothing new.

Bulk data (CSV)

Want the whole series as a file? Download it — free, attribution appreciated. For live, always-fresh data use the API.

License: underlying data is U.S. government public domain (Treasury); this CSV compilation is free to use with attribution to its official source. Regenerated on releases — the API is always the freshest.

Data provenance

Every number traces to a named official dataset — never scraped, never estimated.

Daily debt is the U.S. Treasury Fiscal Data dataset Debt to the Penny (v2/accounting/od/debt_to_penny): total public debt outstanding and its two components, exact to the cent, every business day since 1993-04-01.

Annual history comes from Historical Debt Outstanding (v2/accounting/od/debt_outstanding) — every fiscal year since 1790, with the real fiscal-year-end dates through history.

Interest rates are Average Interest Rates on U.S. Treasury Securities (v2/accounting/od/avg_interest_rates), monthly by security class since 2001.

U.S. government data is public domain; every API response cites its source in meta. This product is not affiliated with or endorsed by the U.S. Department of the Treasury.

Example

# Today's debt, to the penny
curl -H "X-Api-Key: sk_live_YOUR_KEY" \
  https://api.synergicapis.com/debt/latest
{
  "data": {
    "period": "2026-07-20",
    "total": 39588242618845.71,
    "held_by_public": 31817640840048.45,
    "intragovernmental": 7770601778797.26,
    "unit": "US dollars",
    "source": "US Treasury"
  },
  "meta": { "source": "U.S. Treasury Fiscal Data", "area": "us" }
}

Live demo

Real request against the production API — no key needed here (demo endpoint, 5 requests/minute).

Press the button to fetch today's national debt.

Get started

Get a free API key See pricing 500 req/mo · No credit card required