Finance

U.S. Treasury Fiscal Data API

by fiscaldata.treasury.gov

Finance Added on November 9th, 2026
Visit fiscaldata.treasury.gov →

What it does

The Fiscal Data API from the U.S. Treasury gives federal finance data such as debt, revenue, spending, interest rates and savings bonds, for example to chart the national debt. Requests are GET calls that answer in JSON, XML or CSV. Free, no key needed, and the data may be reused, also commercially.
  • API
  • CSV
  • HTTP-GET
  • JSON
  • REST
  • XML

At a glance

API key
Not needed · More APIs with no key
Pricing
Free, no key needed, and the data may be reused, also commercially.
Commercial use
Allowed on the free plan
From the browser
Yes (CORS)
Formats
JSON, XML, CSV
Interface
REST, HTTP-GET
Provider
fiscaldata.treasury.gov

More information: https://fiscaldata.treasury.gov/api-documentation/

Is this your service? Show that it is listed

Put this badge on your website or in your README; it links to this page. About the badge

Listed on Free Web Services

Example request

curl

curl 'https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v2/accounting/od/avg_interest_rates?page[size]=1'

JavaScript

const response = await fetch("https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v2/accounting/od/avg_interest_rates?page[size]=1");
const data = await response.json();
console.log(data);

Python

import requests

response = requests.get(
    "https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v2/accounting/od/avg_interest_rates?page[size]=1",
    timeout=30,
)
print(response.json())

The JavaScript works in a web page as well as in Node.js 18 or newer.

Did it work for you?

Tell us what you found when you tried U.S. Treasury Fiscal Data API.