# realtor.com Agents Scraper (`cleansyntax/realtor-com-agents-scraper`) Actor

Scrape Realtor.com Agents by ZIP Code — No Subscription. Only $3 per 1,000 records.

- **URL**: https://apify.com/cleansyntax/realtor-com-agents-scraper.md
- **Developed by:** [CleanSyntax](https://apify.com/cleansyntax) (community)
- **Categories:** Real estate, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 715 total users, 7 monthly users, 97.3% runs succeeded, 33 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Agents Scraper (by ZIP Codes)**

Export **real estate agent** data from Realtor.com® by **one or many ZIP codes**. This Apify Actor automatically handles pagination, retries, and resumable runs, then saves clean, analysis-ready data to **CSV** and the **Apify dataset**.

Perfect for **lead generation**, **broker recruiting**, **market research**, and **territory analysis**.

***

### 🚀 What this scraper does

- ✅ **Multi-ZIP input** — paste hundreds of ZIP codes (one per line)
- ✅ **Auto-pagination** — fetches all pages per ZIP (20 agents per page)
- ✅ **Retry & resilience** — built-in retries for temporary errors
- ✅ **State persistence** — safely resumes after server migrations or restarts
- ✅ **Clean CSV output** — consistent column order; nested arrays collapsed into single cells
- ✅ **Zip-aware results** — each row includes the **`zipcode (search term)`** you queried

***

### 🧠 How it works

1. You paste ZIP codes (one per line).
2. The Actor fetches agents for each ZIP, automatically paging through results.
3. Arrays (e.g., **languages**, **specializations**) are flattened into **comma-separated** or **“ | ”-separated** strings, so you don’t get hundreds of columns.
4. Results are streamed to the Apify dataset and a final **`OUTPUT.csv`** is generated.

***

### 🔧 Input

Use the **“ZIP codes (one per line)”** textbox.
Optional: **“stop after N results per ZIP”** to cap how much data you collect per area.

**Example input**

```json
{
  "zipcodes_text": "90210\n10001\n77494",
  "maxResults": 500
}
```

> Tip: If `maxResults` is omitted, the Actor collects **all** available agents for each ZIP.

***

### 📤 Output

Data is saved to:

- **Apify Dataset** (browseable)
- **OUTPUT.csv** (downloadable)

#### Base columns (kept in this exact order)

1. `01-Full Name`
2. `02-First Name`
3. `03-Last Name`
4. `04-Email`
5. `05-Mobile`
6. `06-Office Phone`
7. `07-City`
8. `08-State`
9. `09-Title`
10. `10-Role`
11. `11-Agent Types`
12. `12-Languages`
13. `13-Specializations`
14. `14-Description`
15. `15-Zips Served`
16. `16-Served Areas`
17. `17-Web URL`
18. `18-Realtor.com URL`
19. `19-Office Name`
20. `20-Office Email`
21. `21-Office Phone`
22. `22-Office Website`
23. `23-Office Address`
24. `24-Office City`
25. `25-Office State`
26. `26-Office Zip`
27. `27-MLS History`
28. `28-NRDS ID`
29. `29-Photo URL`
    ..... and more

#### Extra columns

- `zipcode (search term)` — the ZIP you queried (useful when you bulk scrape multiple ZIPs).
- Other useful fields discovered in the source (e.g., **office_mls**, internal IDs, etc.) are appended **after** the base columns and kept compact (arrays serialized into a single cell).

> Arrays such as **`mls`**, **`mls_history`**, **`served_areas`**, **`zips`**, **`specializations`**, **`user_languages`**, and office’s **`mls`** are condensed into single-cell strings to keep the CSV tidy.

***

### 🛠️ Usage tips

- Start with a few ZIPs to validate your output, then scale up.
- Use **`maxResults`** to cap per-ZIP volume (useful for sampling).
- To analyze results, open **Dataset → Export** or download **OUTPUT.csv** directly.

***

### 📈 Popular use cases (SEO)

- Realtor.com® **agent lists** by ZIP
- **Real estate agent lead lists** (CSV)
- **Broker recruiting** data enrichment
- **Territory and market analysis** by ZIP code
- **Competitive research** on agent coverage and specialties

***

### ❓FAQ

**Q: Can I paste hundreds of ZIPs?**
Yes. Paste one ZIP per line; the Actor will process them sequentially and merge the results.

**Q: Will I lose progress if a server restarts?**
No. The Actor persists state and resumes from the last saved page.

**Q: Why do I see “ | ” or commas in some cells?**
Nested arrays (like languages, specializations, MLS info) are flattened into single cells to keep the CSV compact.

# Actor input Schema

## `zipcodes_text` (type: `string`):

Paste multiple 5-digit US ZIP codes, one per line. Example: 90210↵10001↵77494

## `maxResults` (type: `integer`):

If set (>0), stop scraping each ZIP when this many results have been collected.

## Actor input object example

```json
{
  "zipcodes_text": "33239"
}
```

# 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 = {
    "zipcodes_text": "33239"
};

// Run the Actor and wait for it to finish
const run = await client.actor("cleansyntax/realtor-com-agents-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 = { "zipcodes_text": "33239" }

# Run the Actor and wait for it to finish
run = client.actor("cleansyntax/realtor-com-agents-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 '{
  "zipcodes_text": "33239"
}' |
apify call cleansyntax/realtor-com-agents-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cleansyntax/realtor-com-agents-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/y0ZclmVNktfxyzrtZ/builds/UQkxhobVhkLvjuUsG/openapi.json
