Treasury Yields API - US Yield Curve, Daily Rates, History avatar

Treasury Yields API - US Yield Curve, Daily Rates, History

Pricing

from $0.70 / 1,000 results

Go to Apify Store
Treasury Yields API - US Yield Curve, Daily Rates, History

Treasury Yields API - US Yield Curve, Daily Rates, History

No API key. Official US Treasury yields as clean JSON: daily par yield curve 1M-30Y since 1990, real yields (TIPS), T-bill and long-term rates, 10Y-2Y / 10Y-3M / 30Y-5Y / 2Y-3M spreads with inversion flags, 1-day change in basis points, history by day, week or month, and the inversion periods with s

Pricing

from $0.70 / 1,000 results

Rating

0.0

(0)

Developer

Martin Petrov

Martin Petrov

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 hours ago

Last modified

Features

Limited permissions

Share

Problem: your fintech dashboard, mortgage or loan calculator, bond tool or AI agent needs today's US Treasury yields, the 10Y-2Y spread or the yield curve on a past date. Treasury publishes the numbers as one HTML/CSV page per year with columns that change over time (no 1-month bill before 2001, 4-month since 2022, 1.5-month since 2025), and it is often slow to load.

This API: one JSON call, no API key, answers from a maintained copy of the official files.

  • Curves: nominal par yield curve 1M to 30Y (since 1990), real yield curve / TIPS 5Y-30Y (since 2003), T-bill rates (bank discount and coupon equivalent, since 2002), long-term composite and 20Y CMT (since 2000).
  • Spreads: 10Y-2Y, 10Y-3M, 30Y-5Y, 2Y-3M in percentage points, plus inverted10y2y / inverted10y3m flags.
  • Change: change1d = basis-point change of every maturity versus the previous business day.
  • Modes: latest, date (a holiday or weekend returns the previous business day and keeps requestedDate), history (daily, weekly or monthly), spreads, and inversion = every period when 10Y-2Y or 10Y-3M was below zero, with start, end, length and the deepest point.
  • Source: U.S. Department of the Treasury daily interest rate data (public domain). Every row carries source and sourceUrl.

Example (API)

curl -X POST "https://api.apify.com/v2/acts/martin10291~treasury-yields-api/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode": "latest"}'

Output row (measured 2026-11-13):

{"date": "2026-11-12", "curve": "nominal",
"yields": {"1M": 4.12, "3M": 4.32, "6M": 4.42, "1Y": 4.65, "2Y": 4.86, "5Y": 4.95, "10Y": 5.1, "20Y": 5.48, "30Y": 5.43},
"spreads": {"10Y-2Y": 0.24, "10Y-3M": 0.78, "30Y-5Y": 0.48, "2Y-3M": 0.54},
"inverted10y2y": false, "inverted10y3m": false,
"change1d": {"2Y": 13, "10Y": 12, "30Y": 8},
"source": "U.S. Treasury, Daily Treasury Par Yield Curve Rates", "unit": "percent"}

Inversion periods 2022-2024 ({"mode": "inversion", "startDate": "2022-01-01", "endDate": "2024-12-31"}):

{"spread": "10Y-2Y", "start": "2022-07-06", "end": "2024-08-26", "days": 783, "tradingDays": 537, "minSpread": -1.08, "minSpreadDate": "2023-07-03"}

More inputs:

  • {"mode": "date", "date": "2026-11-11"} -> curve of 2026-11-10 (11-11 was a federal holiday), requestedDate kept.
  • {"mode": "history", "startDate": "2020-01-01", "endDate": "2026-11-12", "maturities": ["2Y", "10Y"], "frequency": "monthly"}
  • {"mode": "latest", "curve": "real"} -> TIPS real yields.

Use from agents (MCP)

Add the Apify MCP server (https://mcp.apify.com?tools=martin10291/treasury-yields-api) to Claude, Cursor or any MCP client and ask: "What is the 10Y-2Y Treasury spread today and how did it change this month?".

Schedule it

Set onlyNew: true and a monitorId, schedule the actor once per business day (after 18:00 New York time): each run returns only the new Treasury business days since the last run.

Input

FieldMeaning
modelatest (default), date, history, spreads, inversion
curvenominal (default), real, bills, longterm
dateYYYY-MM-DD for mode date
startDate, endDaterange for history / spreads / inversion (default last 30 days, max 40 years)
maturitiesoptional filter, e.g. ["3M","2Y","10Y"]
frequencydaily, weekly (last business day of the week), monthly
limitmax rows, default 1000 (newest kept)
onlyNew, monitorIdreturn only new business days per watch

Honest limits

  • Treasury publishes once per business day (usually 15:30-18:00 New York time); there is no intraday data.
  • Values are exactly as published (percent, 2 decimals). Columns that did not exist in a year (e.g. 1M before 2001, 20Y in 1987-1993, 30Y in 2002-2006) are null, never invented.
  • Spreads and inversions are computed on the nominal curve only.
  • A cold history call on Apify may take up to ~20 s per uncached year because the Treasury files load slowly; marketplace calls (RapidAPI, API.market) answer from our cache in milliseconds.

FAQ

Is this an official Treasury product? No. It republishes official U.S. Treasury data, which is public domain; the source page is in every row. Do I need a key? Only your Apify token (or the marketplace key on RapidAPI / API.market).