US Debt Clock APIusdebtclock.org ↗
Access real-time US national debt, spending, revenue, and employment metrics from usdebtclock.org via a single API endpoint. Values computed at request time.
What is the US Debt Clock API?
The usdebtclock.org API exposes a single endpoint, get_current_data, that returns over dozens of fiscal and economic metrics as computed integer values at the exact moment of the request. Fields cover national debt totals, federal spending and revenue figures, employment statistics, and broader economic indicators — all keyed by snake_case metric names in a single metrics object alongside a Unix timestamp.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/646976dc-7b8f-4a7e-89d0-a1e46b2de6b0/get_current_data' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace usdebtclock-org-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: US Debt Clock SDK — fetch real-time fiscal metrics."""
from parse_apis.usdebtclock_org_api import USDebtClock, UpstreamError
client = USDebtClock()
# Fetch the current snapshot of all US debt clock metrics.
try:
snapshot = client.snapshots.current()
except UpstreamError as e:
# Site may be temporarily unreachable or return unexpected content.
print(f"Could not fetch metrics: {e}")
raise
# Access top-level fiscal indicators from the metrics dictionary.
print(f"National Debt: ${snapshot.metrics['us_national_debt']:,}")
print(f"Debt per Citizen: ${snapshot.metrics['debt_per_citizen']:,}")
print(f"US GDP: ${snapshot.metrics['us_gdp']:,}")
print(f"Federal Spending: ${snapshot.metrics['us_federal_spending']:,}")
print(f"Population: {snapshot.metrics['us_population']:,}")
print(f"Computed at Unix timestamp: {snapshot.timestamp}")
print("exercised: snapshots.current")
Returns all current US debt clock metrics computed in real time. The site uses base values and per-second rates to generate continuously updating counters; this endpoint fetches the page, extracts the formulas, and computes current values at the moment of the request. Includes national debt, per-citizen debt, federal spending, GDP, population, employment figures, and other fiscal indicators. No input parameters required. One upstream request per call.
No input parameters required.
{
"type": "object",
"fields": {
"metrics": "object containing all debt clock metric values as integers, keyed by snake_case metric name",
"timestamp": "integer Unix timestamp of when the values were computed"
},
"sample": {
"data": {
"metrics": {
"us_gdp": 32652408458674,
"defense_war": 973847810536,
"us_workforce": 162110030,
"median_income": 68218,
"us_population": 342926123,
"us_total_debt": 114445484101367,
"social_security": 1655894675596,
"credit_card_debt": 1363360257296,
"debt_per_citizen": 116524,
"us_national_debt": 40068118029373,
"actual_unemployed": 14039043,
"debt_per_taxpayer": 360794,
"medicare_medicaid": 1990234632918,
"income_tax_revenue": 2937532103922,
"us_m2_money_supply": 23309147515830,
"official_unemployed": 6891263,
"revenue_per_citizen": 16320,
"us_federal_spending": 7401618241240,
"us_income_taxpayers": 109169300,
"interest_on_debt_net": 1118887117245,
"usa_treasury_reserve": 32757270415366,
"median_new_home_price": 409953,
"us_federal_tax_revenue": 5581500924781,
"us_total_interest_paid": 7049232282088,
"total_worker_compensation": 16789454601047,
"us_federal_budget_deficit": 1820117316459
},
"timestamp": 1787574788
},
"status": "success"
}
}About the US Debt Clock API
What the API Returns
The get_current_data endpoint returns one top-level metrics object containing all debt clock values as integers, plus a timestamp field recording the Unix epoch second when the values were computed. Metric keys follow a consistent snake_case naming pattern (for example, national_debt, federal_spending, federal_revenue, interest_on_debt). Because the source site models its counters using base values and per-second rates, the values this endpoint returns reflect the computed state at request time — each call can yield a slightly different number for any running counter.
Metric Coverage
The metrics object spans several domains: national debt and deficit figures, federal budget spending and tax revenue breakdowns, employment and unemployment counts, and macroeconomic indicators such as GDP-related estimates. All values are returned as integers. There are no optional query parameters — the endpoint takes no inputs and always returns the full metric set in a single response.
Freshness and Consistency
The timestamp field lets callers record exactly when a snapshot was taken, which is useful for time-series logging or displaying values with a clear "as of" label. Because values are computed at request time rather than cached, successive calls made seconds apart will typically differ on fast-moving counters like national debt. There is no date range or historical data access; the endpoint is point-in-time only.
The US Debt Clock API is a managed, monitored endpoint for usdebtclock.org — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when usdebtclock.org changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official usdebtclock.org API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Log national debt and deficit snapshots at regular intervals to build a time-series dataset for economic research.
- Display a live debt counter widget on a news or educational site using the
national_debtmetric value. - Track federal spending vs. revenue figures over time to visualize budget gaps in a dashboard.
- Pull employment and unemployment counts for civic tech applications that aggregate US labor indicators.
- Trigger alerts when specific metrics cross predefined thresholds, such as interest-on-debt exceeding a set value.
- Populate economic indicator tables in financial reporting tools without manually visiting the source site.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does usdebtclock.org have an official developer API?+
What does the `metrics` object actually contain, and how are the keys structured?+
metrics object contains all debt clock metric values keyed by snake_case names — for example national_debt, federal_spending, federal_revenue, and employment-related counters. All values are integers. The accompanying timestamp field records the Unix second at which the values were computed, so you know exactly how fresh each snapshot is.Does the API return historical debt or spending data for past dates?+
get_current_data endpoint returns a single point-in-time snapshot computed at request time; there is no built-in date range parameter or historical archive. You can build a historical dataset by logging repeated responses over time. If you need an endpoint that queries stored historical snapshots, you can fork this API on Parse and revise it to add that capability.Are individual metric categories broken out separately, or is everything in one response?+
metrics object in one response — there is no filtering by category such as debt-only, spending-only, or employment-only. The full set is always returned. You can fork this API on Parse and revise it to add filtered sub-endpoints if your application only needs a subset of fields.How much do values change between successive calls?+
national_debt are computed from per-second rate formulas, so two calls made a few seconds apart will typically differ by a small but nonzero amount. Slower-moving metrics may appear stable across short intervals. The timestamp field is the most reliable way to determine the delta between two snapshots.