# Realtor Zip Code Agent Scraper (`w3crawler/realtor-zip-code-agent-scraper`) Actor

Public-page metadata extraction Actor for the inventory entry Realtor Zip Code Agent Scraper.

- **URL**: https://apify.com/w3crawler/realtor-zip-code-agent-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 local agent 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

## Realtor Zip Code Agent Scraper

Extract public real-estate professional profiles associated with a US ZIP code from Realtor.com agent directories. Supply a ZIP such as `78701`, or approved public directory/profile URLs, and the Actor returns public identity, brokerage, business contact fields, license number, ratings, review counts, and office address when the profile exposes them in a professional context.

### Get started

1. Open the [Actor Store page](https://apify.com/w3crawler/realtor-zip-code-agent-scraper) and select **Try for free** or open the **Input** tab.
2. Set `zipCode`, or supply `startUrls` to override the generated `/realestateagents/{zipCode}` route.
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 |
| --- | --- | --- | --- | --- |
| `zipCode` | string | Optional | `78701` | Five-digit ZIP or ZIP+4 used to build `/realestateagents/{zipCode}` when `startUrls` is empty. |
| `startUrls` | object array | Optional | Not supplied | Public Realtor.com agent-directory or profile URLs; up to 20. These override the generated ZIP route. |
| `maxItems` | integer | Optional | `25` | Maximum unique verified profiles across accepted pages, from 1 to 100. Diagnostics are additional items. |
| `requestTimeoutSecs` | integer | Optional | `45` | Per-page request timeout, from 5 to 120 seconds. |
| `requestDelayMs` | integer | Optional | `500` | Minimum delay before each retry or request, from 0 to 2,000 ms. A public `Retry-After` value is honored up to 30 seconds. |
| `maxRequestRetries` | integer | Optional | `1` | Retries for HTTP 429/5xx and transient network failures, from 0 to 2. Access boundaries remain fail-closed. |
| `includeDiagnostics` | boolean | Optional | `true` | Save an exact four-field diagnostic row when a page is blocked, unavailable, or empty. |
| `proxyConfiguration` | object | Optional | Not supplied | Optional standard Apify Proxy settings for public Realtor.com requests. Leave empty for a direct connection. |

Full default input:

```json
{
  "zipCode": "78701",
  "maxItems": 25,
  "requestTimeoutSecs": 45,
  "requestDelayMs": 500,
  "maxRequestRetries": 1,
  "includeDiagnostics": true
}
```

When `startUrls` is non-empty, it is used instead of the generated ZIP directory route. The Actor reads public Realtor.com HTML with bounded static requests and does not launch a browser.

### Output

The dataset contains one verified public local-agent row per profile, or a four-field diagnostic row when a page is blocked, unavailable, or empty and diagnostics are enabled. A normal row requires identity, profile and ZIP provenance, and at least one professional contact or affiliation field.

| Field | Type | Availability | Meaning |
| --- | --- | --- | --- |
| `recordType` | string | Agent rows (required) | Record type; always `realtor-local-agent`. |
| `recordId` | string | Agent rows (required) | Stable identifier derived from the profile identity. |
| `name` | string | Agent rows (required) | Public agent or team name. |
| `profileUrl` | string | Agent rows (required) | Public Realtor.com agent-profile URL. |
| `brokerage` | string | Agent rows when published | Brokerage or office name. At least one of brokerage, phone, email, or license is required. |
| `phone` | string | Agent rows when published | Public business phone number. |
| `email` | string | Agent rows when published | Public business email address. |
| `licenseNumber` | string | Agent rows when published | Public real-estate license number. |
| `rating` | number | Agent rows when published | Public average client rating. |
| `reviewCount` | integer | Agent rows when published | Number of public reviews. |
| `address` | object or string | Agent rows when published | Office address as `city`, `state`, and `postalCode`, or a single string. |
| `zipCode` | string | Agent rows (required) | ZIP code used for the directory search or recorded with the profile. |
| `sourceUrl` | string | Agent rows (required) | Exact directory or profile URL requested for the record. |
| `pageUrl` | string | Agent rows (required) | Public page URL from which the profile was extracted. |
| `sourceWebsite` | string | Agent rows (required) | Source website; `https://www.realtor.com/`. |
| `resultRank` | integer | Agent rows when published | One-based position in the directory result set. |
| `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 an agent row. This is the real saved row from the 2026-09-09 run:

```json
{
  "url": "https://www.realtor.com/realestateagents/78701",
  "error": "Realtor.com returned an HTTP 429 access boundary.",
  "errorCode": "SOURCE_THROTTLED",
  "scrapedAt": "2026-09-09T06:05:47.845Z"
}
```

An empty run does not prove that the ZIP has no agents; it means no verified agent row was saved.

### 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-zip-code-agent-scraper`. |
| `recordType` | Summary record type; `run-summary`. |
| `status` | Run outcome: `SUCCEEDED`, `SUCCEEDED_WITH_DIAGNOSTICS`, `EMPTY`, `BLOCKED`, `FAILED`, or `NO_INPUT`. |
| `dataAvailable` | Whether at least one agent row was saved. |
| `zipCode` | ZIP code used for the generated directory route. |
| `requestedPages` | Number of directory or profile pages requested. |
| `pagesVisited` | Pages visited. |
| `requestsAttempted` | Requests attempted, including retries. |
| `retryCount` | Retries performed. |
| `agentCount` | Normal agent rows saved. |
| `diagnosticCount` | Operational issues observed. |
| `diagnosticsStored` | Diagnostic rows written. |
| `itemsStored` | All dataset items saved, including diagnostics. |
| `maxItems` | Agent-row limit used for the run. |
| `diagnosticsEnabled` | Whether diagnostics were enabled. |
| `sourceUrls` | Directory or profile URLs used for the run. |
| `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. |

| Status | Meaning |
| --- | --- |
| `SUCCEEDED` | Agent rows were saved without a stored diagnostic. |
| `SUCCEEDED_WITH_DIAGNOSTICS` | Agent rows were saved, and one or more diagnostics were also stored. |
| `EMPTY` | The run completed cleanly and found no matching agent profile. |
| `BLOCKED` | No agent row was saved because the request hit an access barrier or source failure. |
| `NO_INPUT` | No usable ZIP code or start URL resolved to a directory page. |
| `FAILED` | A fatal error occurred before any usable agent row was saved. |

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

```json
{
  "actor": "realtor-zip-code-agent-scraper",
  "recordType": "run-summary",
  "status": "BLOCKED",
  "dataAvailable": false,
  "zipCode": "78701",
  "requestedPages": 1,
  "pagesVisited": 1,
  "requestsAttempted": 1,
  "retryCount": 0,
  "agentCount": 0,
  "diagnosticCount": 1,
  "diagnosticsStored": 1,
  "itemsStored": 1,
  "maxItems": 5,
  "diagnosticsEnabled": true,
  "sourceUrls": [
    "https://www.realtor.com/realestateagents/78701"
  ],
  "failedRequestCount": 1,
  "failedUrls": [
    "https://www.realtor.com/realestateagents/78701"
  ],
  "blockedReasons": [
    "SOURCE_THROTTLED"
  ],
  "proxyConfigured": false,
  "sourceWebsite": "https://www.realtor.com/",
  "startedAt": "2026-09-09T06:05:45.590Z",
  "completedAt": "2026-09-09T06:05:47.862Z"
}
```

### Coverage and limitations

The Actor reads public Realtor.com agent directory and profile pages with bounded static HTML requests. It does not log in to private accounts, launch a browser, solve CAPTCHAs, bypass access controls, or invent contact details. A profile row is saved only when the page supports identity, profile provenance, ZIP provenance, and at least one of brokerage, phone, email, or license.

Throttled, unavailable, redirected, or empty pages produce no agent row. With diagnostics enabled, each failed page produces a four-field diagnostic row; otherwise the failure appears only in `OUTPUT_SUMMARY`. Ratings, review counts, contact details, and office addresses can be absent or outdated. `maxItems` limits agent rows, not stored diagnostics. The saved run for this build was blocked by HTTP 429.

### Usage and support

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

Use the [Actor Issues page](https://apify.com/w3crawler/realtor-zip-code-agent-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. Agent profiles can contain personal information; use the output only for lawful purposes.

# Actor input Schema

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

ZIP code used to build the Realtor.com agent-directory URL when startUrls is empty.

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

Optional public Realtor.com agent directory/profile URLs. These override the generated ZIP route.

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

Maximum number of unique public profile records across supplied URLs.

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

Timeout for each public page request.

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

Minimum delay before each bounded retry or public request; a public Retry-After value is honored up to 30 seconds.

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

Retries HTTP 429/5xx and transient network failures within the configured bound; access boundaries remain fail-closed.

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

Store exact source diagnostics in the Dataset.

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

Optional Apify Proxy configuration for public Realtor.com requests. Leave empty for a direct connection.

## Actor input object example

```json
{
  "zipCode": "78701",
  "maxItems": 25,
  "requestTimeoutSecs": 45,
  "requestDelayMs": 500,
  "maxRequestRetries": 1,
  "includeDiagnostics": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Default dataset.

## `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-zip-code-agent-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-zip-code-agent-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-zip-code-agent-scraper --silent --output-dataset

```

## MCP server setup

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