# US Treasury Yield Curve and Auctions Scraper (`parselab/us-treasury-yield-curve-auctions-scraper`) Actor

Get the US Treasury yield curve with spreads and inversion flags, T-bill rates, auction results with bidder demand statistics, national debt to the penny, average interest rates and exchange rates. Daily history back to 1990. Export to CSV or Excel.

- **URL**: https://apify.com/parselab/us-treasury-yield-curve-auctions-scraper.md
- **Developed by:** [ParseLab](https://apify.com/parselab) (community)
- **Categories:** Business, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $11.63 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## US Treasury Yield Curve and Auctions Scraper

Get the US Treasury yield curve, T-bill rates, auction results, national debt, average interest rates and exchange rates in clean rows you can export to CSV or Excel. Daily yield curve history goes back to 1990 and auctions go back to 1979. The data comes straight from the US Treasury and is public domain.

The Treasury publishes these numbers, but spread over several pages and files with different date formats, different column names and no calculations. This Actor puts them together and adds the figures analysts normally work out by hand: spreads in basis points, inversion flags, how long the curve has been inverted, changes over one day to one year, breakeven inflation, and for every auction how strong the demand was compared with the last auctions of the same security.

### What can you do with this Treasury data scraper?

- Download the full daily yield curve from 1 month to 30 years with one row per trading day.
- Check whether the 2s10s or 3m10y spread is inverted today, and how many days in a row it has been inverted.
- Compare today's curve with one week, one month, three months and one year ago, one row per maturity.
- See the 10 year yield change over 1 day, 1 week, 1 month, 3 months and 1 year in basis points.
- Get breakeven inflation for 5, 7, 10, 20 and 30 years from nominal and real yields.
- Pull every 10-year note auction with bid to cover, dealer, direct and indirect bidder shares and the tail.
- Build an auction calendar with the offering size of the bills, notes and bonds coming up.
- Track the national debt to the penny with daily, weekly, monthly and yearly changes.
- Look up the average interest rate the Treasury pays on bills, notes, bonds and inflation protected securities.
- Get the official Treasury exchange rates used for federal reporting, by country and quarter.

### Seven ways to collect data

| Mode | One row is | Best for |
|---|---|---|
| Daily yield curve | one trading day | recession signals, backtests, charts |
| Curve change over time | one maturity | how the curve moved this week or this year |
| T-bill rates | one trading day | cash yields, money market models |
| Treasury auctions | one auction | demand analysis, issuance calendars |
| National debt to the penny | one day | debt trackers, news graphics |
| Average interest rates | one debt class and month | cost of the debt, interest budgets |
| Exchange rates | one currency and quarter | reporting rates, currency research |

### What data do you get for the yield curve?

- Date and weekday.
- Yields for 1, 1.5, 2, 3, 4 and 6 months and 1, 2, 3, 5, 7, 10, 20 and 30 years, as numbers.
- Seven spreads in basis points: 2s10s, 3m10y, 5s30s, 2s30s, 3m2y, 1y10y and 10y20y.
- Inversion flags for 2s10s and 3m10y, the 2s10s inversion streak in days and the number of inverted maturity pairs.
- A curve shape label: normal, flat, steep, partiallyInverted or inverted.
- Change in basis points over 1 day, 1 week, 1 month, 3 months and 1 year for the 2, 10 and 30 year yields.
- The 52 week high, low and percentile of the 10 year yield.
- Real yields and breakeven inflation for 5, 7, 10, 20 and 30 years.

### What data do you get for every auction?

- CUSIP, security category (Bill, Note, Bond, TIPS, FRN or CMB), term, auction date, announcement date, issue date and maturity date.
- Coupon rate, reopening flag, original term, series, payment frequency and whether the security is callable or strippable.
- Offering amount, total tendered, total accepted, competitive and non-competitive amounts.
- Accepted and tendered amounts for primary dealers, direct bidders and indirect bidders, plus the Fed's SOMA add-on.
- Bid to cover ratio, awarded to tendered percentage and the share taken by dealers, direct and indirect bidders.
- High, median and low yield or discount rate, price per 100 and the allocation at the high.
- The change in yield and in bid to cover against the previous auction of the same security, and against the average of the previous four.
- For inflation protected securities, the index ratio and reference CPI on the issue date.
- Upcoming auctions show the planned offering size and the days until the sale.

### Input example

Latest 30 days of the yield curve with real yields:

```json
{
    "mode": "yieldCurve",
    "lastDays": 30,
    "includeRealYields": true,
    "sortOrder": "newestFirst"
}
```

All 10-year and 30-year note and bond auctions in 2025:

```json
{
    "mode": "auctions",
    "dateFrom": "2025-01-01",
    "dateTo": "2025-12-31",
    "securityTerms": ["10-Year", "30-Year"]
}
```

### Output example

A real yield curve row:

```json
{
    "date": "2026-10-23",
    "weekday": "Friday",
    "yield2y": 4.69,
    "yield10y": 5,
    "yield30y": 5.33,
    "spread2s10sBps": 31,
    "spread3m10yBps": 78,
    "inverted2s10s": false,
    "inversion2s10sStreakDays": 0,
    "curveShape": "normal",
    "change10y1mBps": -11,
    "percentile10y52w": 91.2,
    "breakevenInflation10y": 2.34
}
```

A real auction row:

```json
{
    "cusip": "91282CRF0",
    "securityTerm": "9-Year 10-Month",
    "auctionDate": "2026-10-07",
    "offeringAmount": 39000000000,
    "bidToCoverRatio": 2.77,
    "highYield": 5.3,
    "indirectSharePct": 80.3,
    "dealerSharePct": 2.5,
    "awardedToTenderedPct": 36.63
}
```

### How much does it cost?

You pay for each row returned, and the price per row drops with higher Apify subscription plans. A full year of daily yield curve data is about 250 rows. Free accounts can test the Actor with up to 10 rows per run. There is a small start fee per run.

### Frequently asked questions

**How far back does the data go?**
The yield curve starts in 1990 for most maturities, real yields in 2003, bill rates in 2002 and auctions in 1979. The national debt series starts in 1993, average interest rates in 2001 and exchange rates in 2001.

**When is the latest yield curve published?**
The Treasury posts the closing curve after the market closes on each business day, usually in the early evening US Eastern time. Holidays and weekends have no row.

**Why does an auction show resultsPending?**
Results are added a few days after the sale. Choose upcoming auctions to see announced and pending sales, or completed auctions for finished ones.

**What does the tail mean in the auction rows?**
The field highMinusMedianYieldBps shows the gap between the highest accepted yield and the median yield, in basis points. A larger gap means weaker demand at the end of the order book.

**Are the numbers adjusted?**
No. Yields are par yields in percent. Amounts are in US dollars. Missing values are returned as null, never as text.

**Can I schedule it?**
Yes. Run it daily with lastDays set to 5 and send the output to your sheet, database or alert system.

### Limits

The Actor reads the figures that the Treasury publishes and cannot show intraday yields or secondary market prices. Auction results appear after the sale, not during it. Exchange rates are published quarterly. The data is public domain and published by the US Department of the Treasury.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000.

## `mode` (type: `string`):

Yield curve gives one row per trading day with every maturity, spreads, inversion flags and changes. Curve change compares today's curve with earlier dates, one row per maturity. Bill rates gives the daily T-bill discount and coupon equivalent rates. Auctions gives one row per Treasury auction with demand statistics. Debt gives the national debt to the penny. Interest rates gives the average rate paid on each class of debt. Exchange rates gives the official quarterly rates used for reporting.

## `lastDays` (type: `integer`):

Collect the last N calendar days. Leave empty for the default of the chosen mode (30 days for rates and debt, 90 days for auctions, 2 years for interest rates). Use 0 for the full history. Ignored when a start date is set.

## `dateFrom` (type: `string`):

First date to collect, written as YYYY-MM-DD, for example 2022-01-01.

## `dateTo` (type: `string`):

Last date to collect, written as YYYY-MM-DD. Leave empty for today. In curve change mode this is the date of the latest curve.

## `sortOrder` (type: `string`):

Newest first is best when you only want the latest rows.

## `includeRealYields` (type: `boolean`):

Yield curve mode only. Adds the inflation protected yields (TIPS) for 5, 7, 10, 20 and 30 years and the breakeven inflation rate for each.

## `comparisons` (type: `array`):

Curve change mode only. Periods to compare the latest curve with, such as 1d, 1w, 1m, 3m, 6m, 1y or 5y. Leave empty for 1d, 1w, 1m, 3m, 6m and 1y.

## `securityTypes` (type: `array`):

Auctions mode only. Keep only these kinds of securities. Leave empty for all.

## `securityTerms` (type: `array`):

Auctions mode only. Keep only these terms, written like the Treasury does, for example 4-Week, 13-Week, 2-Year, 10-Year or 30-Year. Leave empty for all.

## `cusips` (type: `array`):

Auctions mode only. Look up specific securities by their CUSIP code.

## `auctionStatus` (type: `string`):

Completed auctions have results. Upcoming auctions are announced but not held yet, which gives you an auction calendar.

## `securityFilter` (type: `array`):

Interest rates mode only. Keep only classes of debt whose name contains one of these words, for example Treasury Bills, Notes, Bonds or Inflation.

## `currencies` (type: `array`):

Exchange rates mode only. Keep only countries or currencies that contain one of these words, for example Euro, Japan or Canada-Dollar.

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "yieldCurve",
  "sortOrder": "newestFirst",
  "includeRealYields": true,
  "auctionStatus": "completed"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parselab/us-treasury-yield-curve-auctions-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parselab/us-treasury-yield-curve-auctions-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10
}' |
apify call parselab/us-treasury-yield-curve-auctions-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parselab/us-treasury-yield-curve-auctions-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/snb8a0wIVEfRLtWf5/builds/34PKGmBRtBGVWMTcd/openapi.json
