TreasuryDirect Securities Data Scraper avatar

TreasuryDirect Securities Data Scraper

Pricing

from $19.00 / 1,000 results

Go to Apify Store
TreasuryDirect Securities Data Scraper

TreasuryDirect Securities Data Scraper

Collects US Treasury securities data from TreasuryDirect fiscal datasets including sales, transfers, outstanding amounts, and savings bonds. Returns each record as a flat row with optional date filtering.

Pricing

from $19.00 / 1,000 results

Rating

0.0

(0)

Developer

ParseForge

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

12 days ago

Last modified

Share

ParseForge

TreasuryDirect Securities Data Scraper

Scrape TreasuryDirect fiscal data for securities sales, transfers, outstanding amounts, and savings bonds, up to a million records per run. Each row returns the security type, amount, record date, and other published fields. Export to CSV, JSON, Excel, or XML.

TreasuryDirect publishes daily tables of U.S. government securities activity, but the site offers no bulk download and manual copying is slow and error-prone. This Actor reads the Treasury Fiscal Data feeds directly, letting you pull securities sales, transfers, outstanding totals, and savings bond counts by date range. You get a clean, flat dataset without writing a single script.

Who uses itWhat they scrape TreasuryDirect for
Financial analystsTracking daily issuance and redemption volumes across Treasury security types.
Economic researchersBuilding time-series datasets of outstanding Treasury debt for macro analysis.
Compliance officersAuditing savings bond ownership counts and amounts over specific periods.
Data journalistsInvestigating shifts in public debt composition and government financing patterns.

What it does

This Actor collects TreasuryDirect securities data from four fiscal datasets and returns each record as a flat row with the fields the Treasury publishes.

  • ๐Ÿ“Š Four fiscal datasets: securities sales, transfers, outstanding amounts, and savings bonds pieces and amounts owned.
  • ๐Ÿ“… Date-range filtering: set optional start and end dates to narrow results to a specific period.
  • ๐Ÿ“ˆ Up to one million rows: collect a single day or years of history in one run.
  • ๐Ÿ”„ Fixed flat schema: every record arrives with the same columns, ready for analysis or a database.

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

What you can do with TreasuryDirect data

๐Ÿ“ˆ Monitor daily Treasury issuance.

A fixed-income analyst runs the securities sales dataset each morning with the previous day's date to feed an internal dashboard tracking bill, note, and bond auction results.

๐Ÿ“Š Build a multi-year debt outstanding history.

An economics PhD candidate pulls the securities outstanding dataset for a five-year window to study how Treasury debt composition shifted during rate-hiking cycles.

๐Ÿ” Audit savings bond holdings.

A compliance team at a financial institution runs the savings bonds dataset quarterly to verify aggregate pieces and amounts owned against internal records.

๐Ÿ“ฐ Fact-check government financing stories.

A data journalist collects securities transfers data for the past month to confirm a reported spike in intergovernmental holdings before publication.

Why choose this scraper

What you get
No API key requiredReads the public Treasury Fiscal Data feeds directly with no registration.
Four datasets in one ActorSwitch between sales, transfers, outstanding, and savings bonds without changing tools.
Date-bounded pullsCollect only the record dates you need instead of downloading everything.
Flat, predictable outputEvery row follows the same schema so your pipeline never breaks on a surprise field.

How it compares

No other Store actor targets TreasuryDirect the same way, so the honest comparison is with the alternatives teams actually weigh.

TreasuryDirect Securities Data ScraperBuild it in-houseBy hand
SetupRun it now, zero configDays of engineeringNone, but hours per pull
When TreasuryDirect changesMaintained for youYou fix itYou re-learn the page
Proxies, retries, anti-botBuilt inYour problemBrowser only
OutputFixed JSON schema, CSV/Excel exportWhatever you buildCopy-paste
CostPay per resultEngineering timeAnalyst hours

Configure the run

Choose one of four Treasury fiscal datasets, set an optional date range, and cap the total rows collected. The Input tab lists every parameter.

A first run with the defaults:

{
"maxItems": 10
}

A larger pull:

{
"maxItems": 200
}

Pricing

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

Results collectedApproximate cost
100 results$2.10
1,000 results$21.00
10,000 results$210.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 TreasuryDirect Securities Data 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 TreasuryDirect 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-direct-scraper"

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

Troubleshooting

Why am I getting no results?

Check your date range. If the start and end dates are too narrow or fall on a weekend or holiday when no data was published, the dataset may be empty. Widen the range and try again.

The run finished but the dataset has fewer rows than my maxItems setting.

The Actor stops when it exhausts the available records for your chosen dataset and date range. Fewer rows means there was less data published in that window.

I changed the dataset input but the output columns look wrong.

Each dataset has its own schema. When you switch from securities sales to savings bonds, the field names and structure change to match what Treasury publishes for that dataset.

The run timed out or took too long.

Large date ranges with high maxItems values can take time. Try narrowing the date window or lowering the maximum rows, then run multiple smaller pulls if you need full coverage.

Some fields are empty in my output.

TreasuryDirect does not always populate every field for every security. Empty cells mean the Treasury published no value for that record on that date.

FAQ

QuestionAnswer
What TreasuryDirect data can I scrape with this Actor?You can pull four datasets: securities sales, securities transfers, securities outstanding, and savings bonds pieces and amounts owned. Each returns the fields the Treasury publishes for that dataset.
Do I need a TreasuryDirect account or API key?No. The Actor reads the public Treasury Fiscal Data feeds, so no login, account, or API key is required.
How many records can I collect in one run?You set the maximum with the 'Maximum securities' field, up to one million rows per run. The Actor stops when it hits that cap or runs out of matching records.
Can I filter by date?Yes. The optional start and end date fields let you bound results by record_date so you only pull the period you care about.
What format does the output come in?The dataset is stored in Apify's default dataset and you can export it to CSV, JSON, Excel, or XML from the run console.
Does this Actor include real-time or intraday data?It returns the data as published by TreasuryDirect's fiscal data service, which is typically updated daily. It does not stream intraday ticks.
Can I scrape all four datasets in one run?Each run pulls one dataset at a time. To collect multiple datasets, run the Actor once per dataset, changing the 'Dataset' input each time.
What securities types appear in the sales and outstanding datasets?The datasets include Treasury bills, notes, bonds, TIPS, and floating-rate notes, among others, depending on what the Treasury issued and published for the selected period.
Is historical data available?Yes. The Treasury Fiscal Data feeds go back years. Use the date filters to pull historical periods as far back as the service provides.
Does this Actor handle savings bond redemption values or current rates?No. It returns the pieces and amounts owned from the savings bonds dataset. Redemption values and current rates are separate tools on TreasuryDirect and are not included.

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.