# Realtor.com Agent Scraper — Agents, Listings & Reviews (`sian.agency/realtor-agent-scraper`) Actor

Scrape Realtor.com real estate agents at scale — search by city or lookup by agent id. Returns license number, broker, office, contacts, ratings, listing stats, served areas, and specializations, plus optional for-sale, sold history, and reviews. Built for recruiting, lead gen, and CRM enrichment.

- **URL**: https://apify.com/sian.agency/realtor-agent-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Automation, Lead generation, Real estate
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $19.00 / 1,000 agent extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Realtor.com Agent Scraper — Agents, Listings & Reviews 🏠

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Zillow Agent Scraper](https://img.shields.io/badge/Store-Zillow%20Agent%20Scraper-1F4E79)](https://apify.com/sian.agency/zillow-agent-scraper?fpr=sian) [![Redfin Property Scraper](https://img.shields.io/badge/Store-Redfin%20Property%20Scraper-A02021)](https://apify.com/sian.agency/redfin-property-scraper?fpr=sian) [![StreetEasy NYC Scraper](https://img.shields.io/badge/Store-StreetEasy%20NYC%20Scraper-FF4747)](https://apify.com/sian.agency/streeteasy-property-scraper?fpr=sian)

#### 🎉 The Realtor.com agent scraper that returns FULL profiles — license number, broker, ratings, sold history & reviews — not thin $1/1K lead dumps.
##### Built for brokerage recruiters, lead-gen SaaS founders, and real-estate data teams who need real productivity signals on every agent in a market.

---

### 📋 Overview

**Pull thousands of real-estate agents from Realtor.com at scale** — search any US market by city, then get **license number, broker, office, contacts, ratings, listing stats, served areas, and specializations** in one clean structured dataset. Optional one-toggle enrichment adds each agent's **full active for-sale portfolio, complete sold history, for-rent listings, and the entire reviews + recommendations corpus**.

**Why recruiters and lead-gen teams choose us:**
- ✅ **Full profiles, not lead dumps**: license number, broker + office, phones, ratings, served areas, specializations, languages — the depth the "$1 per 1,000 leads" actors strip out
- ⚡ **City-scale discovery**: one search returns every agent in a market with stable pagination (thousands of agents per city)
- 🎯 **Recruiting signal built in**: `sold-last-year` + active `for-sale-count` + ratings let you rank top producers and target the right agents to poach
- 💎 **Deep enrichment**: active for-sale, full sold history (hundreds to thousands of rows per agent), for-rent listings, and the complete reviews + recommendations corpus with sub-ratings
- 💰 **Pay-per-event**: a low per-agent headline rate, with enrichment as an optional add-on — only pay for what you pull
- ✨ **NEW**: HTML cohort report with top-broker breakdown, productivity medians, license/phone coverage, and per-query totals

**Built by [SIÁN Agency](https://apify.com/sian.agency?fpr=sian)** — an independent tool. See the Trademark Disclaimer below.

---

### ✨ Features

- 🧭 **Two modes**: city/state directory search **OR** direct lookup by agent fulfillment id
- 📜 **License + broker data** — license number, supervising broker, office name + address + phones per agent
- 📞 **Full contact** — typed phone numbers (mobile/office) + a convenience primary phone
- ⭐ **Ratings** — average rating, reviews count, recommendations count
- 📊 **Productivity stats** — `sold-last-year`, active `for-sale-count`, and price range when available
- 🗺 **Served areas + specializations + languages** — perfect for territory targeting and niche matching
- 🏷 **Active for-sale + for-rent portfolios** — paginated, with price, address, beds/baths, type
- 📈 **Full sold history** — hundreds to thousands of past transactions per agent with last-sold price + date
- 💬 **Reviews + recommendations** — full corpus with reviewer type and sub-ratings (responsiveness, market expertise, negotiation, professionalism), plus agent replies
- 📄 **HTML cohort report** — saved to the key-value store with top-broker breakdown, productivity medians, and coverage stats
- 🔁 **Resilient by default** — automatic key failover so upstream blips don't fail your run

---

### 🎬 Quick Start

Pick `search` mode, give it a `"City, ST"` location, and run. To enrich, flip on the toggles and run on a paid plan.

```bash
curl -X POST "https://api.apify.com/v2/acts/sian.agency~realtor-agent-scraper/runs?token=YOUR_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"searchMode": "search", "location": "Austin, TX", "maxAgentsPerQuery": 50}'
````

***

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Choose your market

Set `searchMode` to `search` and enter a `location` as `"City, ST"` (e.g. `"Miami, FL"`). Set `maxAgentsPerQuery` to how many agents you want.

#### Step 2: (Optional) Turn on enrichment

On a paid plan, flip `includeForSale`, `includeSoldProperties`, `includeForRent`, or `includeReviews` to attach each agent's full portfolio and review corpus.

#### Step 3: Run and export

Run the actor and export the dataset to JSON, CSV, or Excel. Open the HTML report in the key-value store for a cohort summary.

**That's it! In a few minutes you'll have:**

- Every agent in your target market with license + broker + contacts
- Productivity rankings (sold-last-year, active listings) to find top producers
- Optional full portfolios and reviews per agent

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| searchMode | string | No | `search` (directory by city) or `lookup` (by fulfillment id). Default `search`. |
| location | string | For search | City + two-letter state, e.g. `"Austin, TX"`. A bare city won't resolve. |
| maxAgentsPerQuery | integer | No | Cap on agents per search query. Default 50. FREE tier capped at 5. |
| lookupTargets | array | For lookup | Agent fulfillment ids (e.g. `["3656096"]`), harvested from search. |
| fetchAgentDetails | boolean | No | Fetch the full profile per directory row (default `true`). Always on in lookup. |
| includeForSale | boolean | No | Attach full active for-sale portfolio. Paid only. |
| includeSoldProperties | boolean | No | Attach full sold history. Paid only. |
| includeForRent | boolean | No | Attach active for-rent portfolio. Paid only. |
| includeReviews | boolean | No | Attach reviews + recommendations corpus. Paid only. |
| maxListingsPerAgent | integer | No | Cap on for-sale + for-rent rows per agent. Default 50. |
| maxSoldPerAgent | integer | No | Cap on sold rows per agent. Default 50. |
| maxReviewsPerAgent | integer | No | Cap on reviews per agent. Default 25. |

**Example (search + enrichment):**

```json
{
  "searchMode": "search",
  "location": "Austin, TX",
  "maxAgentsPerQuery": 100,
  "includeSoldProperties": true,
  "includeReviews": true,
  "maxSoldPerAgent": 200
}
```

**Example (lookup):**

```json
{
  "searchMode": "lookup",
  "lookupTargets": ["3656096"],
  "includeForSale": true,
  "includeReviews": true
}
```

***

### 📤 Output

Results are saved to the Apify dataset. Key fields per agent:

| Field | Type | Description |
|-------|------|-------------|
| fulfillmentId | string | Stable agent id (use for lookup + joins) |
| agentName | string | Agent display name |
| licenseNumber | string | Real-estate license number |
| broker | object | Supervising broker (name + id) |
| office | object | Office name, website, phones, address |
| phones / primaryPhone | array / string | Typed phones + a convenience first line |
| ratings | object | Average rating, reviews count, recommendations count |
| listingStats | object | sold-last-year, for-sale-count, price range |
| servedAreas | array | Markets the agent serves |
| specializations / languages | array | Niche + language signals |
| forSaleListings / soldListings / forRentListings | array | Portfolios (full when enriched) |
| reviews / recommendations | array | Full corpus with sub-ratings (when enriched) |
| counts | object | Array counts + reported totals |
| profileUrl | string | Public agent profile URL |
| scrapedAt | string | ISO collection timestamp |

**Example:**

```json
{
  "fulfillmentId": "3656096",
  "agentName": "Gregg Klar",
  "isRealtor": true,
  "licenseNumber": "0472276",
  "broker": { "name": "Keller Williams Realty - Broker", "fulfillmentId": "4458562" },
  "office": { "name": "Keller Williams - Lake Travis", "address": { "city": "LAKEWAY", "state_code": "TX", "postal_code": "78734" } },
  "primaryPhone": "(512) 653-0488",
  "ratings": { "averageRating": 5, "reviewsCount": 1, "recommendationsCount": 7 },
  "listingStats": { "forSaleCount": 38, "soldLastYear": 43 },
  "servedAreas": ["Austin", "Lakeway", "Marble Falls", "Spicewood"],
  "profileUrl": "https://www.realtor.com/realestateagents/5c08282d000298001ac42fc7"
}
```

***

### 💼 Use Cases & Examples

#### 1. Brokerage recruiting

**A recruiter at a national brokerage wants to poach top producers in a metro.**
**Input:** `search` mode, `"Austin, TX"`, high `maxAgentsPerQuery`.
**Output:** Every agent with broker, license, ratings, and `sold-last-year`.
**Use:** Rank by productivity, filter out your own brokerage, and run outreach.

#### 2. Lead-gen SaaS

**A founder sells data products to agents and needs an enriched agent directory.**
**Input:** `search` across target markets + `fetchAgentDetails`.
**Output:** License + phones + broker + served areas + specializations per agent.
**Use:** Power a contact-enrichment or territory-mapping product without maintaining scrapers.

#### 3. Real-estate analytics

**An analyst tracks agent productivity and broker market share over time.**
**Input:** `search` by market on a schedule.
**Output:** `sold-last-year` + active for-sale counts + top-broker breakdown (HTML report).
**Use:** Monitor top-producer concentration and broker share month over month.

#### 4. CRM / data integration

**A data engineer matches Realtor.com agents to internal records.**
**Input:** `lookup` mode with known fulfillment ids, or `search` to discover them.
**Output:** Stable `fulfillmentId` + license + broker for deterministic joins.
**Use:** Enrich existing CRM records with served areas, reviews, and recommendations.

#### 5. Reputation intelligence

**A reputation team needs the full review corpus for a set of agents.**
**Input:** `lookup` or `search` with `includeReviews`.
**Output:** Reviews (rating, comment, reviewer type, sub-ratings, agent reply) + recommendations.
**Use:** Benchmark agent reputation and surface negotiation/responsiveness sub-scores.

***

### 🔗 Integration Examples

#### JavaScript/Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/realtor-agent-scraper').call({
  searchMode: 'search',
  location: 'Austin, TX',
  maxAgentsPerQuery: 50
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0]);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/realtor-agent-scraper').call(
    run_input={'searchMode': 'search', 'location': 'Austin, TX', 'maxAgentsPerQuery': 50}
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~realtor-agent-scraper/runs?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"searchMode": "search", "location": "Austin, TX"}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. **Trigger**: Schedule or webhook
2. **HTTP Request**: Call the actor API
3. **Process**: Handle the JSON agent records
4. **Action**: Push to CRM, enrich a sheet, or notify your team

***

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- **5 agents** per run — full field access, same quality
- No credit card required
- Perfect for testing and small samples

#### PAID Tier (Production Ready)

- **Unlimited** agents per run, plus all enrichment toggles
- Faster processing, no per-run caps
- Pay-per-event: charged per agent extracted + per enrichment bundle

💰 **Built for depth at a fair rate** — a low per-agent headline with enrichment as an optional add-on.

🔗 [View current pricing](https://apify.com/sian.agency/realtor-agent-scraper?fpr=sian)

***

### ❓ Frequently Asked Questions

**Q: How many agents can I pull?**
A: FREE tier: 5 per run. PAID tier: unlimited, across as many markets as you schedule.

**Q: How do I look up a specific agent?**
A: Use `lookup` mode with the agent's numeric fulfillment id — harvest ids from a `search` run first.

**Q: Why does my location return nothing?**
A: Use the `"City, ST"` form (e.g. `"Austin, TX"`). A bare city can't be resolved.

**Q: Do all agents have for-rent listings?**
A: No — many sales-focused agents have zero rentals. That's reflected accurately, never invented.

**Q: What output formats are available?**
A: JSON, CSV, and Excel — export directly from the Apify dataset.

**Q: Is this legal?**
A: We only extract publicly available agent-profile data. See the legal section below.

***

### 🐛 Troubleshooting

**Search returns 0 results**

- Use `"City, ST"` (two-letter state). A bare city name won't resolve.

**Enrichment toggles seem ignored**

- Enrichment is PAID-only. On FREE tier the toggles are skipped by design.

**A lookup fails**

- `lookup` needs a numeric fulfillment id, not a profile URL. Run a city search to harvest ids.

***

### ⚖️ Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the **GDPR** in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

### ⚠️ Trademark Disclaimer

This is an **independent tool** and is **not affiliated with, endorsed by, or sponsored by** Move, Inc. or the National Association of REALTORS®. "Realtor.com" and "REALTOR®" are trademarks of their respective owners. This actor collects only publicly available real-estate agent profile data and is intended for legitimate, compliant use.

### 🤝 Support

[![Telegram Support](https://img.shields.io/badge/Telegram-Support%20Group-0088cc?logo=telegram)](https://t.me/+vyh1sRE08sAxMGRi)

**Join our active support community**

- For issues or questions, open an issue in the actor's Issues tab
- Check [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools
- 📧 <apify@sian-agency.online>

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Actor input Schema

## `searchMode` (type: `string`):

How to find agents. **search** — paginate the Realtor.com agent directory by city/state. **lookup** — directly fetch one or more agents by their numeric fulfillment id (harvested from a search).

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

City + two-letter state for the agent search, e.g. "Miami, FL" or "Austin, TX". A bare city cannot be resolved — always include the state code. Required when searchMode = search.

## `maxAgentsPerQuery` (type: `integer`):

Cap on how many agent records to return per search query. Default 50 (~3 pages of 20). FREE tier hard-capped at 5.

## `lookupTargets` (type: `array`):

List of agent fulfillment ids (e.g. "3656096"), as returned by the search mode. Required when searchMode = lookup.

## `fetchAgentDetails` (type: `boolean`):

In search mode, after each directory row, fetch the full agent record (adds bio, full phones, office, broker, and inline listing samples). Adds 1 call per agent. Always on in lookup mode.

## `includeForSale` (type: `boolean`):

Per agent, paginate the full active for-sale portfolio (price, address, beds/baths, type). PAID tier only.

## `includeSoldProperties` (type: `boolean`):

Per agent, paginate past transactions (price, last-sold date, address). Some agents have hundreds — cap below. PAID tier only.

## `includeForRent` (type: `boolean`):

Per agent, paginate the full active rental portfolio (often empty for sales-focused agents). PAID tier only.

## `includeReviews` (type: `boolean`):

Per agent, attach the full reviews corpus (rating, comment, reviewer type, sub-ratings, agent reply) plus recommendations. PAID tier only.

## `maxListingsPerAgent` (type: `integer`):

Hard cap on for-sale + for-rent rows per agent. Default 50.

## `maxSoldPerAgent` (type: `integer`):

Hard cap on sold-history rows per agent. Default 50. Raise for full transaction history.

## `maxReviewsPerAgent` (type: `integer`):

Hard cap on reviews rows per agent. Default 25.

## Actor input object example

```json
{
  "searchMode": "search",
  "location": "Miami, FL",
  "maxAgentsPerQuery": 50,
  "lookupTargets": [
    "3656096"
  ],
  "fetchAgentDetails": true,
  "includeForSale": false,
  "includeSoldProperties": false,
  "includeForRent": false,
  "includeReviews": false,
  "maxListingsPerAgent": 50,
  "maxSoldPerAgent": 50,
  "maxReviewsPerAgent": 25
}
```

# Actor output Schema

## `results` (type: `string`):

Structured Realtor.com agent profiles with license number, broker, office, phones, ratings, listing stats, served areas, specializations, and optional listing/sold/for-rent/review enrichment.

## `htmlReport` (type: `string`):

HTML summary with run stats, agent counts, license/phone coverage, productivity (sold-last-year), top-broker distribution, and per-query totals.

# 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 = {
    "location": "Austin, TX"
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/realtor-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 = { "location": "Austin, TX" }

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/realtor-agent-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "location": "Austin, TX"
}' |
apify call sian.agency/realtor-agent-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sian.agency/realtor-agent-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Realtor.com Agent Scraper — Agents, Listings & Reviews",
        "description": "Scrape Realtor.com real estate agents at scale — search by city or lookup by agent id. Returns license number, broker, office, contacts, ratings, listing stats, served areas, and specializations, plus optional for-sale, sold history, and reviews. Built for recruiting, lead gen, and CRM enrichment.",
        "version": "1.0",
        "x-build-id": "7qKY1dw2YBVhYnErY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sian.agency~realtor-agent-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sian.agency-realtor-agent-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/sian.agency~realtor-agent-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sian.agency-realtor-agent-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/sian.agency~realtor-agent-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sian.agency-realtor-agent-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchMode": {
                        "title": "🧭 Search Mode",
                        "enum": [
                            "search",
                            "lookup"
                        ],
                        "type": "string",
                        "description": "How to find agents. **search** — paginate the Realtor.com agent directory by city/state. **lookup** — directly fetch one or more agents by their numeric fulfillment id (harvested from a search).",
                        "default": "search"
                    },
                    "location": {
                        "title": "📍 Location (search mode)",
                        "type": "string",
                        "description": "City + two-letter state for the agent search, e.g. \"Miami, FL\" or \"Austin, TX\". A bare city cannot be resolved — always include the state code. Required when searchMode = search."
                    },
                    "maxAgentsPerQuery": {
                        "title": "📊 Max agents per query",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Cap on how many agent records to return per search query. Default 50 (~3 pages of 20). FREE tier hard-capped at 5.",
                        "default": 50
                    },
                    "lookupTargets": {
                        "title": "🔎 Lookup targets (lookup mode)",
                        "type": "array",
                        "description": "List of agent fulfillment ids (e.g. \"3656096\"), as returned by the search mode. Required when searchMode = lookup.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "fetchAgentDetails": {
                        "title": "👤 Fetch full agent details",
                        "type": "boolean",
                        "description": "In search mode, after each directory row, fetch the full agent record (adds bio, full phones, office, broker, and inline listing samples). Adds 1 call per agent. Always on in lookup mode.",
                        "default": true
                    },
                    "includeForSale": {
                        "title": "🏷 Enrich: Active for-sale listings",
                        "type": "boolean",
                        "description": "Per agent, paginate the full active for-sale portfolio (price, address, beds/baths, type). PAID tier only.",
                        "default": false
                    },
                    "includeSoldProperties": {
                        "title": "📈 Enrich: Sold properties (transaction history)",
                        "type": "boolean",
                        "description": "Per agent, paginate past transactions (price, last-sold date, address). Some agents have hundreds — cap below. PAID tier only.",
                        "default": false
                    },
                    "includeForRent": {
                        "title": "🏘 Enrich: Active for-rent listings",
                        "type": "boolean",
                        "description": "Per agent, paginate the full active rental portfolio (often empty for sales-focused agents). PAID tier only.",
                        "default": false
                    },
                    "includeReviews": {
                        "title": "⭐ Enrich: Reviews + recommendations",
                        "type": "boolean",
                        "description": "Per agent, attach the full reviews corpus (rating, comment, reviewer type, sub-ratings, agent reply) plus recommendations. PAID tier only.",
                        "default": false
                    },
                    "maxListingsPerAgent": {
                        "title": "Max active listings per agent (for-sale + for-rent)",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Hard cap on for-sale + for-rent rows per agent. Default 50.",
                        "default": 50
                    },
                    "maxSoldPerAgent": {
                        "title": "Max sold properties per agent",
                        "minimum": 1,
                        "maximum": 3000,
                        "type": "integer",
                        "description": "Hard cap on sold-history rows per agent. Default 50. Raise for full transaction history.",
                        "default": 50
                    },
                    "maxReviewsPerAgent": {
                        "title": "Max reviews per agent",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Hard cap on reviews rows per agent. Default 25.",
                        "default": 25
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
