# Realtor.com Agent Leads Scraper (`w3crawler/realtor-agent-leads-scraper`) Actor

Public-page metadata extraction Actor for the inventory entry Realtor.com Agent Leads Scraper.

- **URL**: https://apify.com/w3crawler/realtor-agent-leads-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 agent 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.com Agent Leads Scraper

Extract **public Realtor.com agent directory and profile records** from a city, ZIP code, region, or one approved Realtor.com URL. The Actor reads public JSON-LD, embedded page state, and stable agent-card markup, then saves normalized records with names, profile URLs, public contact details, brokerage, license, location, ratings, reviews, social links, and stable rank and provenance fields. Runs are API-accessible, schedulable, proxy-capable, and monitored through the Apify platform.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/realtor-agent-leads-scraper) and select **Try for free**, or open the **Input** tab.
2. Enter a `location` such as `Austin, TX`, or paste one approved public Realtor.com directory or profile URL into `startUrl`.
3. Keep `maxItems` at 30 and `maxPages` at 1 for the first run. Add `name` to filter the public agent names.
4. Start the Actor and open the dataset. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel. Open **Run summary** (`OUTPUT_SUMMARY`) to check the outcome and counts.

### 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 |
| --- | --- | --- | --- | --- |
| `location` | string | Optional | `"Austin, TX"` | City, ZIP code, or region used to build a public Realtor.com directory route, up to 160 characters. |
| `name` | string | Optional | Not supplied | Case-insensitive filter applied to public agent names, up to 160 characters. |
| `startUrl` | string | Optional | Not supplied | Approved HTTPS Realtor.com directory or profile URL, up to 500 characters. |
| `maxItems` | integer | Optional | `30` | Maximum unique public agent records across visited pages, 1–100. |
| `maxPages` | integer | Optional | `1` | Maximum directory pages to request, 1–5. A profile `startUrl` is fetched once. |
| `requestTimeoutSecs` | integer | Optional | `45` | Timeout for each public page request, 5–120 seconds. |
| `requestDelayMs` | integer | Optional | `150` | Delay between bounded retries after a network or server error, 0–2,000 ms. |
| `maxRequestRetries` | integer | Optional | `1` | Retries only network failures and HTTP 5xx responses, 0–3. Access boundaries are not retried. |
| `includeDiagnostics` | boolean | Optional | `true` | Include the exact four-field diagnostics in the run summary. Diagnostics are never written as dataset rows. |
| `proxyConfiguration` | object | Optional | Not supplied | Standard Apify Proxy settings for public Realtor.com requests. Proxy use does not bypass access controls. |

Full default input:

```json
{
  "location": "Austin, TX",
  "maxItems": 30,
  "maxPages": 1,
  "requestTimeoutSecs": 45,
  "requestDelayMs": 150,
  "maxRequestRetries": 1,
  "includeDiagnostics": true
}
```

Set `startUrl` to a public directory or profile URL to override the location-built route. A profile URL is fetched once even if `maxPages` is higher.

### Output

The dataset contains only **normal agent records**. Diagnostics stay in the run summary, so no diagnostic or placeholder rows are written. Optional fields are omitted when the source does not publish them; values are not inferred.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string enum | Always | Normal-record discriminator; always `realtorAgent`. |
| `recordId` | string | Always | Stable identifier derived from the canonical public profile URL. |
| `sourceUrl` | string | Always | Directory or profile URL requested for the record. |
| `pageUrl` | string | Always | Page URL that produced the record. |
| `profileUrl` | string | Always | Canonical public Realtor.com agent profile URL. |
| `agentName` | string | Always | Public agent or team name. |
| `email` | string | When published | Publicly displayed professional email. |
| `phone` | string | When published | Publicly displayed professional phone. |
| `brokerage` | string | When published | Public brokerage, office, or company name. |
| `licenseNumber` | string | When published | Public license value when exposed. |
| `bio` | string | When published | Public profile biography or description. |
| `location` | string | object | Always | Public location in the source shape, or the input `location` when the page exposes no address. |
| `rating` | number | When published | Public average rating, zero or greater. |
| `reviewCount` | integer | When published | Public review count, zero or greater. |
| `socialLinks` | string array | When published | Bounded public social or profile links exposed by the source. |
| `sourceWebsite` | string | Always | Source provenance; `https://www.realtor.com/`. |
| `locationQuery` | string | Always | Input location used for the run. |
| `resultRank` | integer | Always | Stable 1-based rank within the emitted result set. |
| `scrapedAt` | string | Always | UTC time at which the source response was normalized. |
| `url` | string | Never in this dataset | Diagnostic request URL; diagnostics are summary-only. |
| `error` | string | Never in this dataset | Diagnostic explanation; diagnostics are summary-only. |
| `errorCode` | string | Never in this dataset | Diagnostic code; diagnostics are summary-only. |

Every saved record has at least one of `email`, `phone`, `brokerage`, or `licenseNumber`; records without any verifiable public professional detail are rejected rather than padded with guesses.

#### JSON output

```json
[]
```

No dataset row from a live run is stored in this repository, so an actual saved row cannot be shown without fabricating values. The table above and `.actor/dataset_schema.json` define the record shape. A successful run returns objects such as an agent record with `recordType`, `recordId`, `agentName`, `profileUrl`, provenance, and whatever public contact or brokerage fields the page actually exposes.

### 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. |
| `recordType` | Always `run-summary`. |
| `status` | Run outcome: `SUCCEEDED`, `SUCCEEDED_WITH_DIAGNOSTICS`, `EMPTY`, `BLOCKED`, or `NO_INPUT`. |
| `dataAvailable` | Whether at least one agent record was saved. |
| `agentCount` | Agent records saved. |
| `diagnosticCount` | Diagnostics detected, including ones omitted from the summary payload. |
| `diagnosticsStored` | Diagnostic dataset rows; always `0` because diagnostics are summary-only. |
| `itemsStored` | Dataset rows saved; matches `agentCount`. |
| `diagnostics` | Four-field diagnostics (`url`, `error`, `errorCode`, `scrapedAt`) when `includeDiagnostics` is enabled. |
| `pagesVisited` | Directory or profile pages attempted. |
| `requestsAttempted` | Public requests attempted, including retries. |
| `retryCount` | Retries performed after network or HTTP 5xx failures. |
| `sourceUrls` | Requested page URLs, or the initial source URL when no page was requested. |
| `maxItems` | Agent limit used for the run. |
| `maxPages` | Directory page limit used for the run; a profile URL is still fetched once. |
| `diagnosticsEnabled` | Whether diagnostics were included in the summary. |
| `proxyConfigured` | Whether Apify Proxy was configured. |
| `sourceWebsite` | Source website used for the run. |
| `failedRequestCount` | Failed requests, excluding `NO_PUBLIC_DATA` diagnostics. |
| `failedUrls` | URLs of the failed requests. |
| `blockedReasons` | Error codes for all diagnostics, including `NO_PUBLIC_DATA`. |
| `startedAt` | Run start time in ISO UTC. |
| `completedAt` | Time the summary was written, in ISO UTC. |

| Status | Meaning |
| --- | --- |
| `SUCCEEDED` | Agent records were saved and no diagnostic was detected. |
| `SUCCEEDED_WITH_DIAGNOSTICS` | Agent records were saved, and at least one page or identifier produced a diagnostic. |
| `EMPTY` | No agent record was saved, but at least one non-blocking diagnostic was recorded, such as `NO_PUBLIC_DATA`. |
| `BLOCKED` | No agent record was saved because a request hit a source access boundary, redirect, timeout, or other blocking source failure. |
| `NO_INPUT` | No record and no diagnostic was produced. |

A fatal error exits the run as failed; this Actor does not write a separate `FAILED` summary status. Example `OUTPUT_SUMMARY`:

```json
[]
```

No saved `OUTPUT_SUMMARY` from a live run exists in this repository, so an example summary object is omitted rather than invented. The field table above matches `.actor/key_value_store_schema.json`.

When a live route is blocked and no public snapshot exposes agent records, the summary carries a four-field diagnostic such as:

```json
{
  "url": "https://www.realtor.com/realestateagents/Austin_TX",
  "error": "Realtor.com returned an access boundary (HTTP 429) and no public archive capture exposed agent records.",
  "errorCode": "SOURCE_THROTTLED",
  "scrapedAt": "2026-01-01T00:00:00.000Z"
}
```

### Coverage and limitations

The Actor reads public Realtor.com directory and profile pages. It does not log in, access private dashboards, solve CAPTCHAs, defeat access controls, or invent contact information. Access boundaries such as HTTP 401, 403, or 429 stop the live request and are reported as diagnostics when no public snapshot is available.

When a live page is challenged or yields no parseable records, the Actor may read the public Wayback Machine capture of the same Realtor.com URL. The archive is an independent public snapshot: it does not submit a challenge response, change the live request, or bypass the source's access control. Archived data can be older than the live directory, so ratings, reviews, brokerage, and contact details may reflect the snapshot timestamp.

Records require a public agent name and canonical profile URL plus at least one public professional detail. A page can expose fewer fields than another, and a name filter can reduce results below `maxItems`. If the page publishes no address, `location` falls back to the input `location`; treat it as a query hint, not a verified agent address.

Realtor.com's terms restrict automated collection and may require express written permission. Confirm that you have the necessary permission and that your use complies with those terms before running the Actor. Do not use the output for unauthorized profiling or contact.

### Usage and support

A default directory run:

```json
{
  "location": "Austin, TX",
  "maxItems": 30,
  "maxPages": 1
}
```

A paginated, name-filtered run:

```json
{
  "location": "Austin, TX",
  "name": "Smith",
  "maxItems": 50,
  "maxPages": 3,
  "requestDelayMs": 300
}
```

A directory URL override:

```json
{
  "startUrl": "https://www.realtor.com/realestateagents/Austin_TX",
  "maxItems": 10,
  "maxPages": 1
}
```

A public profile `startUrl` is also accepted; it is always fetched once, regardless of `maxPages`.

Use `proxyConfiguration` only when ordinary Apify Proxy routing is needed. Increase `maxPages` only when you need more agents, and keep `maxItems` small while testing.

Cost depends on Apify compute, the number of page requests, retries, proxy usage, and the Actor resource allocation. Start with one page and a small item limit, inspect the dataset and `OUTPUT_SUMMARY`, then scale gradually. See the Actor's Pricing tab for current account rates.

Use the [Actor Issues page](https://apify.com/w3crawler/realtor-agent-leads-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 Realtor.com or the National Association of Realtors. 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

## `location` (type: `string`):

City, ZIP code, or region used to build a public Realtor.com directory route.

## `name` (type: `string`):

Optional case-insensitive filter applied to public agent names.

## `startUrl` (type: `string`):

Optional HTTPS Realtor.com directory or profile URL.

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

Maximum unique public agent records across visited pages.

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

Maximum directory pages to request. Profile URLs are always fetched once.

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

Timeout for each public page request.

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

Delay between bounded retries after a network or server error.

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

Retries only network failures and HTTP 5xx responses; access boundaries are not retried.

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

Store exact source diagnostics in the Dataset when no record or an access boundary is observed.

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

Optional Apify proxy settings for public Realtor.com requests. Omit it for a direct connection; proxy use does not bypass access controls.

## Actor input object example

```json
{
  "location": "Austin, TX",
  "maxItems": 30,
  "maxPages": 1,
  "requestTimeoutSecs": 45,
  "requestDelayMs": 150,
  "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-agent-leads-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-agent-leads-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-agent-leads-scraper --silent --output-dataset

```

## MCP server setup

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