🇺🇸 US Treasury Data Scraper avatar

🇺🇸 US Treasury Data Scraper

Pricing

from $9.00 / 1,000 results

Go to Apify Store
🇺🇸 US Treasury Data Scraper

🇺🇸 US Treasury Data Scraper

Extract official US national debt figures, federal outlays, and average interest rates directly from the Treasury API into structured financial rows.

Pricing

from $9.00 / 1,000 results

Rating

0.0

(0)

Developer

太郎 山田

太郎 山田

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

11 days ago

Last modified

Share

Treasury Fiscal Data Digest | Debt, Rates & Budget Monitor

Extract structured financial records directly from the official U.S. Treasury Fiscal Data API without writing custom code or maintaining fragile web scrapers. This tool is purpose-built for data engineering teams, financial analysts, and compliance researchers who need to reliably schedule and integrate official government economic metrics into their internal dashboards.

Instead of manually polling a complex government website or relying on delayed third-party financial aggregators, this scraper connects directly to the underlying agency feeds. Run the scraper daily or weekly to extract critical updates on the national debt, average interest rates, Monthly Treasury Statement receipts, and federal outlays. You can configure custom keyword watchlists to filter exactly what your research teams need, returning a clean, summary-first digest row per configured feed.

The extracted data includes exact publication dates, reporting periods, agency identifiers, and numeric totals for debt and interest rates. By using this tool, you can schedule automated checks that run seamlessly in the background, piping scraped results directly into your data warehouse. Whether you are building predictive economic models, tracking long-term budget trends, or simply monitoring the latest fiscal policy details, this API data scraper provides the robust infrastructure needed to extract and integrate government financial data securely. Get complete, structured results that feed directly into your analytical tools without any manual oversight.

Store Quickstart

What first success looks like:

Key Features

  • 🏛️ Government-sourced — Pulls directly from official agency feeds — no third-party aggregators
  • ⏱️ Timely digests — Daily/weekly rollups of new filings, rulings, or actions
  • 🔍 Keyword watchlists — Flag items matching your compliance/legal watch terms
  • 📊 Structured metadata — Agency, date, docket, document type, link — all dataset-ready
  • 📡 Webhook alerts — Push to legal/compliance teams the moment new items match watchlist

Use Cases

WhoWhy
DevelopersAutomate recurring data fetches without building custom scrapers
Data teamsPipe structured output into analytics warehouses
Ops teamsMonitor changes via webhook alerts
Product managersTrack competitor/market signals without engineering time

Input

FieldTypeDefaultDescription
feedsarrayrequiredOne entry per watch target. Each feed produces one summary digest row. Use debt_to_penny for headline debt, avg_interest
watchTermsstringKeywords to flag in digest evidence titles, summaries, and source dimensions. Use this for terms like deficit, 10-Year,
lookbackDaysinteger90Used to fetch enough history for comparisons and to determine recency for record-setting auction dates. 90 works well fo
maxEvidencePerFeedinteger10Upper bound on nested evidence rows per feed digest. Keep it low for summary-first output; raise it only when you intent
deliverystring"dataset"dataset stores results in the Apify dataset. webhook posts the digest JSON to webhookUrl.
webhookUrlstringPOST target for the digest payload. Leave empty for dataset delivery.
datasetModestring"all"all emits every feed digest row. action_needed emits only feeds with critical signals or watch-term hits. new_only emits
snapshotKeystring"treasury-fiscal-data-digest-state"Stable key used to persist seen evidence hashes across recurring runs so changedSinceLastRun and new_only mode stay comp

Input Example

{
"feeds": [
{
"id": "debt-daily",
"name": "Debt to the Penny",
"source": "debt_to_penny"
},
{
"id": "marketable-rates",
"name": "Marketable Treasury Rates",
"source": "avg_interest_rates",
"securityDescriptions": "Treasury Bills,Treasury Notes,Treasury Bonds"
},
{
"id": "monthly-budget",
"name": "MTS Receipts & Outlays",
"source": "mts_table_1"
},
{
"id": "record-auctions",
"name": "Recent Record-Setting Auctions",
"source": "record_setting_auction",
"securityTypes": "Bills,Notes",
"lookbackDays": 180
}
],
"watchTerms": "deficit,10-Year,Treasury Bills",
"lookbackDays": 180,
"maxEvidencePerFeed": 5,
"delivery": "dataset",
"datasetMode": "all",
"snapshotKey": "treasury-fiscal-data-digest-quickstart",
"notifyOnNoNew": true,
"dryRun": false
}

Output

FieldTypeDescription
metaobject
errorsarray
digestsarray
digests[].feedIdstring
digests[].feedNamestring
digests[].sourcestring
digests[].checkedAttimestamp
digests[].latestRecordDatetimestamp
digests[].statusstring
digests[].changedSinceLastRunboolean
digests[].newEvidenceCountnumber
digests[].totalEvidenceCountnumber
digests[].actionNeededboolean
digests[].headlinestring
digests[].recommendedActionstring
digests[].signalTagsarray
digests[].watchTermHitsarray
digests[].summaryMetricsobject
digests[].evidencearray
digests[].errornull

Output Example

{
"meta": {
"feedCount": 4,
"totalEvidenceRows": 8,
"actionNeededCount": 3,
"executiveSummary": {
"overallStatus": "action_needed",
"brief": "3 feed(s) require review; 4 changed since the last run."
}
},
"digests": [
{
"feedId": "monthly-budget",
"status": "action_needed",
"headline": "February MTS: $307.5B deficit; FYTD $1T deficit.",
"recommendedAction": "Review the widening monthly deficit and update receipts/outlays commentary.",
"changedSinceLastRun": true,
"evidence": [
{
"title": "Current-month receipts vs outlays (February)",
"primaryValue": 307501433426.17,
"unit": "USD"
}
]
}
]
}

API Usage

Run this actor programmatically using the Apify API. Replace YOUR_API_TOKEN with your token from Apify Console → Settings → Integrations.

cURL

curl -X POST "https://api.apify.com/v2/acts/taroyamada~treasury-fiscal-data-digest/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "feeds": [ { "id": "debt-daily", "name": "Debt to the Penny", "source": "debt_to_penny" }, { "id": "marketable-rates", "name": "Marketable Treasury Rates", "source": "avg_interest_rates", "securityDescriptions": "Treasury Bills,Treasury Notes,Treasury Bonds" }, { "id": "monthly-budget", "name": "MTS Receipts & Outlays", "source": "mts_table_1" }, { "id": "record-auctions", "name": "Recent Record-Setting Auctions", "source": "record_setting_auction", "securityTypes": "Bills,Notes", "lookbackDays": 180 } ], "watchTerms": "deficit,10-Year,Treasury Bills", "lookbackDays": 180, "maxEvidencePerFeed": 5, "delivery": "dataset", "datasetMode": "all", "snapshotKey": "treasury-fiscal-data-digest-quickstart", "notifyOnNoNew": true, "dryRun": false }'

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("taroyamada/treasury-fiscal-data-digest").call(run_input={
"feeds": [
{
"id": "debt-daily",
"name": "Debt to the Penny",
"source": "debt_to_penny"
},
{
"id": "marketable-rates",
"name": "Marketable Treasury Rates",
"source": "avg_interest_rates",
"securityDescriptions": "Treasury Bills,Treasury Notes,Treasury Bonds"
},
{
"id": "monthly-budget",
"name": "MTS Receipts & Outlays",
"source": "mts_table_1"
},
{
"id": "record-auctions",
"name": "Recent Record-Setting Auctions",
"source": "record_setting_auction",
"securityTypes": "Bills,Notes",
"lookbackDays": 180
}
],
"watchTerms": "deficit,10-Year,Treasury Bills",
"lookbackDays": 180,
"maxEvidencePerFeed": 5,
"delivery": "dataset",
"datasetMode": "all",
"snapshotKey": "treasury-fiscal-data-digest-quickstart",
"notifyOnNoNew": true,
"dryRun": false
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)

JavaScript / Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('taroyamada/treasury-fiscal-data-digest').call({
"feeds": [
{
"id": "debt-daily",
"name": "Debt to the Penny",
"source": "debt_to_penny"
},
{
"id": "marketable-rates",
"name": "Marketable Treasury Rates",
"source": "avg_interest_rates",
"securityDescriptions": "Treasury Bills,Treasury Notes,Treasury Bonds"
},
{
"id": "monthly-budget",
"name": "MTS Receipts & Outlays",
"source": "mts_table_1"
},
{
"id": "record-auctions",
"name": "Recent Record-Setting Auctions",
"source": "record_setting_auction",
"securityTypes": "Bills,Notes",
"lookbackDays": 180
}
],
"watchTerms": "deficit,10-Year,Treasury Bills",
"lookbackDays": 180,
"maxEvidencePerFeed": 5,
"delivery": "dataset",
"datasetMode": "all",
"snapshotKey": "treasury-fiscal-data-digest-quickstart",
"notifyOnNoNew": true,
"dryRun": false
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Tips & Limitations

  • Run daily for active watchlists; weekly for passive monitoring.
  • Webhook delivery works well for compliance team Slack channels — include docket URL for 1-click access.
  • Use watchKeywords generously — false positives are cheap to triage, false negatives miss filings.
  • Pair with regulatory-change-monitor for cross-agency coverage.
  • Archive Dataset rows weekly for long-term compliance evidence retention.

FAQ

How far back does history go?

This actor monitors forward-only — new items since first run. For historical data, use the agency's own search tool.

What timezones are used?

All timestamps are UTC. Use your downstream pipeline to convert to agency-local time if needed.

Does it translate non-English content?

No — original language is preserved. Use downstream translation services if needed.

Is the data official?

Yes — sourced directly from official government websites and feeds. Not a third-party aggregator.

Can I use this for legal research?

For alerting and monitoring, yes. For litigation research, cross-verify with primary sources (agency websites) — this actor is a monitoring tool, not a legal database.

Government & Regulatory cluster — explore related Apify tools:

Cost

Pay Per Event:

  • actor-start: $0.01 (flat fee per run)
  • dataset-item: $0.003 per output item

Example: 1,000 items = $0.01 + (1,000 × $0.003) = $3.01

No subscription required — you only pay for what you use.

⭐ Was this helpful?

If this actor saved you time, please leave a ★ rating on Apify Store. It takes 10 seconds, helps other developers discover it, and keeps updates free.

Bug report or feature request? Open an issue on the Issues tab of this actor.