# Freddie Mac Mortgage Rates Scraper (`bigibyte/freddie-mac-mortgage-rates-scraper`) Actor

Pull weekly 30-year, 15-year, and 5-1 ARM mortgage rates and historical data straight from Freddie Mac's public survey. Filter by date, set a row cap, and easily export clean JSON, CSV, or Excel files for housing research and rate tracking

- **URL**: https://apify.com/bigibyte/freddie-mac-mortgage-rates-scraper.md
- **Developed by:** [BigiByte](https://apify.com/bigibyte) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Freddie Mac Mortgage Rates Scraper

![Freddie Mac Mortgage Rates Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/freddie-mac-mortgage-rates-scraper-cover.png)

The **Freddie Mac Mortgage Rates Scraper** collects historical weekly mortgage rate data from Freddie Mac's Primary Mortgage Market Survey (PMMS). Retrieve 30-year fixed, 15-year fixed, and 5/1 adjustable-rate mortgage statistics, including available points, margins, and spreads. Filter records by date and export structured data for housing research, financial analysis, and rate monitoring.

### What This Actor Does

This Actor retrieves Freddie Mac's historical PMMS data and converts the weekly records into a clean, structured dataset.

It processes the historical rate file, applies an optional starting date, removes duplicate records using the date field, and saves the matching weeks up to your selected record limit.

Each record can include mortgage rates, points, margins, and spreads for different loan categories, along with the source URL and collection timestamp.

### Key Features

- **Historical Mortgage Rate Collection:** Retrieve weekly PMMS records from Freddie Mac's historical dataset.
- **Multiple Mortgage Types:** Collect available 30-year fixed, 15-year fixed, and 5/1 ARM statistics.
- **Date Filtering:** Use the `since` parameter to focus on a specific period.
- **Historical Data:** Access records dating back to 1971.
- **Duplicate Prevention:** Avoid repeated weekly records using the date field.
- **Flexible Output Limits:** Control the number of records saved per run.
- **Error Handling:** Record collection failures without unnecessarily interrupting the run.

### Input Configuration

Configure the Actor using the following parameters:

| Parameter | Description | Default |
|---|---|---|
| `mode` | Selects the collection mode. Use `history` for historical PMMS data. | `history` |
| `since` | Optional starting date in `YYYY-MM-DD` format. | No date filter |
| `maxItems` | Maximum number of records to save. | `100` |
| `requestDelayMs` | Delay between requests, in milliseconds. | `1000` |
| `userAgent` | User-agent value used for the request. | `ActorResearch/1.0` |
| `timeoutSecs` | Maximum Actor execution time, in seconds. | `300` |
| `requestTimeoutSecs` | Maximum request wait time, in seconds. | `30` |
| `proxyConfiguration` | Optional proxy configuration. | Disabled |

#### Input Example

```json
{
  "mode": "history",
  "since": "2020-01-01",
  "maxItems": 50,
  "requestDelayMs": 1000,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### Output Data

Each weekly PMMS record is saved as a structured dataset entry.

#### Output Example

```json
{
  "date": "4/2/1971",
  "pmms30": "7.33",
  "pmms30p": "",
  "pmms15": "",
  "pmms15p": "",
  "pmms51": "",
  "pmms51p": "",
  "pmms51m": "",
  "pmms51spread": "",
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

#### Output Fields

| Field | Description |
|---|---|
| `date` | Date associated with the weekly mortgage rate observation. |
| `pmms30` | 30-year fixed mortgage rate. |
| `pmms30p` | Points associated with the 30-year fixed mortgage rate. |
| `pmms15` | 15-year fixed mortgage rate. |
| `pmms15p` | Points associated with the 15-year fixed mortgage rate. |
| `pmms51` | 5/1 adjustable-rate mortgage rate. |
| `pmms51p` | Points associated with the 5/1 ARM rate. |
| `pmms51m` | Margin associated with the 5/1 ARM data. |
| `pmms51spread` | Spread associated with the 5/1 ARM data. |
| `scrapedAt` | Timestamp when the record was collected. |

### Use Cases

- **Mortgage Rate History Research:** Collect decades of weekly mortgage rate observations for long-term analysis.
- **Housing Market Analysis:** Study 30-year and 15-year fixed mortgage rate trends.
- **ARM Comparisons:** Examine available 5/1 ARM rates, points, margins, and spreads over time.
- **Financial Forecasting:** Use historical mortgage rate data in financial models and research notebooks.
- **Housing Dashboards:** Refresh recent mortgage rate records on a schedule and display changes over time.
- **Analyst Reporting:** Export structured PMMS data for reports, spreadsheets, and presentations.

### Usage and Limits

- The Actor supports the `history` mode.
- Historical data comes from Freddie Mac's public PMMS history file.
- Use `since` to filter records from a specific starting date.
- The default output limit is **100 records per run**.
- The maximum output is **1,000 records per run**.
- `maxItems` controls how many matching records are saved.
- The default request delay is approximately 1,000 milliseconds.
- Respect the source's applicable terms and attribution requirements.

### Frequently Asked Questions

**1. What mortgage data does this Actor collect?**

It collects weekly mortgage rate information from Freddie Mac's PMMS, including available 30-year fixed, 15-year fixed, and 5/1 ARM statistics.

**2. How far back does the historical data go?**

The historical dataset includes weekly mortgage rate records dating back to 1971.

**3. Can I collect only recent mortgage rates?**

Yes. Use the `since` parameter with a date such as `2020-01-01` to filter the historical records.

**4. How many records can I collect per run?**

The default limit is 100 records, and the maximum is 1,000 records per run.

**5. Why are some output fields empty?**

Some mortgage statistics were not available for every historical observation. Empty fields indicate that the corresponding values were not provided in the source data.

**6. Can I export the results to Excel or CSV?**

Yes. You can export the collected dataset in JSON, CSV, Excel, and other supported formats.

**7. Can I schedule automatic data collection?**

Yes. Use Apify schedules to periodically refresh the dataset and monitor recent mortgage rate changes.

### Related Tools

Explore other BigiByte data collection tools:

- **Upbit Market Data Scraper** – Collect cryptocurrency market ticker information for financial data analysis.
- **Gate.io Market Data Scraper** – Retrieve spot market prices, bid and ask values, and 24-hour trading statistics.
- **MEXC Market Data Scraper** – Collect cryptocurrency ticker information and 24-hour market statistics.

Looking for a scraper tailored to your business requirements? BigiByte builds custom web scrapers, data extraction tools, and automation solutions to help you collect and organize the data you need.

Visit [BigiByte](https://bigibyte.com) to explore our services.

### Trademark Notice

Freddie Mac and its associated names, logos, and trademarks are the property of their respective owners. They are used solely to identify the source of the collected information. This Actor is an independent product and does not imply any affiliation, sponsorship, or endorsement by Freddie Mac.

### Disclaimer

This Actor is an independent data collection tool, endorsed by, sponsored by, or officially associated with Freddie Mac. The collected information is provided for research and informational purposes. BigiByte does not guarantee the accuracy, completeness, or continued availability of the source data. Mortgage rates can change over time, and historical observations should not be treated as current loan offers or financial advice. Users are responsible for checking the original source and complying with applicable attribution and usage requirements.

### Is Web Scraping Legal?

This Actor extracts publicly accessible information without bypassing login screens, paywalls, or technical security layers. While collecting public web data is widely permitted, compliance depends on how data is gathered and used:

- **Personal Data:** If collected information includes personal data, privacy laws such as GDPR and CCPA may apply. Collect and process such information responsibly.
- **Copyrighted Content:** Some website content may be protected by copyright. Check applicable permissions before reproducing or redistributing it.
- **Platform Terms and Rate Limits:** Respect Freddie Mac's terms of use, applicable restrictions, and attribution requirements.

This information is provided for general guidance only and does not constitute legal advice.

For more information, read Apify's guide: [Is Web Scraping Legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

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

What to scrape. PMMS history returns weekly 30y/15y/5-1 ARM mortgage rates since 1971.

## `since` (type: `string`):

Only keep rows on or after this date (YYYY-MM-DD or M/D/YYYY).

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

Stop after this many successful rows. Hard max is 1000.

## `requestDelayMs` (type: `integer`):

Polite pacing in milliseconds (about 1 request per second by default).

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "history",
  "since": "2020-01-01",
  "maxItems": 100,
  "requestDelayMs": 1000,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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 = {
    "since": "2020-01-01"
};

// Run the Actor and wait for it to finish
const run = await client.actor("bigibyte/freddie-mac-mortgage-rates-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 = { "since": "2020-01-01" }

# Run the Actor and wait for it to finish
run = client.actor("bigibyte/freddie-mac-mortgage-rates-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 '{
  "since": "2020-01-01"
}' |
apify call bigibyte/freddie-mac-mortgage-rates-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bigibyte/freddie-mac-mortgage-rates-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/9KHm6E2FD4JVHg37B/builds/yVIGukVJfUFrYmwBS/openapi.json
