# Compass Scraper \[$2💰] | Homes | Prices | Agent Data (`ahmed_jasarevic/compass-scraper`) Actor

Get US real estate listing data from Compass.com: for-sale, rent and recently sold homes by city, neighborhood or ZIP with price, beds/baths, sqft, address, photos, MLS ID and listing agent contact. Scrape US home prices for market research and lead generation.

- **URL**: https://apify.com/ahmed\_jasarevic/compass-scraper.md
- **Developed by:** [Ahmed Jasarevic](https://apify.com/ahmed_jasarevic) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.89 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Compass Scraper

Track US home prices and property listings on **Compass.com** — scrape for-sale, for-rent and recently sold homes by city, neighborhood or ZIP code, with price, beds/baths, square footage, address, coordinates, photos, MLS ID and **listing agent contact** (name, phone, email, brokerage) for real estate market research and lead generation.

### Main Use Cases

- **Home price monitoring** — pull current asking prices, price history signals (`lastAsking`, `lastClosePrice`) and price-per-sqft for any US market, and schedule weekly runs to track price trends over time.
- **US real estate market research** — build your own listing database per city/neighborhood/ZIP with price, beds/baths, sqft, lot size, taxes and days-on-market style signals for market analysis.
- **Agent lead generation** — collect listing agent name, brokerage, phone and email from Compass detail pages to feed your CRM or outreach pipeline.
- **Recently sold homes & comps analysis** — scrape `sold` listings with last close date/price to build comparable-sales (comps) datasets for valuations and investment decisions.
- **Real estate investment research** — compare asking vs. last close prices, monthly charges, taxes and school data across markets to shortlist properties for investment analysis.

### How It Works

Compass.com is a fully server-side-rendered React app protected by an AWS WAF JS challenge. The actor solves the challenge once per location with a short Playwright step, then uses Compass's **internal JSON search API** via `got-scraping` for fast native pagination, and finally fetches detail pages with a lightweight **CheerioCrawler** (plain HTTP) to extract descriptions, photos, schools and agent contacts. No slow browser crawling for every listing.

### Monitor US Home Prices & Market Trends

Schedule this actor weekly (or daily) for a set of markets and you get a rolling time series of asking prices, price-per-sqft, beds/baths and sold prices — the raw material for US housing market trend tracking and reporting.

### Build Property Databases for Real Estate Research

Every run emits flat, structured JSON rows with a stable `pid` (property ID) and canonical URLs, so you can deduplicate listings across runs, join them with your own data, and export to JSON, CSV or Excel for analysis in your BI tool, notebook, or CRM.

### Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `locations` | array of strings | ✔ | `["New York, NY"]` | Cities, neighborhoods or ZIP codes (e.g. `New York, NY`, `Brooklyn`, `94110`, `Park Slope`). Each search page returns up to ~41 listings; larger markets are paginated automatically. |
| `listingType` | string (enum) | – | `for-sale` | One of `for-sale`, `rent`, `sold`. `sold` returns recently sold homes with close date/price. |
| `startUrls` | array of strings | – | `[]` | Optional direct Compass `homedetails` URLs to scrape; fetched first with full details. |
| `priceMin` | integer | – | – | Only listings priced at or above this USD amount. |
| `priceMax` | integer | – | – | Only listings priced at or below this USD amount. |
| `bedsMin` | integer | – | – | Only listings with at least this many bedrooms. |
| `bedsMax` | integer | – | – | Only listings with at most this many bedrooms. |
| `maxItems` | integer | – | `100` | Max listing rows (cap 1000). Free users get a 10-item preview. |
| `includeDetails` | boolean | – | `true` | Fetch each listing's detail page for full description, agent contact, MLS status and complete photo gallery. Doubles requests. |
| `webhookUrl` | string | – | – | Optional billing hook: receives a JSON POST after detail pages are scraped (see Integrations). |
| `proxy` | object | – | `useApifyProxy: false` | Standard Apify proxy picker. Optional — the WAF challenge is solved by a real browser and works on datacenter IPs. |

### Output

Each dataset row is a flat listing record. Key fields:

- **Identity & links:** `listingIdSHA`, `pid`, `compassPropertyId`, `url`, `propertyUrl`
- **Location:** `address`, `city`, `state`, `zip`, `neighborhood`, `county`, `latitude`, `longitude`
- **Price:** `priceFormatted`, `price`, `priceMin`, `priceMax`, `lastAsking`, `pricePerSqft`, `monthlyCharges`, `lastClosePrice`
- **Property specs:** `beds`, `baths`, `fullBaths`, `halfBaths`, `sqft`, `lotSizeSqft`, `lotSizeFormatted`, `rooms`
- **Listing content:** `description`, `amenities`, `schools`, `photos` (original + thumbnail URLs with dimensions)
- **Status & dates:** `status`, `localizedStatus`, `mlsStatus`, `contractDateUnixMs`, `updatedDateUnixMs`, `lastCloseDateUnixMs`
- **Agent & tax data:** `listingAgent` (`name`, `brokerage`, `phone`, `email`, `profileUrl`), `parcelNumber`, `taxAnnualAmount`, `associationFee`
- **Run context:** `searchLocation`, `listingType`, `sourceUrl`

### Example Input

```json
{
  "locations": ["New York, NY"],
  "listingType": "for-sale",
  "maxItems": 100,
  "includeDetails": true
}
```

### Example Output

```json
{
  "listingIdSHA": "2191455577758434561",
  "pid": "19CSOF",
  "url": "https://www.compass.com/homedetails/77-Perry-St-Unit-5D-Manhattan-NY-10014/2191455577758434561_lid/",
  "propertyUrl": "https://www.compass.com/homedetails/77-Perry-St-Unit-5D-Manhattan-NY-10014/19CSOF_pid/",
  "address": "77 Perry Street, Unit 5D",
  "neighborhood": "West Village",
  "city": "New York",
  "state": "NY",
  "zip": "10014",
  "latitude": 40.7355792,
  "longitude": -74.0044106,
  "priceFormatted": "$695,000",
  "price": 695000,
  "pricePerSqft": 1261,
  "beds": 1,
  "baths": 1,
  "sqft": 551,
  "mlsStatus": "Active",
  "description": "Welcome to this stunning West Village home...",
  "listingAgent": {
    "name": "Jane Smith",
    "brokerage": "Compass",
    "phone": "+1-212-555-0100",
    "email": "jane.smith@compass.com"
  },
  "photos": [
    { "category": 0, "originalUrl": "https://...", "thumbnailUrl": "https://...", "width": 1920, "height": 1280 }
  ],
  "searchLocation": "New York, NY",
  "listingType": "for-sale"
}
```

### Integrations & Automation

- **Apify API** — call the actor from any app: `POST /v2/acts/ahmed_jasarevic~compass-scraper/runs` with the input JSON.
- **Scheduling** — use Apify scheduler to re-run automatically. For **home price monitoring**, run weekly (or daily for active markets); for recently-sold comps, run monthly.
- **Webhooks** — the scheduler can POST a notification to your URL when a run finishes, and `webhookUrl` sends a `{"event":"detailsScraped","totalItems":N,"detailCount":M}` payload after detail scraping so you can monitor detail-heavy runs.
- **Zapier / Make / n8n** — connect runs to your CRM, Sheets, Slack or BI stack via Apify's Zapier, Make.com or webhook integrations.
- **Output formats** — download the dataset as JSON, HTML, CSV or Excel from the dataset page or API.

### Related Actors

- [Zillow Search Scraper (maxcopell)](https://apify.com/maxcopell/zillow-scraper) — the most-used Zillow actor for for-sale/for-rent/sold listings across the whole US portal inventory.
- [Redfin Search Scraper (tri\_angle)](https://apify.com/tri_angle/redfin-search) — reliable Redfin property extraction for US markets; great cross-check against Compass.
- [Realtor.com Scraper (memo23)](https://apify.com/memo23/realtor-search-cheerio) — Realtor.com listings plus agent profiles and lead data.
- [LoopNet Scraper (ahmed\_jasarevic)](https://apify.com/ahmed_jasarevic/loopnet-scraper) — US commercial real estate (office, retail, industrial, multifamily) for a full residential + commercial US dataset.
- [Property24 Scraper (ahmed\_jasarevic)](https://apify.com/ahmed_jasarevic/property24-scraper) — South Africa's leading property portal, for international market expansion.

### FAQ

**Why use this actor instead of the official Compass API?** Compass does not publish a public listing API for third-party bulk data access. This actor uses Compass's own search endpoint (after solving the WAF challenge once) to retrieve the same listing data at scale, without brokerage agreements or enterprise contracts.

**What are alternatives to this actor / data source?** For deeper national coverage, combine Compass data with Zillow, Redfin or Realtor.com scrapers on Apify (see Related Actors). Compass adds value where its brokerage is strongest — exclusive, private-exclusive, coming-soon and off-MLS inventory plus the listing agent's direct contact — which the portals often mask or license restrictively.

**How do I get real estate listing data?** Options are licensed MLS/IDX feeds (expensive, contract-gated), portal APIs (rate-limited, terms-restricted) or scraping actors like this one (fast, pay-per-result, no contract).

**How is Compass data different from Zillow data?** Zillow is an ad-driven portal aggregating MLS listings plus public records, with Zestimates. Compass is a brokerage-first platform — lower total volume, but a higher share of exclusive listings and direct listing-agent contact data. Using both gives a fuller market picture.

**What is the best way to track home prices?** Pull listings on a fixed cadence (weekly/monthly) with price, price-per-sqft and sold price per property, and deduplicate on the stable `pid`. Per-property price series are more robust than a median-price headline, which is skewed by which homes happened to sell.

**What are the best real estate market research tools?** Redfin Data Center and Zillow Research publish market summaries; for custom analysis, most teams build their own database from scrapers (Compass, Zillow, Redfin, Realtor.com actors) and join it with county records and MLS feeds.

**How do I find recently sold home data?** Set `listingType: "sold"` — the actor returns recently sold homes with `lastCloseDateUnixMs` and `lastClosePrice`, ideal for comps analysis.

### SEO Keywords

compass real estate listings data, compass.com listings data, us real estate market data, real estate listing data, recently sold homes data, real estate agent lead data, luxury homes for sale data, home price monitoring, house price trends, mls listing database, property listing api alternative, nyc real estate data, real estate market research, real estate rental listings data, real estate comps analysis, real estate data api, real estate investment analysis, home price per square foot data, san francisco bay area real estate data, miami luxury home listings data, compass agent data, real estate data scraping

### For AI Agents & LLM Apps

Fetches structured US real estate listing data from Compass.com (for-sale, rent, recently sold) with agent contacts, for price-trend monitoring and market research pipelines.

Minimal working input:

```json
{
  "locations": ["New York, NY"],
  "listingType": "for-sale",
  "maxItems": 50,
  "includeDetails": false
}
```

Output fields: `address`, `city`, `state`, `zip`, `neighborhood`, `price`, `priceFormatted`, `pricePerSqft`, `beds`, `baths`, `sqft`, `latitude`, `longitude`, `mlsStatus`, `listingAgent`, `photos`, `description`, `lastClosePrice`, `searchLocation`, `listingType`.

Behavior notes for agents:

- Agent contact data (`listingAgent.phone` / `email`) is only returned with `includeDetails: true` and **only when Compass publicly surfaces it**. It is billed as a separate $0.004 event per result — keep `includeDetails` off for cheap search-only rows.
- Free (non-paying) runs return a capped preview of 10 items; `maxItems` is hard-capped at 1000.
- Deduplicate long-lived references with the stable `pid`; `listingIdSHA` (`_lid/` URLs) can change on relist.

Billing model: Pay-per-event — $0.002 per standard result, +$0.004 per result when agent contact data is included.

### Legal & Compliance Disclaimer

This actor is an independent tool and is **not affiliated with, endorsed by, or sponsored by Compass, Inc.** The name "Compass" and "Compass.com" refer to the company whose public website is the data source; all trademarks belong to their respective owners.

The actor only accesses publicly available pages on Compass.com. Compass's Terms of Use prohibit automated crawling without written permission, and IDX listing data is licensed for personal, non-commercial use. It is your responsibility to review and comply with Compass's terms of service and all applicable laws before using this actor, especially for commercial use.

The output may contain personal data of real estate agents (name, phone, email, brokerage) when publicly listed. Handle this data responsibly: use it only for legitimate business purposes, honor opt-out/unsubscribe requests, and comply with applicable privacy and marketing regulations (e.g., CAN-SPAM, GDPR, CPRA/CDPA) in your jurisdiction. Apify and the actor author are not liable for how you use the scraped data.

# Actor input Schema

## `locations` (type: `array`):

Cities, neighborhoods, or ZIP codes to search (e.g. "New York, NY", "Brooklyn", "94110", "Park Slope"). Each location returns up to ~41 listings per search page; larger markets are split into price bands automatically.

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

Optional: specific Compass homedetails URLs to scrape directly (e.g. https://www.compass.com/homedetails/.../...\_lid/). When provided, these are fetched first and their full details are extracted.

## `listingType` (type: `string`):

Which listing category to scrape.

## `priceMin` (type: `integer`):

Only listings priced at or above this amount.

## `priceMax` (type: `integer`):

Only listings priced at or below this amount.

## `bedsMin` (type: `integer`):

Only listings with at least this many bedrooms.

## `bedsMax` (type: `integer`):

Only listings with at most this many bedrooms.

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

Maximum number of listing rows to scrape. When a market has more than ~41 listings, the actor automatically splits the price range into bands to reach beyond the first search page.

## `includeDetails` (type: `boolean`):

Fetch each listing's detail page for the full description, agent name/phone/brokerage, MLS status, and complete photo gallery. Doubles the number of requests.

## `webhookUrl` (type: `string`):

Optional. When set, the actor POSTs a JSON notification to this URL after detail pages are scraped, so you can bill/charge for detail-heavy runs. Payload: {"event":"detailsScraped","totalItems":N,"detailCount":M,"locations":\[...],"listingType":"..."}. Best-effort only — a failed webhook never fails the run.

## `proxy` (type: `object`):

Select proxies to be used by your crawler.

## Actor input object example

```json
{
  "locations": [
    "New York, NY"
  ],
  "listingType": "for-sale",
  "maxItems": 100,
  "includeDetails": true,
  "proxy": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "locations": [
        "New York, NY"
    ],
    "proxy": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmed_jasarevic/compass-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 = {
    "locations": ["New York, NY"],
    "proxy": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("ahmed_jasarevic/compass-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 '{
  "locations": [
    "New York, NY"
  ],
  "proxy": {
    "useApifyProxy": false
  }
}' |
apify call ahmed_jasarevic/compass-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ahmed_jasarevic/compass-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/24zFFMbnysb6YB7Fx/builds/SKNbrR2yEjLM6JiEF/openapi.json
