# US National Debt - Debt to the Penny (2s.io)

> US National Debt - Debt to the Penny (2s.io) is a paid API for AI agents from 2s.io, paid per call via x402, $0.0012/call, status unknown (last checked 2026-09-14).

Returns daily US Treasury 'Debt to the Penny' data including debt held by public, intragovernmental holdings, and total public debt outstanding, with optional filtering and pagination.

## Facts

- Endpoint: GET https://2s.io/api/treasury/debt
- Price: $0.0012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-c83dde48
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cC4fXz4i74F1sMdLSYP-B

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 2s-io-c83dde48
```

Example prompt: What is the current US national debt broken down by debt held by the public and intragovernmental holdings? Pull the most recent Debt to the Penny record from the US Treasury.

## When to prefer this

Use this endpoint when you need authoritative, precise US national debt figures directly sourced from the US Treasury Fiscal Data. It is ideal for daily debt tracking, historical trend analysis, or answering 'how much does the US owe?' questions with official government data. Prefer this over general financial data APIs when you need the canonical Debt to the Penny breakdown (public vs. intragovernmental) going back to 1993.

## Known failure modes

- Invalid filter syntax returns a 400 error — ensure col:op:val format with supported ops (eq, lt, lte, gt, gte, in)
- pageSize exceeding 10000 returns a validation error
- Requesting a date with no record (e.g. weekends or holidays) returns an empty result set
- Network or payment failure returns a 402 or 5xx error
- Invalid field names in the fields parameter may return empty or error responses

## How this service works

US National Debt — daily "Debt to the Penny" via US Treasury Fiscal Data. Each row carries record_date, debt held by public, intragovernmental holdings, and total public debt outstanding (all USD, signed integers as strings to preserve precision). Optional `filter` uses Fiscal Data syntax: `col:op:val` joined by commas (ops: eq, lt, lte, gt, gte, in). Default sort is `-record_date` (newest first). Authoritative source for "how much does the US owe?" — every weekday since 1993.

## Output

A paginated list of daily US national debt records, each containing record_date, debt_held_public (USD as string), intragovernmental_holdings (USD as string), and total_public_debt_outstanding (USD as string), sorted newest-first by default. Every weekday since 1993 is available.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "sort": "-record_date",
   "pageSize": 10,
   "pageNumber": 1
  }
 }
}
```

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "properties": {
      "sort": {
       "type": "string",
       "default": "-record_date"
      },
      "fields": {
       "type": "string",
       "description": "Comma-separated columns."
      },
      "filter": {
       "type": "string",
       "description": "Fiscal Data filter syntax."
      },
      "pageSize": {
       "type": "integer",
       "default": 100,
       "maximum": 10000,
       "minimum": 1
      },
      "pageNumber": {
       "type": "integer",
       "minimum": 1
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-c83dde48/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
