APIs / Finance / U.S. Treasury Fiscal Data

1 credit per call3 endpoints5 datapoints

U.S. Treasury Fiscal Data API

U.S. Treasury Fiscal Data API for daily debt to the penny, average interest rates on Treasury securities and quarterly exchange rates as JSON.

U.S. Treasury Fiscal Data
GET/v1/us-treasury/debt-to-the-penny?limit=5
{
  "success": true,
  "data": {
    "total": 8447,
    "page": 1,
    "has_more": true,
    "count": 5,
    "items": [
      {
        "record_date": "2026-12-03",
        "total_public_debt_outstanding": 40809295870885.48,
        "debt_held_by_the_public": 33066277323014.21,
        "intragovernmental_holdings": 7743018547871.27,
        "fiscal_year": 2027
      },
      {
        "record_date": "2026-12-02",
        "total_public_debt_outstanding": 40850688793544.69,
        "debt_held_by_the_public": 33085512384663.94,
        "intragovernmental_holdings": 7765176408880.75,
        "fiscal_year": 2027
      },
      {
        "record_date": "2026-12-01",
        "total_public_debt_outstanding": 40849591170710.37,
        "debt_held_by_the_public": 33085391759486.58,
        "intragovernmental_holdings": 7764199411223.79,
        "fiscal_year": 2027
      }
    ]
  },
  "meta": {
    "request_id": "req_a7aeeb5bf71c44019cb2e0c29fde7322",
    "credits_charged": 1,
    "credits_remaining": 485
  }
}
200 OKJSONX-Credits-Used: 1
Recorded from our API and shortened.

Sample data

What one call returns

A recorded run of debt-to-the-penny: the fields and shapes you will get, shortened to 3 items.

#record_datestringtotal_public_debt_outstandingnumberdebt_held_by_the_publicnumberintragovernmental_holdingsnumberfiscal_yearinteger
12026-12-0340809295870885.4833066277323014.217743018547871.272027
22026-12-0240850688793544.6933085512384663.947765176408880.752027
32026-12-0140849591170710.3733085391759486.587764199411223.792027

Recorded from our API · 3 items shown · 5 datapoints per itemGET /v1/us-treasury/debt-to-the-penny?limit=5

5 datapoints

Other

  • record_datestring
  • total_public_debt_outstandingnumber
  • debt_held_by_the_publicnumber
  • intragovernmental_holdingsnumber
  • fiscal_yearinteger

Playground

Run this API

cURLshell
curl "https://api.perceptlayer.com/v1/us-treasury/debt-to-the-penny?limit=5" \
  -H "X-API-Key: $API_KEY"

U.S. Treasury Fiscal Data · 3 endpoints

Endpoints

Every endpoint takes the same key. Open one for its parameters, the fields it returns and an example request.

EndpointRequired parametersReturnsCost
GET/v1/us-treasury/average-interest-rates
none+2 optional
latest_record_datemonthsitems
1 credit
GET/v1/us-treasury/debt-to-the-penny
none+2 optional
record_datetotal_public_debt_outstandingdebt_held_by_the_publicintragovernmental_holdingsfiscal_year
1 credit
GET/v1/us-treasury/exchange-rates
none+4 optional
record_dateeffective_datecountrycurrencycountry_currencyexchange_rate
1 credit

Overview

About the U.S. Treasury Fiscal Data API

What you can get

The U.S. Treasury Fiscal Data API returns U.S. Department of the Treasury fiscal data as JSON through 3 endpoints.

  • Debt to the penny: debt-to-the-penny takes limit (1 to 100 days, default 10) and page. Days come newest first.
  • Average interest rates: average-interest-rates takes security_type (marketable, non-marketable or interest-bearing) and months (the latest 1 to 24 months, default 1).
  • Exchange rates: exchange-rates takes a country (such as Canada, Euro Zone or United Kingdom) or a currency (such as Dollar, Euro or Yen), with limit (1 to 100, default 20) and page. Case doesn't matter. Without either, it returns every rate for the latest quarter.

The recorded debt-to-the-penny call returns total (8,447 days in that recording), page, has_more and items, each with record_date, total_public_debt_outstanding, debt_held_by_the_public, intragovernmental_holdings and fiscal_year. The newest, for 2026-12-03, put total public debt outstanding at $40,809,295,870,885.48, of which $33,066,277,323,014.21 was held by the public. The recorded average-interest-rates call for marketable securities returns latest_record_date (2026-11-30) and items with security_type, security and average_interest_rate_pct: 4.101 for Treasury Bills, 3.451 for Treasury Notes and 3.495 for Treasury Bonds. The recorded exchange-rates call for Canada returns total (103) and quarterly rates with record_date, effective_date, country, currency, country_currency and exchange_rate, foreign currency units per U.S. dollar: 1.418 Canadian dollars on 2026-09-30.

How a call works

Ask for the latest figures: GET /v1/us-treasury/debt-to-the-penny?limit=10 with your key in the X-API-Key header returns the 10 newest days. For a currency's history, GET /v1/us-treasury/exchange-rates?country=Canada&limit=20 returns its quarterly rates, newest first; check has_more before asking for the next page. Answers come from a cache for up to an hour. Every successful call costs 1 credit; failed calls cost nothing.

FinanceJSONRESTMCP

More finance APIs

Use cases

Let a finance agent answer "what is the U.S. national debt today" with the latest `record_date`

Use the U.S. Treasury Fiscal Data API to let a finance agent answer "what is the U.S. national debt today" with the latest `record_date`

Chart debt held by the public against intragovernmental holdings over time

Use the U.S. Treasury Fiscal Data API to chart debt held by the public against intragovernmental holdings over time

Convert foreign-currency amounts at the Treasury reporting rate for a quarter

Use the U.S. Treasury Fiscal Data API to convert foreign-currency amounts at the Treasury reporting rate for a quarter

Load every reporting rate for the latest quarter into a warehouse in one call

Use the U.S. Treasury Fiscal Data API to load every reporting rate for the latest quarter into a warehouse in one call

FAQ

Questions

Is this the official U.S. Treasury Fiscal Data API?

No. Perceptlayer is an independent service and is not affiliated with the U.S. Department of the Treasury. Fiscal Data's API is free to call directly, with no key or registration. This API calls it on your behalf and adds one key for every source on Perceptlayer, short field names with numbers as numbers, country and currency names matched without worrying about case, a cache of up to an hour, and no charge for failed calls.

Can I reuse the data?

Yes. Treasury publishes the data free, without restriction, to copy, adapt and redistribute for non-commercial or commercial purposes. No attribution is required.

How should I write a country or currency?

As Treasury names it, in any case: "euro zone" becomes Euro Zone and "united kingdom" becomes United Kingdom. Values with a comma, colon or parenthesis are refused.

Are the exchange rates market rates?

No. They are the Treasury's reporting rates of exchange, set once a quarter, so each country has one rate per quarter rather than a daily quote.

Should I build an U.S. Treasury Fiscal Data scraper instead?

You can, but an U.S. Treasury Fiscal Data scraper is code you maintain: page changes break it, requests get blocked, and U.S. Treasury Fiscal Data's terms govern how you collect data. The U.S. Treasury Fiscal Data API gives you 3 endpoints of named JSON fields for 1 credit per successful call, and failed calls cost nothing. A scraper makes sense only for data these endpoints don't return, so check the response in the playground on this page first.

Try the U.S. Treasury Fiscal Data API with 100 free credits

No credit card. Failed calls are never billed.