# Realtor Sales History Scraper (`w3crawler/realtor-sales-history-scraper`) Actor

Extract publicly visible Realtor.com property details, sold events, dates, prices, and property characteristics.

- **URL**: https://apify.com/w3crawler/realtor-sales-history-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (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 sales histories

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

## Realtor Sales History Scraper

Extract public property and sales-history records from Realtor.com search and property-detail pages. The Actor reads public HTML and JSON-LD, verifies property identity, address, list or sold price evidence, property facts, sale events, description, and images, and rejects records that cannot be verified. Each saved property row includes provenance and a normalization timestamp.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/realtor-sales-history-scraper) and select **Try for free** or open the **Input** tab.
2. Supply property-search, for-sale-search, or property-detail `startUrls` and set `maxItems`.
3. Keep `maxItems` and the request limits small for the first run. Leave `includeDiagnostics` enabled to record blocked or empty pages.
4. Start the Actor, open the dataset, and export the rows as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT_SUMMARY`) to check the outcome.

### Input

All fields are optional; the defaults below are ready to use. Unsupported field names and out-of-range values are rejected before requests start.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `startUrls` | object array | Optional | `[{"url":"https://www.realtor.com/realestateforsale"}]` | Public Realtor.com property-search, for-sale-search, or property-detail URLs; up to 20. |
| `maxItems` | integer | Optional | `10` | Maximum normal property records to emit, from 1 to 100. Stored diagnostics are additional items. |
| `includeDescription` | boolean | Optional | `true` | Include publicly visible property description text. |
| `includeDiagnostics` | boolean | Optional | `true` | Save an exact four-field diagnostic row when a page is blocked, unavailable, or empty. |
| `timeoutSecs` | integer | Optional | `45` | Per-page timeout, from 5 to 180 seconds. |
| `requestDelayMs` | integer | Optional | `500` | Minimum delay before a bounded retry, from 0 to 2,000 ms. |
| `maxRequestRetries` | integer | Optional | `1` | Bounded retries for HTTP 429/5xx or transient request errors, from 0 to 2. Access controls are not bypassed. |
| `proxyConfiguration` | object | Optional | Not supplied | Optional standard Apify Proxy settings for public Realtor.com requests. |

Full default input:

```json
{
  "startUrls": [
    {
      "url": "https://www.realtor.com/realestateforsale"
    }
  ],
  "maxItems": 10,
  "includeDescription": true,
  "includeDiagnostics": true,
  "timeoutSecs": 45,
  "requestDelayMs": 500,
  "maxRequestRetries": 1
}
```

The Actor reads public Realtor.com HTML and JSON-LD and does not call a private endpoint directly. It stops on rate limits, redirects outside the approved path, and access challenges.

### Output

The dataset contains one property row per verified record, or a four-field diagnostic row when a page is blocked, unavailable, or empty and diagnostics are enabled. A property row must include source evidence for at least one of `listPrice`, `soldPrice`, or `salesHistory`; optional facts are omitted when absent.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string | Property rows (required) | Record type for a property/sales-history row. |
| `recordId` | string | Property rows (required) | Stable identifier derived from the property identity. |
| `propertyId` | string | Property rows when published | Source property identifier. |
| `propertyName` | string | Property rows (required) | Public property name or formatted address. |
| `address` | string | Property rows (required) | Full public property address. |
| `city` | string | Property rows when published | City. |
| `state` | string | Property rows when published | State or region code. |
| `postalCode` | string | Property rows when published | ZIP or postal code. |
| `propertyUrl` | string | Property rows (required) | Public property-detail URL. |
| `propertyType` | string | Property rows when published | Property type, such as residence or condo. |
| `beds` | number | Property rows when published | Bedroom count. |
| `baths` | number | Property rows when published | Bathroom count. |
| `livingAreaSqft` | number | Property rows when published | Living area in square feet. |
| `lotSizeSqft` | number | Property rows when published | Lot size in square feet. |
| `yearBuilt` | integer | Property rows when published | Year the property was built. |
| `listPrice` | number | Property rows when published | Public list price. |
| `soldPrice` | number | Property rows when published | Public sold price. |
| `soldDate` | string | Property rows when published | Public sold date. |
| `pricePerSqft` | number | Property rows when published | Price per square foot when published or derivable from published values. |
| `salesHistory` | object array | Property rows when published | Sale events with `date`, `event`, `price`, and `source` fields. |
| `description` | string | Property rows when published | Public description; omitted when `includeDescription` is false. |
| `images` | string array | Property rows when published | Public property image URLs. |
| `sourceUrl` | string | Property rows (required) | Search or detail URL used for the property record. |
| `sourcePageUrl` | string | Property rows when published | Public page that referenced the record. |
| `sourceWebsite` | string | Property rows (required) | Source website; `https://www.realtor.com/`. |
| `scrapedAt` | string | All saved rows | Time the row was saved, in ISO UTC. |
| `url` | string | Diagnostic rows (required) | Public URL whose request or extraction failed. |
| `error` | string | Diagnostic rows (required) | Bounded error message. |
| `errorCode` | string | Diagnostic rows (required) | Stable failure code, such as `SOURCE_THROTTLED`. |

The saved runs for this build contain only a diagnostic row, not a property row. This is the real saved row from the 2026-09-09 run:

```json
{
  "url": "https://www.realtor.com/realestateandhomes-search/New-York_NY",
  "error": "Realtor.com returned an HTTP 429 access boundary.",
  "errorCode": "SOURCE_THROTTLED",
  "scrapedAt": "2026-09-09T05:58:55.162Z"
}
```

A normal property row would include `recordType`, `recordId`, `propertyName`, `address`, `propertyUrl`, `sourceUrl`, `sourceWebsite`, `scrapedAt`, and at least one of `listPrice`, `soldPrice`, or `salesHistory`.

### Run summary

**Run summary** is stored separately from the dataset in the run's key-value store under `OUTPUT_SUMMARY`.

| Field | Meaning |
| --- | --- |
| `actor` | Actor name, `realtor-sales-history-scraper`. |
| `recordType` | Summary record type; `run-summary`. |
| `status` | Run outcome: `SUCCEEDED`, `SUCCEEDED_WITH_DIAGNOSTICS`, `EMPTY`, `BLOCKED`, or `FAILED`. |
| `dataAvailable` | Whether at least one property row was saved. |
| `requestedPages` | Number of source pages requested. |
| `sourceUrls` | Source URLs used for the run. |
| `pagesVisited` | Pages visited. |
| `requestsAttempted` | Requests attempted, including retries. |
| `retryCount` | Retries performed. |
| `itemCount` | All dataset items saved, including diagnostics. |
| `recordsStored` | Complete property records saved. |
| `propertyCount` | Property records saved. |
| `diagnosticCount` | Operational issues observed. |
| `diagnosticsStored` | Diagnostic rows written. |
| `diagnosticsEnabled` | Whether diagnostics were enabled. |
| `maxItems` | Property-row limit used for the run. |
| `includeDescription` | Whether description extraction was enabled. |
| `timeoutSecs` | Per-page timeout used for the run. |
| `diagnosticReasons` | Reason codes for stored diagnostics. |
| `failures` | Bounded objects with `url` and `errorCode` for failed requests. |
| `failedRequestCount` | Requests that failed. |
| `failedUrls` | Public URLs that failed. |
| `blockedReasons` | Reason codes for access barriers or source failures. |
| `proxyConfigured` | Whether proxy routing was configured. |
| `sourceWebsite` | Source website label, `https://www.realtor.com/`. |
| `startedAt` | Run start time, in ISO UTC. |
| `completedAt` | Time the summary was written, in ISO UTC. |
| `error` | Bounded fatal-error message when the run failed. |

| Status | Meaning |
| --- | --- |
| `SUCCEEDED` | Property rows were saved without a stored diagnostic. |
| `SUCCEEDED_WITH_DIAGNOSTICS` | Property rows were saved, and one or more diagnostics were also stored. |
| `EMPTY` | The run completed cleanly and found no matching property record. |
| `BLOCKED` | No property row was saved because the request hit an access barrier or source failure. |
| `FAILED` | A fatal error occurred before any usable property row was saved. |

Example `OUTPUT_SUMMARY` from the saved 2026-09-09 run:

```json
{
  "actor": "realtor-sales-history-scraper",
  "recordType": "run-summary",
  "status": "BLOCKED",
  "dataAvailable": false,
  "requestedPages": 1,
  "sourceUrls": [
    "https://www.realtor.com/realestateandhomes-search/New-York_NY"
  ],
  "pagesVisited": 1,
  "requestsAttempted": 1,
  "retryCount": 0,
  "itemCount": 1,
  "recordsStored": 0,
  "propertyCount": 0,
  "diagnosticCount": 1,
  "diagnosticsStored": 1,
  "diagnosticsEnabled": true,
  "maxItems": 1,
  "includeDescription": true,
  "timeoutSecs": 45,
  "diagnosticReasons": [
    "SOURCE_THROTTLED"
  ],
  "failures": [
    {
      "url": "https://www.realtor.com/realestateandhomes-search/New-York_NY",
      "errorCode": "SOURCE_THROTTLED"
    }
  ],
  "failedRequestCount": 1,
  "failedUrls": [
    "https://www.realtor.com/realestateandhomes-search/New-York_NY"
  ],
  "blockedReasons": [
    "SOURCE_THROTTLED"
  ],
  "proxyConfigured": false,
  "sourceWebsite": "https://www.realtor.com/",
  "startedAt": "2026-09-09T05:58:54.698Z",
  "completedAt": "2026-09-09T05:58:55.168Z"
}
```

### Coverage and limitations

The Actor reads public Realtor.com HTML and JSON-LD and does not call a private endpoint directly. It does not log in, bypass access controls, solve CAPTCHAs, spoof fingerprints, or infer a sale that the page does not publish. A property row is emitted only when the source supports identity, address, provenance, and at least one of list price, sold price, or sale history.

A throttled, redirected, challenged, or unrecognized page produces no property row. With diagnostics enabled, each failed page produces a four-field diagnostic row; otherwise the failure appears only in `OUTPUT_SUMMARY`. Sales history can be incomplete or revised by the source, and the saved run for this build contains no property row because the request was blocked with HTTP 429.

### Usage and support

Cost depends on Apify compute, pages requested, retries, optional proxy traffic, and rows written. Start with one search page and a small `maxItems`; inspect `OUTPUT_SUMMARY` for `BLOCKED`, `EMPTY`, or `PARTIAL` outcomes before scaling. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/realtor-sales-history-scraper/issues) to report a problem. Include the run ID, the input used, and `OUTPUT_SUMMARY`; do not include tokens, cookies, or private data. This Actor is an independent community implementation and is not affiliated with, endorsed by, or sponsored by Realtor.com. Use it only for public data and in accordance with the source's terms, robots guidance, and applicable law. Public property records can contain personal information; use the output only for lawful purposes.

# Actor input Schema

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

Public Realtor.com property-search, for-sale-search, or property-detail URLs.

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

Maximum property records emitted.

## `includeDescription` (type: `boolean`):

Include publicly visible property description text.

## `includeDiagnostics` (type: `boolean`):

Store exact four-field source diagnostics when a public page is blocked or empty.

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

Maximum wait per public page request.

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

Minimum delay before a bounded retry after a transient public-source response; keep request volume low.

## `maxRequestRetries` (type: `integer`):

Bounded retries for HTTP 429/5xx or transient request errors; access controls are never bypassed.

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

Optional proxy settings for ordinary public Realtor.com connectivity.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.realtor.com/realestateforsale"
    }
  ],
  "maxItems": 10,
  "includeDescription": true,
  "includeDiagnostics": true,
  "timeoutSecs": 45,
  "requestDelayMs": 500,
  "maxRequestRetries": 1,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `keyValueStore` (type: `string`):

No description

## `runSummary` (type: `string`):

Run status and counters stored by the Actor.

# 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 = {
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/realtor-sales-history-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 = { "proxyConfiguration": { "useApifyProxy": False } }

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/realtor-sales-history-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 '{
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call w3crawler/realtor-sales-history-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/realtor-sales-history-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/wqnKeNCHrDUXsbZZs/builds/IPlLcw09KyROaIMgY/openapi.json
