# Zillow Agent Scraper (`laelin/zillow-agent-scraper`)

Scrapes Zillow agent profiles, including names, contact info, reviews, sales stats, and listings. Supports listing and profile URLs. Ideal for lead generation, research, and analysis. Outputs in JSON.

- **URL**: https://beta-securitybyobscurity.apify.com/laelin/zillow-agent-scraper.md
- **Developed by:** [Lee](https://beta-securitybyobscurity.apify.com/laelin) (community)
- **Categories:** Real estate, Lead generation, Automation
- **Stats:** 94 total users, 13 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

$2.00 / 1,000 results

This Actor is paid per result. You are not charged for the Apify platform usage, but only a fixed price for dataset items the Actor outputs.

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

# README

## Zillow Agents Scraper

### How it works

This actor allows you to scrape real estate agent profiles from Zillow.com and extract important details such as agent name, reviews, contact information, and other relevant data. The scraper is designed to help you gather comprehensive data on real estate agents, which can be useful for market research, contact building, or analyzing agent performance.

### Features

- **Multiple Search Queries**: Supports scraping based on multiple start URLs (just copy and paste the link/url from Zillow.com site), formatted as: `https://www.zillow.com/professionals/real-estate-agent-reviews/99501/`
- **NEW**: You can now also provide direct agent profile URLs, for example: `https://www.zillow.com/profile/soldbymickie`
- **Comprehensive Data Extraction**: Agent name, contact info, business details, ratings, sales statistics, current listings, past sales, and reviews
- **Bulk Processing**: Handle multiple agent profiles in one run
- **Robust Error Handling**: Built-in retry logic and error recovery

### How to Use

1. **Set Up**: Ensure you have an Apify account and access to the Apify platform.
2. **Configure Proxy Settings**: (Optional) For enhanced reliability, configure proxy settings, as Zillow employs anti-scraping measures.
3. **Provide URLs**: Copy the link of the agent listings or agent profile from Zillow.com and paste it into the scraper. Make sure the URLs point to agent listings or agent profile pages.
4. **Run the Scraper**: Execute the scraper and obtain the extracted data in your preferred format, such as JSON, CSV, Excel, or others as supported by Apify.

### Usage Disclaimer

Scraping Zillow may violate their Terms of Service. Use this actor responsibly and only for lawful, ethical purposes. The author provides this project for educational and research use.

### Config

1. Copy `.env.example` to `.env`.
2. Put your Bright Data API key in `BRIGHT_DATA_API_KEY`.
3. When deploying, add the same variable in **Apify Console → Source → Environment variables** (mark it Secret).

#### Output Schema

The Actor's output schema is defined in `.actor/dataset_schema.json`. This configuration file describes how output items are displayed in the **Output** tab of Apify Console. The file is linked from `.actor/actor.json`, so no extra configuration is required in `apify.json`.

### Input Data

Here's an example of how to set up a search for agents or a direct agent profile:

```json
{
    "urls": [
        {
            "url": "https://www.zillow.com/profile/soldbymickie"
        },
        {
            "url": "https://www.zillow.com/profile/soldbymickie"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
}
```

### Input Options

- **Profile URLs (urls)**: URLs of agent listings or agent profiles to start scraping from. This is an array of strings, where each string is a Zillow URL.
- **Max Concurrency (maxConcurrency)**: Maximum number of pages that can be processed at the same time. Default is 50.
- **Min Concurrency (minConcurrency)**: Minimum number of pages that will be processed at the same time. Default is 1.
- **Max Request Retries (maxRequestRetries)**: Number of times the scraper will retry a failed request before giving up. Default is 100.
- **Proxy Configuration (proxy)**: Specifies proxy servers that will be used by the scraper to hide its origin, ensuring greater reliability and anonymity. For more details, see the Proxy configuration.

### Output Structure

The output data typically includes:

```json
{
  "url": "https://www.zillow.com/profile/Michael-Kayem",
  "encodedZuid": "X1-ZUz91ogaatrqq1_9tzap",
  "screenName": "Michael Kayem",
  "inCanada": false,
  "name": "Michael Kayem",
  "flag": 6554086,
  "profileTypeIds": [
    1,
    2
  ],
  "profileTypes": [
    "consumer",
    "agent"
  ],
  "sidebarVideoUrl": "https://www.youtube.com/embed/CaeOTSnn2LM?wmode=transparent&rel=0",
  "businessAddress": {
    "address1": "124 Washington Blvd",
    "address2": null,
    "city": "Culver City",
    "state": "CA",
    "postalCode": "90292"
  },
  "businessName": "Remax Estate Properties",
  "cpdUserPronouns": null,
  "isTopAgent": false,
  "profileImageId": null,
  "profilePhotoSrc": "https://photos.zillowstatic.com/fp/9d9d1900ba5439707d25d86ca280824d-h_l.jpg",
  "isPremierAgent": false,
  "ratings": {
    "count": 149,
    "average": 5
  },
  "phoneNumbers": {
    "cell": "(000) 000-0000",
    "brokerage": null,
    "business": "(000) 000-0000"
  },
  "email": "example@example.com",
  "agentSalesStats": {
    "countAllTime": 258,
    "countLastYear": 5,
    "priceRangeThreeYearMin": 460000,
    "priceRangeThreeYearMax": 3650000,
    "averageValueThreeYear": 1071466,
    "stats_include_team": true
  },
  "forSaleListings": {
    "listings": [
      {
        "zpid": 2070017617,
        "home_type": "townhome",
        "address": {
          "line1": "5215 Sepulveda Blvd #18B",
          "line2": "Culver City, CA 90230",
          "city": "Culver City",
          "stateOrProvince": "CA",
          "postalCode": "90230"
        },
        "bedrooms": 2,
        "bathrooms": 3,
        "openHouses": "",
        "hasOpenHouse": false,
        "primary_photo_url": "https://photos.zillowstatic.com/fp/19a0ede3499c9457db6337e250ba45a5-a_a.jpg",
        "price": 999000,
        "price_currency": "usd",
        "status": "fsba",
        "latitude": 33.99802,
        "longitude": -118.39993,
        "brokerage_name": "RE/MAX ESTATE PROPERTIES",
        "home_marketing_status": "active",
        "home_marketing_type": "forSale",
        "has_vr_model": false,
        "listing_url": "/homedetails/5215-Sepulveda-Blvd-18B-Culver-City-CA-90230/2070017617_zpid/"
      }
    ],
    "listing_count": 1
  },
  "pastSales": {
    "total": 258,
    "past_sales": [
      {
        "represented": "Buyer",
        "sold_date": "10/17/2024",
        "price": "$1,385,000",
        "street_address": "301 E Plymouth St",
        "city_state_zipcode": "Inglewood, CA, 90302",
        "latitude": 33.97487,
        "longitude": -118.35469,
        "bathrooms": 5,
        "bedrooms": 6,
        "city": "Inglewood",
        "state": "CA",
        "livingAreaValue": 3530,
        "livingAreaUnitsShort": "sqft"
      }
    ]
  },
  "reviewsData": {
    "reviews": [
      {
        "reviewComment": "Michael took care of all of my real estate needs from A-Z. He made the entire experience so much fun and worthwhile.",
        "reviewId": 8464223,
        "subRatings": [
          {
            "description": "Local knowledge",
            "score": 5
          },
          {
            "description": "Process expertise",
            "score": 5
          }
        ],
        "reviewee": {
          "screenName": "Michael Kayem",
          "encodedZuid": "X1-ZUz91ogaatrqq1_9tzap"
        },
        "rating": 5,
        "createDate": "2024-09-18T19:08:00",
        "workDescription": "Found a tenant for a home."
      }
    ]
  }
}
```

### Output Fields Explanation

- **url**: URL to the agent's Zillow profile.
- **encodedZuid**: Encoded identifier for the agent.
- **screenName**: Display name of the agent on Zillow.
- **inCanada**: Boolean indicating if the agent is based in Canada.
- **name**: Full name of the real estate agent.
- **flag**: Internal flag identifier for the agent.
- **profileTypeIds**: Array of IDs representing the types of profiles (e.g., consumer, agent).
- **profileTypes**: Array of profile types (e.g., "consumer", "agent").
- **sidebarVideoUrl**: URL of the sidebar video if available.
- **businessAddress**: Object containing the business address details, including address1, address2, city, state, and postalCode.
- **businessName**: Name of the business or brokerage the agent is associated with.
- **cpdUserPronouns**: Pronouns of the agent, if provided.
- **isTopAgent**: Boolean indicating if the agent is a top agent.
- **profileImageId**: Identifier for the profile image.
- **profilePhotoSrc**: URL to the agent's profile photo.
- **isPremierAgent**: Boolean indicating if the agent is a Premier Agent.
- **ratings**: Object containing the total count of ratings and the average rating score.
- **phoneNumbers**: Object containing contact numbers for the agent, including cell, brokerage, and business.
- **email**: Email address of the agent.
- **professional**: Object containing additional professional information, if available.
- **getToKnowMe**: Object containing introductory or promotional information about the agent, if available.
- **agentLicenses**: Array containing the agent's real estate licenses.
- **agentSalesStats**: Object containing sales statistics, including countAllTime, countLastYear, priceRangeThreeYearMin, priceRangeThreeYearMax, averageValueThreeYear, and stats\_include\_team (indicating if the stats include team sales).
- **forSaleListings**: Object containing listings currently for sale by the agent, including details such as zpid, home\_type, address, bedrooms, bathrooms, price, latitude, longitude, brokerage\_name, home\_marketing\_status, and listing\_url.
- **forRentListings**: Object containing listings currently for rent by the agent, including details such as zpid, home\_type, address, bedrooms, bathrooms, price, latitude, longitude, brokerage\_name, home\_marketing\_status, and listing\_url.
- **pastSales**: Object containing past sales information, including the total number of sales and details of individual past\_sales, such as represented, sold\_date, price, street\_address, city\_state\_zipcode, latitude, longitude, bathrooms, bedrooms, city, state, livingAreaValue, and livingAreaUnitsShort.
- **preferredLenders**: Object containing information about preferred lenders, if available.
- **professionalInformation**: Array containing detailed professional information about the agent, such as broker address, phone number, websites, licenses, and languages spoken.
- **reviewsData**: Object containing reviews information, including individual reviews (reviewComment, reviewId, rating, and createDate), subRatings (detailed rating aspects like "Local knowledge" and "Process expertise"), and reviewee (information about the reviewed agent).
- **teamDisplayInformation**: Object containing information about the agent's team, including teamLeadInfo and teamMemberInfo if applicable.

### Explore More Scrapers

If you found this Zillow Agents Scraper useful, be sure to check out our other powerful scrapers and actors at memo23's Apify profile. We offer a wide range of tools to enhance your web scraping and automation needs across various platforms and use cases.

### Support

For issues or feature requests, please use the Issues section of this actor.

If you need customization or have questions, feel free to contact the author:

**Email**: jingle.hooray\_7k@icloud.com

### Additional Services

- **Request customization or whole dataset**: jingle.hooray\_7k@icloud.com
- **If you need anything else scraped, or this actor customized, email**: jingle.hooray\_7k@icloud.com
- **For API services of this scraper (no Apify fee, just usage fee for the API), contact**: jingle.hooray\_7k@icloud.com

**Email**: jingle.hooray\_7k@icloud.com

# Actor input Schema

## `urls` (type: `array`):

List of Zillow agent profile URLs to scrape

## Actor input object example

```json
{
  "urls": [
    "https://www.zillow.com/profile/cjgiompalo",
    "https://www.zillow.com/profile/Michael-Kayem"
  ]
}
```

# 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 = {
    "urls": [
        {
            "url": "https://www.zillow.com/profile/mccannteam"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("laelin/zillow-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 = { "urls": [{ "url": "https://www.zillow.com/profile/mccannteam" }] }

# Run the Actor and wait for it to finish
run = client.actor("laelin/zillow-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 '{
  "urls": [
    {
      "url": "https://www.zillow.com/profile/mccannteam"
    }
  ]
}' |
apify call laelin/zillow-agent-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Zillow Agent Scraper",
        "description": "Scrapes Zillow agent profiles, including names, contact info, reviews, sales stats, and listings. Supports listing and profile URLs. Ideal for lead generation, research, and analysis. Outputs in JSON.",
        "version": "0.7",
        "x-build-id": "TZwR91RgsgP1KXWCy"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/laelin~zillow-agent-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-laelin-zillow-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/laelin~zillow-agent-scraper/runs": {
            "post": {
                "operationId": "runs-sync-laelin-zillow-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/laelin~zillow-agent-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-laelin-zillow-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",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "Zillow Profile URLs",
                        "type": "array",
                        "description": "List of Zillow agent profile URLs to scrape",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
