# Fhfa House Price Index Scraper (`b2b_lead_generation/fhfa-house-price-index-scraper`) Actor

Pull public FHFA house price index master data effortlessly. Filter by geography or level, cap your item rows, and export clean housing market research datasets in JSON, CSV, or Excel

- **URL**: https://apify.com/b2b_lead_generation/fhfa-house-price-index-scraper.md
- **Developed by:** [B2B Lead Generation](https://apify.com/b2b_lead_generation) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 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

## FHFA House Price Index Scraper

![FHFA House Price Index Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/fhfa-house-price-index-scraper-cover.png)

Collect Federal Housing Finance Agency (FHFA) House Price Index (HPI) data for US housing market research. Retrieve monthly index records, filter by geographic area or data level, and organize the results into a structured dataset. Export collected records in JSON, CSV, Excel, and other supported formats.

### What It Does

This actor collects FHFA's publicly available HPI master data and saves individual index records as dataset entries.

You can filter records by `placeName` and `level` to focus on specific geographic areas. Each record includes information about the index type, data frequency, location, reporting period, index values, and available notes.

Duplicate records are removed using a hash of their row fields. Use `maxItems` to control the number of matching records returned.

### Mode

- **HPI Master File (`master`)**: Collects FHFA HPI series with optional geographic and data-level filters.

### Input Example

```json
{
  "mode": "master",
  "placeName": "East North Central Division",
  "level": "USA or Census Division",
  "maxItems": 50,
  "requestDelayMs": 1000,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `master` | Select the HPI master data collection mode. |
| `placeName` | string | Not specified | Filter records by geographic place name. |
| `level` | string | Not specified | Filter records by geographic or data level. |
| `maxItems` | integer | `100` | Maximum number of matching records to return. |
| `requestDelayMs` | integer | `1000` | Delay between requests in milliseconds. |
| `userAgent` | string | `ActorResearch/1.0` | HTTP User-Agent value. |
| `timeoutSecs` | integer | `300` | Overall run timeout in seconds. |
| `requestTimeoutSecs` | integer | `30` | Individual request timeout in seconds. |
| `proxyConfiguration` | object | Proxy off | Optional proxy configuration. |

### Output Example

```json
{
  "hpi_type": "traditional",
  "hpi_flavor": "purchase-only",
  "frequency": "monthly",
  "level": "USA or Census Division",
  "place_name": "East North Central Division",
  "place_id": "DV_ENC",
  "yr": "1991",
  "period": "1",
  "index_nsa": "100.00",
  "index_sa": "100.00",
  "scrapedAt": "2026-10-26T00:00:00+00:00",
}
```

### Output Fields

| Field | Description |
|---|---|
| `hpi_type` | HPI series type. |
| `hpi_flavor` | HPI data category. |
| `frequency` | Reporting frequency. |
| `level` | Geographic or data level. |
| `place_name` | Geographic place name. |
| `place_id` | Geographic place identifier. |
| `yr` | Reporting year. |
| `period` | Reporting period. |
| `index_nsa` | Non-seasonally adjusted index value. |
| `index_sa` | Seasonally adjusted index value. |
| `scrapedAt` | Date and time the record was collected. |

### Use Cases

- **Housing Market Research:** Analyze FHFA house price index records for US housing market studies.
- **Regional Comparisons:** Compare index values across census divisions and metropolitan areas.
- **Forecasting Models:** Use purchase-only or expanded HPI series as inputs for housing market analysis.
- **Market Dashboards:** Refresh geographic HPI datasets for ongoing market monitoring.
- **Research and Reporting:** Export structured index records for spreadsheets, reports, and analytical workflows.

### Frequently Asked Questions

**Who can use this actor?**

It is useful for housing analysts, economists, researchers, and developers working with US house price index data.

**Can I filter records by location?**

Yes. Use `placeName` to select a geographic area, such as `East North Central Division`.

**What does the `level` parameter do?**

It filters records by the selected geographic or data level. The example uses `USA or Census Division`.

**What index information is included?**

Records can include HPI type, flavor, frequency, geographic details, reporting periods, seasonally adjusted and non-seasonally adjusted index values, and available notes.

**Can I run the actor on a schedule?**

Yes. Configure an Apify schedule to refresh selected geographic datasets periodically.

**Which export formats are supported?**

You can export the dataset as JSON, CSV, Excel, and other supported Apify dataset formats.

### Trademark Notice

FHFA and related names are mentioned only to identify the source of the collected information. Their names and trademarks belong to their respective owners. This actor is independent and is not affiliated with or endorsed by FHFA.

### Is Web Scraping Legal?

This actor collects publicly accessible FHFA house price index data without bypassing login screens, paywalls, or technical security measures. How collected information can be used depends on applicable laws and the source website's policies.

- **Personal Data:** HPI records primarily contain housing market statistics rather than individual personal information. If additional collected information includes personal data, handle it responsibly and consider applicable privacy laws, including GDPR and CCPA.
- **Copyright and Licensing:** Published index values are factual data, but associated documentation and other creative materials may have separate copyright protections. Check applicable FHFA reuse and attribution requirements before redistributing collected information.
- **Platform Terms and Rate Limits:** Respect FHFA policies, applicable terms, and request limits. Keep collection activity reasonable.
- **Disclaimer:** This information is general guidance, not legal advice. Consult a qualified professional if you need advice about your intended use.

For more information, read [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

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

What to scrape. HPI master file returns all FHFA HPI series from the public monthly master CSV.

## `placeName` (type: `string`):

Optional case-insensitive filter on place_name (e.g. East North Central Division).

## `level` (type: `string`):

Optional case-insensitive filter on level (e.g. USA or Census Division).

## `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": "master",
  "placeName": "East North Central Division",
  "level": "USA or Census Division",
  "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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_lead_generation/fhfa-house-price-index-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("b2b_lead_generation/fhfa-house-price-index-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 '{}' |
apify call b2b_lead_generation/fhfa-house-price-index-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_lead_generation/fhfa-house-price-index-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/LgviWcJPZ53cTsM8p/builds/0hyftZFuUF3NICPPR/openapi.json
