ParseForge Scrapers

US Treasury Debt to the Penny Scraper

parseforge/treasury-debt-to-penny-scraper

AutomationIntegrationsBusiness

Scrapes daily US national debt records from the Treasury Debt to the Penny dataset. Each row returns the record date, total debt amount, and daily change.

Run this scraper See the API call
Total users
2
Monthly active
1
Total runs
86
Bookmarked
0
Rating
Not rated yet
Last modified
9 days ago

Overview

ParseForge

US Treasury Debt to the Penny Scraper

Scrape daily US national debt totals from the Treasury Debt to the Penny dataset, from any start date up to a million records per run. Each record includes the exact debt amount, record date, and daily change. No API key or proxy required. Export to CSV, JSON, Excel, or XML.

The Treasury's Debt to the Penny site shows the total public debt outstanding each day, but downloading it manually means clicking through a web form and copying tables. This Actor reads the official dataset directly, so you get a clean, machine-readable feed of daily national debt figures. Set a start date and a maximum record count, and it returns every observation in one flat schema.

Who uses it What they scrape US Treasury Debt to the Penny Scraper for
Economists Build long-run debt-to-GDP models with a complete daily series.
Financial analysts Monitor daily debt movements for fixed-income strategy notes.
Policy researchers Track debt accumulation under different fiscal regimes.
Data journalists Pull the latest debt total for a story on federal borrowing.

What it does

This Actor collects daily US national debt records from the Treasury Debt to the Penny dataset and returns each observation as a flat row with the record date, debt amount, and daily change.

  • ๐Ÿ“… Date range control: set a start date and pull every daily observation from that point forward.
  • ๐Ÿ”ข Record limit: cap the run at up to 1,000,000 records so you fetch exactly what you need.
  • ๐Ÿ“ค Multi-format export: download your dataset as CSV, JSON, Excel, or XML.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with US Treasury Debt to the Penny Scraper data

๐Ÿ“ˆ Build a daily debt time series.

An economist sets a start date of 1993-01-04 and a high record limit to pull the entire history of the Debt to the Penny dataset for long-run fiscal analysis.

๐Ÿ“ฐ Fact-check a debt milestone.

A data journalist runs the Actor with a recent start date to confirm the exact date and amount when the national debt crossed a round-number threshold.

๐Ÿ“Š Feed a dashboard.

A financial analyst schedules a daily run with maxItems set to 1 to grab the latest debt total and update an internal monitoring dashboard.

๐Ÿงช Backtest fiscal rules.

A policy researcher pulls a decade of daily debt observations to test how different spending caps would have affected the debt trajectory.

Why choose this scraper

What you get
Official source Reads directly from the Treasury Debt to the Penny dataset, the same numbers published on Treasury.gov.
Daily granularity One row per business day, with the exact total debt outstanding and the change from the prior day.
No auth needed No API key, no OAuth, no proxy. The dataset is public and this Actor fetches it for you.
Fixed schema Every run returns the same columns: record date, debt amount, and daily change, ready for analysis.

How it compares

Three other Apify actors also pull US Treasury debt data, but they differ in the source endpoint and the additional fields they return.

Feature ParseForge US Treasury Debt to the Penny Monitor API US Treasury FiscalData Scraper API - Debt & Interest Rates US Treasury Fiscal Data Scraper - Debt & Spending
Daily debt total from Debt to the Penny Yes Yes Yes Yes
Daily change amount Yes Yes Not listed Not listed
Start date filter Yes Not listed Yes Not listed
Record limit control Yes Not listed Not listed Not listed
Treasury interest rates Not listed Not listed Yes Yes
Monthly public debt statements Not listed Not listed Not listed Yes

Configure the run

Drive the Actor with a start date and a maximum record count, and it returns every daily debt observation from that date onward until the limit is reached. The Input tab lists every parameter.

A first run with the defaults:

{
 "startDate": "2026-01-01",
 "maxItems": 10
}

A larger pull:

{
 "startDate": "2026-01-01",
 "maxItems": 200
}

Pricing

Pay-per-result: $0.0085 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $0.85
1,000 results $8.50
10,000 results $85.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the US Treasury Debt to the Penny Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to US Treasury Debt to the Penny Scraper through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/treasury-debt-to-penny-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check that your start date is on or after January 4, 1993. If the start date is in the future or on a weekend with no data yet, the Actor may return an empty dataset.

Why does the run stop before reaching my maxItems limit?

The Actor stops when it reaches the most recent available date in the Treasury dataset. If you set maxItems higher than the number of business days from your start date to today, you will get all available records and the run will finish early.

Why are some dates missing from the output?

The Debt to the Penny dataset only contains records for business days. Weekends and federal holidays will not appear in the results.

Why is the daily change zero for some rows?

On days when the debt total did not change from the prior business day, the daily change field will show zero. This is normal and reflects the official data.

FAQ

Question Answer
What is the Debt to the Penny dataset? It is the official daily record of the total public debt outstanding of the United States, published by the U.S. Department of the Treasury. Each row shows the debt total for a specific business day.
How far back does the data go? The dataset begins on January 4, 1993. You can set your start date to any day on or after that date.
What fields does each record contain? Each record includes the record date, the total debt amount in dollars, and the daily change from the previous business day.
Do I need a Treasury API key? No. The Debt to the Penny dataset is publicly available, and this Actor reads it without any authentication or API key.
How do I get only the latest debt figure? Set maxItems to 1 and leave the start date blank or set it to a recent date. The Actor will return the most recent daily observation.
Can I filter by a specific date range? Set the start date to the first day you want, and use maxItems to control how many records you receive from that point forward.
What export formats are supported? You can export your results as CSV, JSON, Excel, or XML directly from the Apify dataset tab.
Does this include intragovernmental debt? The Debt to the Penny total is the total public debt outstanding, which includes both debt held by the public and intragovernmental holdings. The dataset does not break out the two components separately.
Is the data updated daily? Yes. The Treasury updates the dataset each business day. Run the Actor daily to capture the latest observation.
Can I schedule this to run automatically? Yes. Apify schedules let you run the Actor daily, weekly, or on any cron schedule to keep your dataset current.

Related actors

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by U.S. Department of the Treasury. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
startDate string Earliest record_date to fetch (YYYY-MM-DD). 2026-01-01
maxItems integer How many records to collect per run. 10

Pricing

from $7.50 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.0075 to $0.0085

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~treasury-debt-to-penny-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run US Treasury Debt to the Penny Scraper on Apify All scrapers