# US Public Debt Outstanding API

> US Public Debt Outstanding API is a paid API for AI agents from x402-datashop-production.up.railway.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Returns official US Treasury total public debt outstanding (debt held by public, intragovernmental holdings, and total) from the FiscalData Debt to the Penny dataset

## Facts

- Endpoint: GET https://x402-datashop-production.up.railway.app/v1/us/debt
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-public-debt-outstanding-api-d96525db
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WS1Rj73XHIS2dGxEMCdG0

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability us-public-debt-outstanding-api-d96525db
```

Example prompt: What's the current US national debt broken down by debt held by the public and intragovernmental holdings? Pull the latest 30 days of data from the official Treasury dataset so I can see the recent trend.

## When to prefer this

Use this endpoint when you need official, authoritative US government public debt figures directly from the Treasury's FiscalData Debt to the Penny dataset. Prefer this over general financial data providers when you need the canonical breakdown between debt held by the public and intragovernmental holdings, or when you need historical daily data back to 1993. Best suited for fiscal analysis, macroeconomic research, dashboards tracking national debt trends, or fact-checking debt figures against the official source.

## Known failure modes

- limit out of range (1-100): returns error
- since date format invalid (non-ISO): returns error
- Treasury FiscalData API upstream unavailable: service error
- No records matching since date filter (date too recent intraday or weekend): empty result set
- Cache serving stale data if Treasury hasn't published yet (~3pm ET on business days)

## How this service works

Total US public debt outstanding from the official Treasury Debt to the Penny dataset (FiscalData API, published every business day ~3pm ET). Query: no params -> latest data point; ?limit=30 (1-100, newest first) and ?since=2026-01-01 (record_date floor) for history back to 1993. Returns per day the debt held by the public, intragovernmental holdings and total, in USD. Cached 6h.

## Output

Returns one or more daily records from the Treasury Debt to the Penny dataset, each containing: record_date, debt_held_public_amt (USD), intragov_hold_amt (USD), and tot_pub_debt_out_amt (USD). Results are ordered newest first. The default call returns only the most recent business day's figure; optional params allow up to 100 records and date filtering back to 1993.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "limit": {
       "type": "integer",
       "default": 1,
       "description": "Max records, newest first (1-100)"
      },
      "since": {
       "type": "string",
       "description": "Only records with record_date >= this ISO date"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-public-debt-outstanding-api-d96525db/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-datashop-production.up.railway.app](https://www.zero.xyz/host/x402-datashop-production.up.railway.app/llms.txt)
