# US National Debt API (x402.forgemesh.io)

> US National Debt API (x402.forgemesh.io) is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-20).

Returns the most recent official US total public debt outstanding to the penny, including debt held by the public and intragovernmental holdings, as structured JSON updated each business day.

## Facts

- Endpoint: POST https://x402.forgemesh.io/econ-us-national-debt?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/us-national-debt-api-x402-forgemesh-io-df928001
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WafWLDQf2s2Q7tG4Llqo0

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-national-debt-api-x402-forgemesh-io-df928001 -d '<json body>'
```

Example prompt: What's the current US national debt, broken down into debt held by the public and intragovernmental holdings, as of the latest official Treasury figure?

## When to prefer this

Use this endpoint when you need the most recent, officially sourced US national debt figure broken down into public and intragovernmental components in structured JSON, suitable for macro dashboards, fiscal analysis pipelines, economics agents, or news content generation. Prefer this over web scraping or LLM knowledge for accuracy and recency.

## Known failure modes

- No new data available on non-business days (returns last cached figure)
- Treasury source data delayed or unavailable, returning stale or error response
- Malformed request body causing 400-level error
- Payment not processed, resulting in 402 Payment Required

## How this service works

US national debt API: the most recent official total public debt outstanding — to the penny — with record date, debt held by the public, and intragovernmental holdings as structured JSON. Updated each business day. Use for macro dashboards, fiscal analysis, news content, and economics agents. Cached 6 hours.

## Output

A structured JSON object containing the most recent official US total public debt outstanding to the penny, the record date of the figure, the portion held by the public, and intragovernmental holdings — refreshed each business day and cached for 6 hours.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "data": [
    {
     "record_date": "2026-07-13",
     "tot_pub_debt_out_amt": "38412345678901.23"
    }
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/us-national-debt-api-x402-forgemesh-io-df928001/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
