Freddie Mac API: Get mortgage rates
Returns Freddie Mac's U.S. 30-year and 15-year fixed mortgage rates for the latest survey or a chosen date, with weekly and year-ago changes, and optionally a weekly history for a date range.
Unofficial. Not affiliated with or endorsed by Freddie Mac.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Date optional
date Survey week on or before this date (YYYY-MM-DD); defaults to the latest survey.
2026-09-22
- End Date optional
end_date Last date to include in weekly history (YYYY-MM-DD); defaults to today when start_date is set.
2025-10-31
- Start Date optional
start_date First date to include in weekly history (YYYY-MM-DD); defaults to the earliest available survey when end_date is set.
2025-09-01
Input as JSON
{ "date": "2026-09-22", "end_date": "2025-10-31", "start_date": "2025-09-01"}Output
{ "page_url": "https://www.freddiemac.com/pmms/pmms_archives" , "survey_date": "2026-09-17", "weekly_history": [ { "page_url": "https://www.freddiemac.com/pmms/pmms_archives" , "survey_date": "2025-10-30", "rate_15_year_percent": 5.41, "rate_30_year_percent": 6.17 }, { "page_url": "https://www.freddiemac.com/pmms/pmms_archives" , "survey_date": "2025-10-23", "rate_15_year_percent": 5.44, "rate_30_year_percent": 6.19 }, { "page_url": "https://www.freddiemac.com/pmms/pmms_archives" , "survey_date": "2025-10-16", "rate_15_year_percent": 5.52, "rate_30_year_percent": 6.27 } ], "rate_15_year_percent": 6.26, "rate_30_year_percent": 6.95, "change_15_year_year_ago_points": 0.85, "change_30_year_year_ago_points": 0.69, "change_15_year_previous_week_points": 0.17, "change_30_year_previous_week_points": 0.19}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"freddiemac.com/get_mortgage_rates","input":{"date":"2026-09-22","end_date":"2025-10-31","start_date":"2025-09-01"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "freddiemac.com/get_mortgage_rates" , "input": { "date": "2026-09-22", "end_date": "2025-10-31", "start_date": "2025-09-01" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "freddiemac.com/get_mortgage_rates" , "input": { "date": "2026-09-22", "end_date": "2025-10-31", "start_date": "2025-09-01" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run freddiemac.com/get_mortgage_rates# with {"date":"2026-09-22","end_date":"2025-10-31","start_date":"2025-09-01"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "properties": { "date": { "type": "string", "examples": [ "2026-09-24" ], "description": "Survey week on or before this date (YYYY-MM-DD); defaults to the latest survey." }, "end_date": { "type": "string", "examples": [ "2025-10-31" ], "description": "Last date to include in weekly history (YYYY-MM-DD); defaults to today when start_date is set." }, "start_date": { "type": "string", "examples": [ "2025-09-01" ], "description": "First date to include in weekly history (YYYY-MM-DD); defaults to the earliest available survey when end_date is set." } }}Output schema
{ "type": "object", "required": [ "survey_date", "rate_30_year_percent", "rate_15_year_percent", "page_url", "change_30_year_previous_week_points", "change_15_year_previous_week_points", "change_30_year_year_ago_points", "change_15_year_year_ago_points", "weekly_history" ], "properties": { "page_url": { "type": "string", "format": "uri" }, "survey_date": { "type": "string", "format": "date" }, "weekly_history": { "type": "array", "items": { "type": "object", "required": [ "survey_date", "rate_30_year_percent", "rate_15_year_percent", "page_url" ], "properties": { "page_url": { "type": "string", "format": "uri" }, "survey_date": { "type": "string", "format": "date" }, "rate_15_year_percent": { "type": [ "number", "null" ] }, "rate_30_year_percent": { "type": "number", "description": "Average fixed mortgage rate in percent (for example, 6.35 means 6.35%)." } }, "additionalProperties": false }, "description": "Weekly survey results, newest first, within the requested date range; up to 520 weeks. Empty if no range was requested." }, "rate_15_year_percent": { "type": [ "number", "null" ] }, "rate_30_year_percent": { "type": "number", "description": "Average fixed mortgage rate in percent (for example, 6.35 means 6.35%)." }, "change_15_year_year_ago_points": { "type": [ "number", "null" ] }, "change_30_year_year_ago_points": { "type": [ "number", "null" ] }, "change_15_year_previous_week_points": { "type": [ "number", "null" ] }, "change_30_year_previous_week_points": { "type": [ "number", "null" ] } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
freddiemac.com/get_mortgage_rates- Returns
- survey date, 30-year and 15-year rates, weekly and year-ago changes, optional weekly history
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method freddiemac.com/get_mortgage_rates with the inputs above.
Ask your agent
- What is the current 30-year fixed mortgage rate from Freddie Mac this week?
- Show me the 15-year fixed rate for the survey week of 2026-09-24 and how it changed from last week.
- How have 30-year mortgage rates moved over the year, with weekly history from 2025-09-01 to 2025-10-31?
- Compare today's average 15-year and 30-year fixed rates with the same week a year ago on freddiemac.com.
- I need the Freddie Mac weekly mortgage rate survey as of 2026-06-15, including year-over-year change.
See more
Gets Bankrate's published mortgage or refinance interest rates and APRs by loan type, with the as-of date of the rate table. A ZIP code or state picks the matching state page; Bankrate describes these tables as national averages. Weekly changes are included only when Bankrate publishes a matching change.
bankrate.com/get_mortgage_ratesGets a public FRED economic series by plain name or series ID, with its observations, latest value and source details.
fred.stlouisfed.org/get_economic_indicatorSearches FRED economic series by topic, ordered by popularity, and returns each series' coverage dates, units, frequency and last update. FRED does not publish a popularity score on these pages, so it is null.
fred.stlouisfed.org/search_indicatorsGets official daily Treasury par yield curve rates for a date, or the latest published date on or before it.
home.treasury.gov/get_treasury_yieldsReturns Yahoo Finance daily, weekly or monthly price history and total adjusted-close return for a stock, fund, index or cryptocurrency.
finance.yahoo.com/get_price_historyGets the U.S. Treasury quarterly reporting exchange rate for a country or currency on a given date. If that quarter has no published record, it uses the latest preceding quarter.
treasury.gov/get_reporting_exchange_ratesGets decades of yearly commodity or stock-index price history from Macrotrends: yearly average, open, high, low, close, annual change and inflation-adjusted value for gold, silver, crude oil, natural gas, copper, Dow Jones, S&P 500 and Nasdaq. The current year may be incomplete.
macrotrends.net/get_long_term_price_historyLists Bankrate's current high-yield savings, CD (for a chosen term) or money market account rates in Bankrate's listed order, with APY, minimum deposit and whether the listing is sponsored.
bankrate.com/list_best_savings_rates