# HUD Foreclosures Properties and Details Scraper (`realestateapi/hud-foreclosures-properties-and-details-scraper`) Actor

Reads qualifying public step-6 HUD REO property rows from the official eGIS layer. Dataset rows contain source-backed properties only; failures are reported in OUTPUT_SUMMARY.

- **URL**: https://apify.com/realestateapi/hud-foreclosures-properties-and-details-scraper.md
- **Developed by:** [Real Estate API](https://apify.com/realestateapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## HUD Foreclosures Properties and Details Scraper

This Actor targets public HUD-owned real-estate-owned (REO) property rows from HUD's official [FHA Single Family REO feature service](https://services.arcgis.com/VTyQ9soqVukalItT/arcgis/rest/services/SF_REO/FeatureServer/0). The default query selects `CASE_STEP_NUMBER = 6`. The older `egis.hud.gov` MapServer host times out from this environment, so the Actor queries HUD's ArcGIS Online publication of the same dataset; no proxy, reader service, credential, or access control is involved. Live verification on 2026-11-13 returned three public case-step-6 California rows that matched the source on case number, address, city, state, ZIP, and acquisition date.

When the service returns a valid feature with a public identifier and at least one source-backed property field, the Actor emits a `hud-foreclosure` dataset row. It maps the public case/address/location fields declared by the Actor: case number, ArcGIS object ID, address, city, state, ZIP, listing status, case step, acquisition date, revitalization area, homeownership-center code, and coordinates. It does not collect owner names, phone numbers, email addresses, broker details, or bidding credentials. Failures, empty responses, malformed rows, and invalid inputs are not emitted as dataset items.

Inputs support a two-letter state code, five-digit ZIP code, bounded result count/offset, timeout, response-size limit, and an optional official HUD query URL. A supplied URL must be `https://services.arcgis.com/VTyQ9soqVukalItT/arcgis/rest/services/SF_REO/FeatureServer/0/query`; any other host or layer path is rejected before a request. The Actor uses one direct HTTPS request with a transparent user-agent. Redirects, challenges, access denials, authentication, credential-bearing URLs, malformed responses, and rows without qualifying property data fail closed into summary evidence. Null, blank, and empty nested values are omitted.

### Run outcomes

A clean bounded response, including a valid empty result, is reported as successful. Errors before any real property row is saved are reported as failed; later errors after saved rows are reported as partial success.

### Output

This Actor represents HUD REO property records from HUD's public ArcGIS feature service. The example below is synthetic and schema-only, not a current HUD listing; `sourceEndpoint` shows the accepted query service.

```json
{
  "recordType": "hud-foreclosure",
  "recordId": "hud-foreclosure:example-001",
  "propertyId": "example-001",
  "caseNumber": "EXAMPLE-CASE-001",
  "title": "Illustrative HUD REO property",
  "address": "Example Street 1",
  "city": "Example City",
  "state": "TX",
  "zipCode": "00000",
  "sourceEndpoint": "https://services.arcgis.com/VTyQ9soqVukalItT/arcgis/rest/services/SF_REO/FeatureServer/0/query",
  "sourceUrl": "https://services.arcgis.com/VTyQ9soqVukalItT/arcgis/rest/services/SF_REO/FeatureServer/0/query",
  "sourceWebsite": "https://www.hud.gov",
  "sourceBacked": true,
  "dataAvailable": true,
  "accessStatus": "source-data",
  "fieldCoverage": [
    "propertyId",
    "title",
    "state"
  ],
  "dataQuality": {
    "recordStatus": "source-backed",
    "nonEmptyFields": 3
  },
  "scrapedAt": "2026-01-15T12:00:00.000Z"
}
```

# Actor input Schema

## `state` (type: `string`):

Optional two-letter state code, such as TX or CA.

## `zipCode` (type: `string`):

Optional five-digit public display ZIP code.

## `sourceUrl` (type: `string`):

Optional official HUD ArcGIS query URL. Only the HUD-published SF_REO FeatureServer/0/query endpoint on services.arcgis.com is accepted; the actor rebuilds bounded public query parameters and rejects other hosts and paths.

## `startUrls` (type: `array`):

Compatibility input; the first official HUD query URL is used when sourceUrl is not supplied.

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

Maximum public property rows to request.

## `offset` (type: `integer`):

Optional bounded ArcGIS result offset.

## `timeoutMs` (type: `integer`):

Maximum time allowed for the direct HUD request.

## `maxResponseBytes` (type: `integer`):

Maximum bytes read from the public HUD ArcGIS response.

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

Retained for compatibility; this actor uses direct HTTPS and ignores proxy settings.

## Actor input object example

```json
{
  "startUrls": [],
  "maxItems": 5,
  "offset": 0,
  "timeoutMs": 30000,
  "maxResponseBytes": 10000000
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

# 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("realestateapi/hud-foreclosures-properties-and-details-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("realestateapi/hud-foreclosures-properties-and-details-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 realestateapi/hud-foreclosures-properties-and-details-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,realestateapi/hud-foreclosures-properties-and-details-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/P0gaS6ogYsAAhIkFF/builds/e1jARZuUUrIh5b4Wo/openapi.json
