# Realtor Lead Scraper (`w3crawler/realtor-lead-scraper`) Actor

Extract publicly displayed real-estate professional profile metadata from supplied pages.

- **URL**: https://apify.com/w3crawler/realtor-lead-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 leads

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 Lead Scraper

Collect normalized public real-estate professional profiles from Realtor.com agent-directory and profile pages. Each saved lead keeps the profile URL, name, brokerage, public contact fields, ratings, specialties, service areas, and source timestamps that Realtor.com displays in a professional context. The Actor also writes bounded four-field diagnostics for blocked or empty pages when `includeDiagnostics` is enabled, so a failed page is never presented as a lead.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/realtor-lead-scraper) and select **Try for free** or open the **Input** tab.
2. Add one or more public Realtor.com agent-directory or profile URLs to `startUrls`. The default points to the Austin, TX agent directory.
3. Keep `maxItems` and `maxPages` small for the first run.
4. Start the Actor, open the dataset, and export the saved leads or diagnostics as JSON, CSV, or Excel. Open **Run summary** (`OUTPUT_SUMMARY`) to check the outcome and counts.

### Input

All fields are optional and the defaults below are ready to use. Unsupported field names and out-of-range values are rejected before requests start. A run needs at least one approved Realtor.com agent URL.

| Field | Type | Required? | Default | Meaning |
| --- | --- | --- | --- | --- |
| `startUrls` | object array | Optional | `[{"url":"https://www.realtor.com/realestateagents/Austin_TX"}]` | One to 20 HTTPS Realtor.com agent-directory or profile URLs supplied as `{url}` objects. |
| `maxItems` | integer | Optional | `10` | Maximum unique public professional profiles emitted across all pages, 1–100. |
| `maxPages` | integer | Optional | `1` | Bounded pagination for directory pages, 1–5. |
| `timeoutSecs` | integer | Optional | `30` | Timeout for each public page request, 5–120 seconds. |
| `requestDelayMs` | integer | Optional | `500` | Delay between pages and retries, 0–2,000 ms. HTTP 429 retries also respect the source `Retry-After` signal when present. |
| `maxRequestRetries` | integer | Optional | `1` | Retries transient network errors, HTTP 5xx responses, and HTTP 429 within the configured bound, 0–3. Access challenges remain fail-closed. |
| `includeDiagnostics` | boolean | Optional | `true` | Write exact `{url,error,errorCode,scrapedAt}` rows for blocked, failed, or empty source pages. |
| `proxyConfiguration` | object | Optional | Not supplied | Optional Apify Proxy configuration for ordinary public requests. Proxying does not bypass Realtor.com access controls. |

Default input:

```json
{
  "startUrls": [
    {
      "url": "https://www.realtor.com/realestateagents/Austin_TX"
    }
  ],
  "maxItems": 10,
  "maxPages": 1,
  "timeoutSecs": 30,
  "requestDelayMs": 500,
  "maxRequestRetries": 1,
  "includeDiagnostics": true
}
```

`proxyConfiguration` has no default and is omitted above; supply it only when ordinary proxy routing is needed. Requests are direct by default, bounded, and retried only within `maxRequestRetries`.

### Output

The dataset contains lead records and, when `includeDiagnostics` is enabled, exact four-field diagnostic records. Lead fields are written only when the public page supplies them; no contact detail, rating, or service area is inferred. No placeholder lead rows are created.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string enum | Always on lead rows | Record discriminator; the only lead value is `realtor-lead`. |
| `recordId` | string | Always on lead rows | Stable identifier derived from the approved public profile URL. |
| `sourceUrl` | string | Always on lead rows | Approved Realtor.com URL supplied as the request source. |
| `pageUrl` | string | Always on lead rows | Approved directory or profile page that produced the record. |
| `profileUrl` | string | Always on lead rows | Approved public Realtor.com professional profile URL. |
| `name` | string | Always on lead rows | Publicly displayed professional name. |
| `sourceWebsite` | string | Always on lead rows | Target website that supplied the public record. |
| `scrapedAt` | string | Always on lead rows | UTC time when the lead was normalized. |
| `title` | string | When published | Public role or professional title. |
| `email` | string | When published | Public email address shown in a professional context. |
| `phone` | string | When published | Public phone number shown in a professional context. |
| `brokerage` | string | When published | Public brokerage, office, company, or agency name. |
| `licenseNumber` | string | When published | Public professional license identifier. |
| `bio` | string | When published | Public profile biography or description. |
| `location` | string | When published | Public location or service-area text associated with the professional. |
| `rating` | number | When published | Public professional rating when the source publishes a numeric value. |
| `reviewCount` | integer | When published | Public count of professional reviews, 0 or greater. |
| `specialties` | string array | When published | Publicly displayed professional specialties. |
| `serviceAreas` | string array | When published | Publicly displayed service areas. |
| `socialLinks` | string array | When published | Public social or professional profile links associated with the lead. |
| `website` | string | When published | Public external website link. |
| `agentId` | string | When published | Public source agent identifier. |
| `resultRank` | integer | When published | One-based order of the profile within the parsed source page, 1 or greater. |
| `url` | string | Always on diagnostic rows | Approved source URL associated with a diagnostic. |
| `error` | string | Always on diagnostic rows | Bounded explanation for a blocked, failed, or empty request. |
| `errorCode` | string | Always on diagnostic rows | Stable diagnostic code such as `SOURCE_ACCESS_RESTRICTED`, `NO_LEADS_FOUND`, or `UNTRUSTED_REDIRECT`. |

The example below is the real saved diagnostic row from the 2026-09-09 live QA run. Realtor.com returned an access boundary, so no lead row was saved and no lead example is shown.

```json
{
  "url": "https://www.realtor.com/realestateagents/Austin_TX",
  "error": "The public Realtor.com page returned an access boundary. No login, CAPTCHA solving, or access-control bypass was attempted.",
  "errorCode": "SOURCE_ACCESS_RESTRICTED",
  "scrapedAt": "2026-09-09T05:29:40.914Z"
}
```

A lead row uses the same `scrapedAt` format and adds the required identity fields plus any optional facts the page publishes. An empty dataset means no lead or diagnostic matched the supplied pages; it does not prove that Realtor.com has no agents in that market.

### Run summary

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

| Field | Meaning |
| --- | --- |
| `actor` | Actor slug that produced the summary; `realtor-lead-scraper`. |
| `recordType` | Summary discriminator; `run-summary`. |
| `status` | Terminal state: `SUCCEEDED`, `SUCCEEDED_WITH_DIAGNOSTICS`, `BLOCKED`, `EMPTY`, or `NO_INPUT`. |
| `dataAvailable` | Whether at least one normalized lead was emitted. |
| `leadCount` | Number of normal lead records emitted. |
| `diagnosticCount` | Number of diagnostics observed, including suppressed diagnostics. |
| `diagnosticsStored` | Number of diagnostic rows written to the dataset. |
| `pagesVisited` | Number of source pages attempted. |
| `requestsAttempted` | Total HTTP attempts, including retries. |
| `retryCount` | Number of retries performed. |
| `sourceUrls` | Deduplicated approved source URLs requested for the run. |
| `maxItems` | Global maximum number of normal profiles. |
| `maxPages` | Maximum pages visited per source URL. |
| `diagnosticsEnabled` | Whether observed diagnostics were stored as dataset rows. |
| `proxyConfigured` | Whether the runtime received a proxy configuration. |
| `completedAt` | UTC time when the summary was written. |

| Status | Meaning |
| --- | --- |
| `SUCCEEDED` | Leads were saved and no diagnostic was observed. |
| `SUCCEEDED_WITH_DIAGNOSTICS` | At least one lead was saved and at least one source page produced a diagnostic. |
| `BLOCKED` | No lead was saved because the source returned an access boundary or request failure. |
| `EMPTY` | The source was reachable but produced no recognizable profile and at least one diagnostic was recorded. |
| `NO_INPUT` | No usable source URL was processed. |

Example `OUTPUT_SUMMARY` from the same 2026-09-09 live run:

```json
{
  "actor": "realtor-lead-scraper",
  "recordType": "run-summary",
  "status": "BLOCKED",
  "dataAvailable": false,
  "leadCount": 0,
  "diagnosticCount": 1,
  "diagnosticsStored": 1,
  "pagesVisited": 1,
  "requestsAttempted": 1,
  "retryCount": 0,
  "sourceUrls": [
    "https://www.realtor.com/realestateagents/Austin_TX"
  ],
  "maxItems": 5,
  "maxPages": 1,
  "diagnosticsEnabled": true,
  "proxyConfigured": false,
  "completedAt": "2026-09-09T05:29:40.923Z"
}
```

### Coverage and limitations

The Actor reads public Realtor.com agent-directory and profile pages. It does not log in, solve CAPTCHAs, bypass access controls, infer contact details, or merge private data. A blocked, unavailable, or empty page produces a truthful run summary and, when enabled, a bounded diagnostic row instead of a fabricated lead.

Directory layout, pagination markup, and profile fields can change. `maxItems` caps unique profiles across all supplied pages, and `maxPages` bounds pagination per source URL. Optional values are omitted when the source does not publish them. A blocked or partial response is reported in `OUTPUT_SUMMARY`; it is not converted into a lead. Proxy routing does not guarantee access.

### Usage and support

Cost grows with the number of source pages, retries, request duration, and proxy traffic. Start with one directory URL, `maxItems` of 5–10, and `maxPages: 1`, then inspect the dataset and `OUTPUT_SUMMARY` before scaling.

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

# Actor input Schema

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

One to 20 HTTPS Realtor.com agent-directory or profile URLs supplied as {url} objects.

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

Maximum unique public professional profiles emitted across all pages.

## `maxPages` (type: `integer`):

Bounded pagination for directory pages.

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

Timeout for each public page request.

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

Bounded delay between pages and retries; HTTP 429 retries also respect the source Retry-After signal when present.

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

Retries transient network errors, HTTP 5xx responses, and HTTP 429 once within the configured bound; access challenges remain fail-closed.

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

Store exact {url,error,errorCode,scrapedAt} rows for blocked, failed, or empty source pages.

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

Optional Apify Proxy configuration for ordinary public requests. Proxying does not bypass Realtor.com access controls.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.realtor.com/realestateagents/Austin_TX"
    }
  ],
  "maxItems": 10,
  "maxPages": 1,
  "timeoutSecs": 30,
  "requestDelayMs": 500,
  "maxRequestRetries": 1,
  "includeDiagnostics": true
}
```

# Actor output Schema

## `dataset` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/realtor-lead-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("w3crawler/realtor-lead-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 w3crawler/realtor-lead-scraper --silent --output-dataset

```

## MCP server setup

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