Home / APIs / Economic data
Economic data

Treasury Yields & Economic Data API: yield curve, CPI, jobs and debt as JSON

Daily Treasury par yields since 1990, national debt, average interest rates, CPI, PPI, unemployment, payrolls, wages and JOLTS in one JSON shape.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/treasury/yield-curve?size=5"
import os, requests

r = requests.get(
    "https://secfeedapi.com/v1/treasury/yield-curve",
    params={'size': '5'},
    headers={"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"},
)
print(r.json())

Overview

Macro numbers sit in flat files, CSV downloads and agency APIs that each have their own layout. This API puts a curated set of headline series behind one shape: a series id, a unit, a frequency and dated values.

Treasury series cover the daily par yield curve for every tenor since 1990, total public debt outstanding and the average interest rate on bills, notes and bonds. Bureau of Labor Statistics series cover CPI-U (headline, core, food, energy, shelter), PPI final demand, unemployment and participation, nonfarm payrolls, average hourly earnings and JOLTS job openings. Filing dates and macro data in one place make it easy to line up an 8-K or a 10-Q with the rates and inflation of that day.

Source: U.S. Department of the Treasury and U.S. Bureau of Labor Statistics, public domain. Values are as published; a later revision replaces the earlier value.

What you get

Built for developers who would rather not parse EDGAR.

Yield curve since 1990

Every tenor per date from one call.

Headline BLS series

CPI, PPI, unemployment, payrolls, wages and JOLTS.

One shape

Series id, unit, frequency and dated values.

Public domain

Treasury and BLS, refreshed daily.

Endpoints

Authenticate with Authorization: Bearer YOUR_KEY. Responses are JSON.

GET/v1/economic/seriesReference →

US economic data series (Treasury yields, debt, CPI, PPI, unemployment, payrolls, wages, JOLTS). Source: U.S. Treasury and Bureau of Labor Statistics, public domain.

Parameters: q (words), source (treasury | bls), size (max 200)

GET/v1/economic/observationsReference →

Dated values of one series. Source: U.S. Treasury and Bureau of Labor Statistics, public domain.

Parameters: series (required) | startDate, endDate, order (asc | desc), size (max 5000)

GET/v1/treasury/yield-curveReference →

Daily Treasury par yield curve since 1990, every tenor per date. Source: U.S. Department of the Treasury, public domain.

Parameters: startDate, endDate, size (max 1000)

Response fields

The main fields in every result. The raw filing data is always one level down.

FieldMeaning
series[].id, name, unit, frequencyWhat the series is, e.g. bls.cusr0000sa0.
series[].firstDate, lastDate, observationsCoverage of the series.
observations[].date, valueOne value per period.
curves[].date, yieldsPar yields in percent keyed by tenor.

Use cases

FAQ

Where does the data come from?

U.S. Treasury (fiscaldata and daily par yield curve) and Bureau of Labor Statistics flat files, public domain.

Is every BLS series included?

No. About 40 headline series. Search /v1/economic/series for what is loaded.

Are GDP and PCE included?

Not yet.

Try the Treasury Yields & Economic Data API free

Free key, no card, no sales call.

Get free API key →