The US national debt is published by the U.S. Treasury as the "Debt to the Penny" dataset — one exact figure per business day, literally to the cent. This guide shows you how to get today's number, the full daily series since 1993, and the annual debt outstanding for every fiscal year since 1790 (yes, the whole 235-year story in one API call) — on a free key with 500 requests/month and no credit card.
The three official series, as one JSON API
The US National Debt API wraps the official U.S. Treasury Fiscal Data into clean, versioned JSON:
- Debt to the Penny — total public debt outstanding for every business day since 1993-04-01, split into debt held by the public and intragovernmental holdings. Amounts are JSON numbers, exact to the cent as published (round-trip verified against the full dataset).
- Historical Debt Outstanding — the debt at each fiscal year end since 1790. The fiscal year end has moved through history (calendar year through 1842, June 30 through 1976, September 30 since 1977 — and fiscal 1843 has two closes, both served); the API gives you the real close dates.
-
Average Interest Rates — what the Treasury actually pays on the debt, monthly since 2001, across eight security classes (
total,marketable,non-marketable,bills,notes,bonds,tips,frn).
Data refreshes automatically every day after the Treasury publishes (each business day's figure lands the following business day around 3:00 PM ET). A nice property of this dataset: the source never froze during federal government shutdowns — verified through the Oct–Nov 2025 shutdown.
Get a key and make the first call
Sign up at synergicapis.com (free tier: 500 req/month, no card), then:
curl -s "https://api.synergicapis.com/debt/latest" \
-H "X-Api-Key: YOUR_API_KEY"
Response (example data — the real call returns the most recent published business day):
{
"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" }
}
That .71 at the end is not a rounding artifact — it's the Treasury's published figure, to the penny.
Endpoints
| Endpoint | What it returns |
|---|---|
GET /debt/latest |
The national debt today, to the penny |
GET /debt/history |
Daily records since 1993, paginated (start, end, limit ≤ 100) |
GET /debt/annual |
Fiscal-year-end debt since 1790 (limit=250 = whole series in one call) |
GET /debt/interest-rates |
Latest average interest rate of each of the 8 security classes |
GET /debt/interest-rates/{class}/history |
Monthly rate history of one class (2001+) |
GET /health |
Liveness check (not rate limited) |
Dates are real YYYY-MM-DD dates. Pagination is keyset: pass each page's meta.next_end as the next end; it's null on the last page.
The 1790 series in one request
This is the endpoint that makes historians happy. With limit=250, the annual endpoint returns the complete series — no pagination loop needed:
curl -s "https://api.synergicapis.com/debt/annual?limit=250" \
-H "X-Api-Key: YOUR_API_KEY"
{
"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" }
}
(Example shows the first two records; the real call returns every fiscal year back to 1790.)
Python: daily history with pagination
import requests
BASE = "https://api.synergicapis.com"
HEADERS = {"X-Api-Key": "YOUR_API_KEY"}
def daily_debt(start="2026-01-01"):
records, end = [], None
while True:
params = {"start": start, "limit": 100}
if end:
params["end"] = end
r = requests.get(f"{BASE}/debt/history", headers=HEADERS, params=params)
r.raise_for_status()
body = r.json()
records.extend(body["data"])
end = body["meta"]["next_end"]
if end is None:
return records
ytd = daily_debt("2026-01-01")
delta = ytd[0]["total"] - ytd[-1]["total"]
print(f"Debt change since Jan 1: ${delta:,.2f}")
Note: the held_by_public / intragovernmental components are null before 2005-03-31 — the source didn't break them out back then. The API serves the record as published rather than inventing a split.
JavaScript: a live "debt clock" number
const BASE = "https://api.synergicapis.com";
const res = await fetch(`${BASE}/debt/latest`, {
headers: { "X-Api-Key": "YOUR_API_KEY" },
});
const { data } = await res.json();
const formatted = data.total.toLocaleString("en-US", {
style: "currency",
currency: "USD",
});
console.log(`US national debt as of ${data.period}: ${formatted}`);
Responses are cacheable (ETag/If-None-Match → 304) and carry RateLimit-* headers, so a widget that refreshes once a day costs you ~30 requests a month — 6% of the free tier.
What the debt costs: interest rates
The underrated series. GET /debt/interest-rates returns the latest average rate per security class:
{
"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" },
{ "class": "bonds", "period": "2026-06-30", "rate": 3.43, "unit": "percent", "source": "US Treasury" }
],
"meta": { "source": "U.S. Treasury Fiscal Data", "area": "us" }
}
Combine total debt × total average rate and you have a back-of-the-envelope annual interest bill — a chart that basically writes its own blog post. To put the debt in real terms, the same platform offers a US Inflation API with CPI back to 1913 — the same key covers both APIs — so you can deflate the 1790–today series properly instead of comparing nominal dollars across centuries. (Step-by-step guide: How to get US inflation data by API.)
Pricing
Free tier: 500 req/month, no credit card — enough for a daily-refresh dashboard many times over. Paid plans at synergicapis.com: PRO $7.99/mo (50k), ULTRA $24.99/mo (500k), BUSINESS $79/mo (5M). Official data, versioned JSON, uniform error contract (NO_DATA, VALIDATION_ERROR, RATE_LIMITED...).
FAQ
What is the US national debt right now?
GET /debt/latest returns the most recent Treasury-published figure to the penny — in the example data above, $39,588,242,618,845.71 as of 2026-07-20. Each business day's figure is published the next business day around 3:00 PM ET.
How far back does the data go?
Daily: every business day since 1993-04-01. Annual: every fiscal year end since 1790 — and limit=250 fits the entire series in a single response.
What's the difference between "debt held by the public" and "intragovernmental holdings"?
The total splits into debt held by outside investors (public) and debt one part of the government owes another (e.g. trust funds). Both components come on every daily record from 2005-03-31 onward; before that the source didn't publish the split, so they're null.
Is this official data?
Yes — the source is U.S. Treasury Fiscal Data (an unrestricted license), refreshed daily. This is an independent product, not endorsed by or affiliated with the U.S. Department of the Treasury.
Source: U.S. Treasury Fiscal Data. This product is independent and not endorsed by or affiliated with the U.S. Department of the Treasury.
Top comments (0)