# Compass Real Estate Scraper (`crawlerbros/compass-scraper`) Actor

Scrape Compass.com real estate listings - homes for sale and for rent across US markets. Get price, beds/baths, square footage, lot size, photos, listing agent, and full property details by city or by listing URL.

- **URL**: https://apify.com/crawlerbros/compass-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Real estate, Automation, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## Compass Real Estate Scraper

Scrape real estate listings from [Compass.com](https://www.compass.com) — one of the largest residential brokerages in the US. Browse homes for sale or for rent by city, neighborhood, or ZIP code, filter by price / beds / baths / property type / sold status, pull the full detail record (description, listing agent, price history, nearby schools, tax assessment) for specific listing URLs, or fetch agent profiles (bio, active listings, sold comps). No login, no cookies, no paid proxy required.

### What this actor does

- **Three modes:** `search` (browse a location), `listingDetail` (full record for specific listing URLs), `agentProfile` (agent bio + active/sold listings)
- **For sale and for rent** — covers both transaction types across every US market Compass operates in
- **Rich filters:** property type, minimum bedrooms, price range, minimum bathrooms, minimum square footage, open-house-only, coming-soon-only, sold-only (recently sold comps)
- **Full listing detail:** description, listing agent name/email/phone/photo/license, amenities, outdoor space, school district + nearby schools with ratings, HOA/condo fees, year built, lot size, MLS type, property condition, pool/spa features, levels, furnished status, MLS status, price/status history, tax assessment, open-house schedule, and rental-only details (pet policy, available date, lease term, security deposit)
- **Agent profiles:** bio, phone/email/photo, specialties, market served, active listings, and closed/sold deals (sales comps) for any Compass agent
- **Photos:** full-resolution image URLs for every listing, with floor-plan images kept in a separate `floorPlans[]` field so they don't get mixed in with room photos
- **Empty fields are omitted** — every field in the output is real, populated data

### Output per listing

#### Search mode

- `listingId`, `sourceUrl`
- `price`, `priceFormatted`
- `address`, `street`, `city`, `state`, `zipCode`, `latitude`, `longitude`
- `bedrooms`, `bathrooms`, `squareFeet`, `lotSize`, `lotAcres`
- `propertyType`, `propertyTypes[]` (present only when the listing spans more than one type, e.g. a multi-family + land combo), `status`, `badges[]`
- `listingCourtesy` (MLS broker attribution line shown on the search card, e.g. `Listing Courtesy of Corcoran Group`; absent on Compass Platform Exclusive/own listings)
- `images[]`, `primaryImage`, `floorPlans[]`
- `listingCategory` (`forSale` / `forRent`)
- `recordType: "listing"`, `scrapedAt`

#### Listing-detail mode (adds)

- `description`
- `mlsNumber` (from the listing's own MLS # field, falling back to its key-details table when the primary field is absent), `mlsStatus`, `parcelNumber`, `feedListingId` (the listing ID as issued by the source MLS/data feed, distinct from Compass's own `listingId`), `compassPropertyId` (stable per-property identifier that persists across re-listings, distinct from `listingId`)
- `neighborhood`, `county`, `schoolDistricts[]`, `elementarySchool`, `middleSchool`, `highSchool`
- `nearbySchools[]` — name, level (Elementary/Middle/High), type, grades, GreatSchools rating, distance, URL
- `propertyTypes[]` (present only when the listing spans more than one type)
- `fullBathrooms`, `halfBathrooms`, `stories`, `lotSizeSquareFeet` (numeric lot size in square feet, alongside the human-readable `lotSize` string), `pricePerSquareFoot`, `parkingSpaces`, `garageSpaces`, `parkingFeatures[]` (e.g. `Attached`, `Assigned`, `Driveway`, `Off Street`)
- `yearBuilt`, `amenities[]`, `outdoorSpace[]`, `waterfront`, `view`, `subdivisionName`
- `daysOnMarket`, `cumulativeDaysOnMarket` (days on market across all re-listings of the same property, not just the current listing), `taxes`, `hoaFees`, `condoFees`
- `mlsType` (e.g. `Residential / Single Family Residence`), `propertyCondition` (e.g. `Updated Remodeled`), `levels` (e.g. `One`, `Two`)
- `lotSizeDimensions` (e.g. `60' x 115'`), `mainLevelBedrooms`, `primaryBedroomOnMainLevel` (boolean)
- `hasPool` (boolean), `poolFeatures`, `spaFeatures`, `hasSpa` (boolean), `isWaterfront` (boolean — authoritative MLS waterfront flag, distinct from the free-text `waterfront` field above)
- `waterAccessDescription` (e.g. `Public`), `taxLot`, `taxBlock`
- `furnished` (e.g. `Furnished`, `Partially Furnished`, `Unfurnished` — mostly on rentals)
- `petPolicy`, `petsAllowedDetails`, `availableDate`, `leaseTerm`, `leaseTermMinMonths`, `leaseTermMaxMonths`, `securityDeposit` (for-rent listings only)
- `tenantPays[]` (utilities the tenant is responsible for, e.g. `Electricity`, `Internet`), `moveInCosts[]` (e.g. `Application Fee`, `First Month Rent`, `Security Deposit`), `tenantPaysDetails` (free-text cost breakdown with concrete dollar amounts, when disclosed — for-rent listings only)
- `taxAssessment` — taxYear, annualTax, monthlyTax, assessedValue, marketValue
- `priceHistory[]` — chronological listing/pending/sold events with date, status, price
- `openHouseSchedule[]` — start/end times (and `isVirtual` flag) for scheduled open houses
- `agentName`, `agentEmail`, `agentPhone`, `agentProfileUrl`, `agentCompany`, `agentPhotoUrl`, `agentLicenseNumber`
- `coListingAgents[]` — additional co-listing/team agents beyond the primary (name, email, phone, company, licenseNumber, role e.g. `Alternative Listing Agent`); common on team-listed luxury condos, absent on single-agent listings
- `buyerAgentCompensation` (e.g. `3%` — the commission offered to a cooperating buyer's agent; only present when the broker discloses it on the MLS record)
- `isSeniorCommunity` (boolean — age-restricted/55+ active-adult community flag)
- `mlsSource` (the MLS/data-feed the listing was sourced from, e.g. `ACTRIS`), `listingCourtesy` (MLS broker attribution line; absent on Compass Platform Exclusive listings), `isOffMls` (boolean)
- `listedAt`, `updatedAt`, `lastSaleDate` (the date this property last sold, from prior transaction history — distinct from `priceHistory`)
- `elementarySchoolDistrict`, `middleSchoolDistrict`, `highSchoolDistrict` (district names, distinct from the school names above)
- `interiorFeatures[]`, `exteriorFeatures[]`, `appliances[]`, `flooring[]`, `constructionMaterials[]`, `communityFeatures[]`, `lotFeatures[]`, `securityFeatures[]` — from the listing's full categorized MLS feature sheet
- `roofType`, `fencing`, `basement`, `heatingType[]`, `coolingType[]`, `sewerType`, `utilities[]`
- `coveredParkingSpaces`, `hasGarage` (boolean)
- `associationName`, `associationFeeIncludes[]`, `taxRate` (e.g. `2.1%`)
- `directions` (driving directions text, when the MLS record includes one)
- `virtualTourUrl` — a real, verified third-party virtual-tour link (only emitted when the underlying field is an actual URL)
- `buildingFeatures[]`, `buildingAttendance[]` (e.g. doorman/lobby-attendant type — condo/co-op buildings)
- `rentIncludes[]`, `minLeaseMonths`, `depositAmount`, `leaseType` (for-rent listings only)
- `badges[]` (corner badges, e.g. `Coming Soon`, `New`, `Listed By Compass`)
- `buildingName`, `buildingFloors`, `buildingUnits` (condo/co-op buildings only — the building as a whole, distinct from the unit's own `stories`)
- `unitFloor` (the unit's own floor number within the building), `buildingPetPolicy`, `buildingAge` (e.g. `Pre-war`, `Post-war`), `buildingType` (e.g. `Lowrise`, `Midrise`, `Highrise`)
- `recordType: "listingDetail"` (distinct from search mode's `"listing"`, so you can tell the two record shapes apart when both are in the same dataset)

#### Agent-profile mode

- `agentName`, `title`, `phone`, `email`, `photoUrl`, `bio`, `specialties`, `market`, `isTeam` (boolean — true when the profile represents a team page rather than a single agent)
- `activeListingsCount`, `activeListings[]` (address, price, beds/baths/sqft, status, photo, URL)
- `closedDealsCount`, `closedListings[]` (sold comps — same compact shape as `activeListings`)
- `sourceUrl`, `recordType: "agentProfile"`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `search` | `search` (browse by location) / `listingDetail` (specific URLs) / `agentProfile` (agent bio + listings) |
| `location` | string | `Austin, TX` | City/neighborhood/ZIP — accepts `City, ST` or a Compass slug like `austin-tx` |
| `listingCategory` | select | `forSale` | `forSale` / `forRent` |
| `propertyType` | select | `any` | `any` / `singleFamily` / `condos` / `townhomes` / `multiFamily` / `land` / `luxury` / `coop` |
| `minBeds` | select | `any` | Minimum bedrooms: `any`, `1`–`6` |
| `minPrice` | int | – | Minimum price (sale price or monthly rent). Listings with no numeric price ("Contact Agent") always pass through, since the filter can't be evaluated against a missing value |
| `maxPrice` | int | – | Maximum price. Same "Contact Agent" pass-through caveat as `minPrice` |
| `minBaths` | number | – | Minimum bathrooms (e.g. `1.5`). Listings with no bathroom count on file always pass through, same pass-through caveat as `minPrice` |
| `minSqft` | int | – | Minimum square footage. Listings with no square-footage figure on file always pass through, same pass-through caveat as `minPrice` |
| `maxSqft` | int | – | Maximum square footage. Same pass-through caveat as `minSqft` |
| `openHouseOnly` | bool | `false` | Only listings with a scheduled open house |
| `comingSoonOnly` | bool | `false` | Only "Coming Soon" listings |
| `soldOnly` | bool | `false` | Only recently sold/closed listings (comps) — `forSale` only, not supported for rentals |
| `pendingOnly` | bool | `false` | Only listings under contract/pending (not yet closed) — supported for both `forSale` and `forRent` |
| `newConstructionOnly` | bool | `false` | Only newly built/new-construction listings — supported for both `forSale` and `forRent` |
| `petFriendlyOnly` | bool | `false` | Only rentals that allow pets — `forRent` only, not supported for home sales |
| `newListingOnly` | bool | `false` | Only listings freshly marked "New" by Compass — supported for both `forSale` and `forRent` |
| `virtualTourOnly` | bool | `false` | Only listings that have a virtual tour — supported for both `forSale` and `forRent` |
| `noFeeOnly` | bool | `false` | Only rentals with no broker/landlord fee ("No Fee" badge, common in NYC) — `forRent` only, not supported for home sales |
| `amenities` | array (select) | – | Only listings with ALL selected amenities: `pool`, `garage`, `doorman`, `elevator`, `waterfront`, `washerDryer`, `privateOutdoorSpace`, `basement`, `airConditioning` — supported for both `forSale` and `forRent` |
| `listingType` | select | `any` | Restrict how the listing is being sold: `any` / `platformExclusives` (Compass-only, not on the MLS) / `mlsListings` / `forSaleByOwner` |
| `listingUrls` | array | – | Compass listing detail URLs (mode=`listingDetail`) |
| `agentUrls` | array | – | Compass agent profile URLs (mode=`agentProfile`), e.g. `https://www.compass.com/agents/shannon-reeve/` |
| `maxItems` | int | `60` | Hard cap on emitted records (1–5000) — see note below on `search` mode's real per-query ceiling |

> **Note (search mode):** Compass's own SEO search-results pagination stops serving new listings past page 20 (20 × 60 = **1,200 listings per query**), even when `totalItems` reports a much larger figure for the market. This is a real limit of Compass's site, not an actor bug — the actor detects the exhaustion (no new unique listing IDs across consecutive pages) and stops cleanly with zero duplicates. To cover a market with more than ~1,200 active listings, narrow the query with `propertyType`, `minBeds`, `minPrice`/`maxPrice`, or a more specific `location` (neighborhood/ZIP instead of city) and run multiple queries.

#### Example: search a city for sale, 3+ beds, under $600k

```json
{
  "mode": "search",
  "location": "Austin, TX",
  "listingCategory": "forSale",
  "minBeds": "3",
  "maxPrice": 600000,
  "maxItems": 100
}
````

#### Example: rentals in a neighborhood

```json
{
  "mode": "search",
  "location": "Miami Beach, FL",
  "listingCategory": "forRent",
  "maxItems": 50
}
```

#### Example: full detail for specific listings

```json
{
  "mode": "listingDetail",
  "listingUrls": [
    "https://www.compass.com/homedetails/14916-Copper-Ridge-Ln-Austin-TX-78734/1FAMQS_pid/"
  ]
}
```

#### Example: recently sold comps in a city

```json
{
  "mode": "search",
  "location": "Austin, TX",
  "listingCategory": "forSale",
  "soldOnly": true,
  "maxItems": 100
}
```

#### Example: agent profile (bio + active/sold listings)

```json
{
  "mode": "agentProfile",
  "agentUrls": [
    "https://www.compass.com/agents/shannon-reeve/"
  ]
}
```

### Use cases

- **Real estate market research** — track pricing and inventory across cities/neighborhoods
- **Lead generation** — pull listing-agent contact details for outreach
- **Investment analysis** — filter by price/sqft/beds to find candidate properties, use `priceHistory`/`taxAssessment` for deeper diligence
- **Comps / appraisal support** — pull recently sold listings (`soldOnly`) or an agent's closed deals for comparable-sales analysis
- **Agent research / recruiting** — pull an agent's bio, specialties, and sales track record
- **Rental market comparisons** — compare for-rent inventory across markets
- **Property aggregators** — enrich your own listings database with Compass data
- **Academic / data-journalism** — study housing-market trends by geography

### FAQ

**Which markets does this cover?** Any US city/neighborhood/ZIP that Compass operates in — Compass is active across most major US metro areas (Austin, Miami, New York, Los Angeles, Chicago, and 90+ more).

**Does it need login or a proxy?** No. Compass serves full listing data on public pages; the actor needs no credentials and no paid proxy.

**How does `location` matching work?** Give a plain `City, State` string (e.g. `Austin, TX` or `Austin, Texas`) and the actor converts it to the matching Compass URL slug. You can also pass a slug directly (e.g. `austin-tx-78734` for a specific ZIP) if you already know it from a compass.com URL.

**Why do some listings have no `bedrooms`/`bathrooms`/`squareFeet`?** Land, lot, and some new-construction listings genuinely don't have those attributes — the field is simply omitted rather than showing a `0` or placeholder.

**What does `minBeds` mean exactly?** "At least N bedrooms" (e.g. `minBeds: "3"` returns 3, 4, 5+ bedroom homes) — matching Compass's own bedroom filter.

**Can I combine `openHouseOnly` and `comingSoonOnly`?** Yes — both filters are enforced together (AND, not one overriding the other). Results will be rare (most open houses are on already-active listings, not coming-soon ones), but a coming-soon listing can carry a scheduled open house badge too, so a handful of matches is normal, not a bug. If you want every open house regardless of coming-soon status, only enable `openHouseOnly`.

**Can I combine `soldOnly` with `openHouseOnly`/`comingSoonOnly`/`newListingOnly`/`virtualTourOnly`?** No — a sold/closed listing's badge is always just `"Closed <date>"` (verified live), never "New", "Virtual Tour", an open-house badge, or "Coming Soon", so this combination can never match anything. The actor fails fast with a clear status message rather than silently sweeping the whole market for zero results if you enable `soldOnly` together with any of these four.

**Does `soldOnly` work for rentals?** No — Compass doesn't expose a reliable sold/closed filter for `listingCategory: forRent` (verified: the URL segment that filters sold sales listings is silently ignored for rentals), so `soldOnly` only applies to `forSale`. The actor fails fast with a clear status message if you combine the two.

**Does `pendingOnly` work for rentals?** Yes — unlike `soldOnly`, Compass exposes a real "Under Contract/Pending" filter for both sale and rental listings (the underlying URL segment name differs by category, handled automatically). `pendingOnly` and `soldOnly` are mutually exclusive (a listing can't be both); the actor fails fast with a clear status message if you enable both at once.

**Does `newConstructionOnly` work for rentals?** Yes — verified server-side for both `forSale` and `forRent`, and it composes freely with every other filter (`minBeds`, `propertyType`, `soldOnly`/`pendingOnly`/`openHouseOnly`/`comingSoonOnly`).

**Does `petFriendlyOnly` work for home sales?** No — Compass only exposes a pet-friendly filter for `listingCategory: forRent` (verified: the `pet-friendly` URL segment is a real server-side filter for rentals — e.g. it drops New York, NY from 2,915 to 220 total rentals — but no equivalent segment/link exists on `homes-for-sale` search pages). The actor fails fast with a clear status message if you enable it with `listingCategory: forSale`.

**How do `newListingOnly`, `virtualTourOnly`, and `noFeeOnly` work?** Compass tags individual listing cards with corner badges ("New", "Virtual Tour", "No Fee") but doesn't expose an authoritative server-side URL filter for any of them (verified live: no SEO segment or sidebar-filter flag changes the market's reported `totalItems` for these three axes). The actor post-filters using each listing's own badge, the same proven approach already used for `openHouseOnly`/`comingSoonOnly`. `noFeeOnly` is `forRent`-only — the "No Fee" badge (waived broker/landlord fee) never appears on home-sale listings; the actor fails fast if you enable it with `listingCategory: forSale`.

**What's in `priceHistory`?** Every MLS status-change event Compass has on file for the listing (list, pending, sold, and any prior listing cycles), each with a date, status label, and price where available — useful for tracking a property's sale/list history over time. It's omitted when Compass has no history on file (e.g. brand-new construction).

**What's in `nearbySchools` vs `elementarySchool`/`middleSchool`/`highSchool`?** The `elementarySchool`/`middleSchool`/`highSchool` fields are the single assigned-district school named in the listing's key details. `nearbySchools` is the fuller GreatSchools-sourced list of every nearby school (public, private, and charter) with its rating, distance, and grade range — useful when you want the full local-school picture, not just the zoned school.

**How does `agentProfile` mode work?** Give it one or more Compass agent profile URLs (`https://www.compass.com/agents/{slug}/`) and it returns that agent's bio, contact info, and a compact roster of their active listings and closed/sold deals (up to 25 of each, embedded directly in the agent's public profile page — no extra requests needed).

**What's in `floorPlans[]`?** Some Compass listings include one or two floor-plan diagram images alongside their room photos; the actor separates these into their own `floorPlans[]` field (both in `search` and `listingDetail` mode) so `images[]`/`primaryImage` stay a clean room-photo gallery. Omitted when the listing has no floor-plan image on file.

**What does `amenities` filter on, and is it authoritative?** Yes — each selected amenity maps to a real, server-side Compass filter (the same "Must Have..." checkboxes in Compass's own "Filters" sidebar), verified live to change the market's reported result count (e.g. `pool` cuts Austin, TX from 5,860 to 2,415 listings; `garage` to 4,500). Selecting multiple amenities requires ALL of them (AND, not OR). Works for both `forSale` and `forRent`.

**What's the difference between `propertyType: coop` and the other property types?** Every other `propertyType` value (`singleFamily`, `condos`, etc.) uses a Compass SEO URL segment (e.g. `/condos/`); `coop` has no such segment — Compass only exposes it through the sidebar filter panel, so the actor applies it via the same mechanism as `amenities`. Verified live on New York, NY (5,687 co-op results) — most US markets outside NYC/Chicago have few or zero co-ops on file, which is a real market characteristic, not an actor bug.

**What does `listingType` filter on?** Compass's own "Listing Type" sidebar section: `mlsListings` restricts to listings sourced from the regional MLS; `platformExclusives` restricts to Compass-only listings not published to the MLS (Compass's "Private Exclusives"/"Coming Soon" program); `forSaleByOwner` restricts to owner-listed properties. Verified live (each changes the market's reported result count). This is independent of `comingSoonOnly`/`newConstructionOnly`, which use their own dedicated, already-authoritative URL segments.

**How fresh is the data?** Listings are scraped live from Compass's server-rendered pages on every run — data reflects Compass's current MLS feed.

**Is there a limit on how many listings I can get from one search?** Compass's own search index stops returning new results after roughly page 20 (~1,200 listings) for a given `location`/filter combination, even if `totalItems` reports a much larger count and `maxItems` is set higher — this is an upstream limit on Compass's side, not a bug in the actor. The actor detects this cleanly (no duplicate or missing records) and stops rather than looping. To get more than ~1,200 listings for a large market, narrow the search with `propertyType`, `minBeds`, or a price range and run multiple queries, or scope to a smaller neighborhood/ZIP.

# Actor input Schema

## `mode` (type: `string`):

Browse listings for a location, fetch full details for specific listing URLs, or fetch agent profiles (bio + active/sold listings).

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

City, neighborhood, or ZIP to browse. Accepts a plain name like `Austin, TX` / `Miami Beach, FL`, or a Compass URL slug like `austin-tx` / `austin-tx-78734`. A ZIP code alone (e.g. `78734`) is not enough - append it to a city slug (`austin-tx-78734`) or just use `City, ST`.

## `listingCategory` (type: `string`):

Browse homes for sale, or homes for rent.

## `propertyType` (type: `string`):

Restrict results to a property type.

## `minBeds` (type: `string`):

Only show listings with at least this many bedrooms.

## `minPrice` (type: `integer`):

Drop listings priced below this amount (sale price or monthly rent).

## `maxPrice` (type: `integer`):

Drop listings priced above this amount (sale price or monthly rent).

## `minBaths` (type: `number`):

Drop listings with fewer bathrooms than this (e.g. 1.5).

## `minSqft` (type: `integer`):

Drop listings smaller than this many square feet.

## `maxSqft` (type: `integer`):

Drop listings larger than this many square feet.

## `openHouseOnly` (type: `boolean`):

Only show listings with a scheduled open house.

## `comingSoonOnly` (type: `boolean`):

Only show listings marked "Coming Soon" (not yet officially on market).

## `soldOnly` (type: `boolean`):

Only show recently sold/closed listings (comps). Only supported when "For sale or for rent" is set to For sale — Compass doesn't expose a reliable sold filter for rentals.

## `pendingOnly` (type: `boolean`):

Only show listings that are under contract or pending (not yet sold/closed). Supported for both for-sale and for-rent. Mutually exclusive with "Sold only".

## `newConstructionOnly` (type: `boolean`):

Only show newly built/new-construction listings. Supported for both for-sale and for-rent.

## `petFriendlyOnly` (type: `boolean`):

Only show rentals that allow pets. Only supported when "For sale or for rent" is set to For rent — Compass doesn't expose a pet-friendly filter for home sales.

## `newListingOnly` (type: `boolean`):

Only show listings freshly marked "New" by Compass. Supported for both for-sale and for-rent.

## `virtualTourOnly` (type: `boolean`):

Only show listings that have a virtual tour. Supported for both for-sale and for-rent.

## `noFeeOnly` (type: `boolean`):

Only show rentals with no broker/landlord fee ("No Fee" badge — common in NYC rental markets). Only supported when "For sale or for rent" is set to For rent.

## `amenities` (type: `array`):

Only show listings with ALL selected amenities/features. Supported for both for-sale and for-rent.

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

Restrict results to how the listing is being sold: through the MLS, as a Compass Platform Exclusive (not on the MLS), or For Sale By Owner.

## `listingUrls` (type: `array`):

Compass.com listing detail URLs, e.g. `https://www.compass.com/homedetails/14916-Copper-Ridge-Ln-Austin-TX-78734/1FAMQS_pid/`.

## `agentUrls` (type: `array`):

Compass.com agent profile URLs, e.g. `https://www.compass.com/agents/shannon-reeve/`.

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

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "search",
  "location": "Austin, TX",
  "listingCategory": "forSale",
  "propertyType": "any",
  "minBeds": "any",
  "openHouseOnly": false,
  "comingSoonOnly": false,
  "soldOnly": false,
  "pendingOnly": false,
  "newConstructionOnly": false,
  "petFriendlyOnly": false,
  "newListingOnly": false,
  "virtualTourOnly": false,
  "noFeeOnly": false,
  "amenities": [],
  "listingType": "any",
  "listingUrls": [],
  "agentUrls": [],
  "maxItems": 60
}
```

# Actor output Schema

## `listings` (type: `string`):

Dataset containing all scraped Compass.com listings.

# 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 = {
    "mode": "search",
    "location": "Austin, TX",
    "listingCategory": "forSale",
    "propertyType": "any",
    "minBeds": "any",
    "openHouseOnly": false,
    "comingSoonOnly": false,
    "soldOnly": false,
    "pendingOnly": false,
    "newConstructionOnly": false,
    "petFriendlyOnly": false,
    "newListingOnly": false,
    "virtualTourOnly": false,
    "noFeeOnly": false,
    "amenities": [],
    "listingType": "any",
    "listingUrls": [],
    "agentUrls": [],
    "maxItems": 60
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/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 = {
    "mode": "search",
    "location": "Austin, TX",
    "listingCategory": "forSale",
    "propertyType": "any",
    "minBeds": "any",
    "openHouseOnly": False,
    "comingSoonOnly": False,
    "soldOnly": False,
    "pendingOnly": False,
    "newConstructionOnly": False,
    "petFriendlyOnly": False,
    "newListingOnly": False,
    "virtualTourOnly": False,
    "noFeeOnly": False,
    "amenities": [],
    "listingType": "any",
    "listingUrls": [],
    "agentUrls": [],
    "maxItems": 60,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlerbros/compass-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 '{
  "mode": "search",
  "location": "Austin, TX",
  "listingCategory": "forSale",
  "propertyType": "any",
  "minBeds": "any",
  "openHouseOnly": false,
  "comingSoonOnly": false,
  "soldOnly": false,
  "pendingOnly": false,
  "newConstructionOnly": false,
  "petFriendlyOnly": false,
  "newListingOnly": false,
  "virtualTourOnly": false,
  "noFeeOnly": false,
  "amenities": [],
  "listingType": "any",
  "listingUrls": [],
  "agentUrls": [],
  "maxItems": 60
}' |
apify call crawlerbros/compass-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Compass Real Estate Scraper",
        "description": "Scrape Compass.com real estate listings - homes for sale and for rent across US markets. Get price, beds/baths, square footage, lot size, photos, listing agent, and full property details by city or by listing URL.",
        "version": "1.0",
        "x-build-id": "LrvyjWxPoYfa51ZmI"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlerbros~compass-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlerbros-compass-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/crawlerbros~compass-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlerbros-compass-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/crawlerbros~compass-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlerbros-compass-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": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "search",
                            "listingDetail",
                            "agentProfile"
                        ],
                        "type": "string",
                        "description": "Browse listings for a location, fetch full details for specific listing URLs, or fetch agent profiles (bio + active/sold listings).",
                        "default": "search"
                    },
                    "location": {
                        "title": "Location (mode=search)",
                        "type": "string",
                        "description": "City, neighborhood, or ZIP to browse. Accepts a plain name like `Austin, TX` / `Miami Beach, FL`, or a Compass URL slug like `austin-tx` / `austin-tx-78734`. A ZIP code alone (e.g. `78734`) is not enough - append it to a city slug (`austin-tx-78734`) or just use `City, ST`.",
                        "default": "Austin, TX"
                    },
                    "listingCategory": {
                        "title": "For sale or for rent",
                        "enum": [
                            "forSale",
                            "forRent"
                        ],
                        "type": "string",
                        "description": "Browse homes for sale, or homes for rent.",
                        "default": "forSale"
                    },
                    "propertyType": {
                        "title": "Property type",
                        "enum": [
                            "any",
                            "singleFamily",
                            "condos",
                            "townhomes",
                            "multiFamily",
                            "land",
                            "luxury",
                            "coop"
                        ],
                        "type": "string",
                        "description": "Restrict results to a property type.",
                        "default": "any"
                    },
                    "minBeds": {
                        "title": "Minimum bedrooms",
                        "enum": [
                            "any",
                            "1",
                            "2",
                            "3",
                            "4",
                            "5",
                            "6"
                        ],
                        "type": "string",
                        "description": "Only show listings with at least this many bedrooms.",
                        "default": "any"
                    },
                    "minPrice": {
                        "title": "Minimum price ($)",
                        "minimum": 0,
                        "maximum": 100000000,
                        "type": "integer",
                        "description": "Drop listings priced below this amount (sale price or monthly rent)."
                    },
                    "maxPrice": {
                        "title": "Maximum price ($)",
                        "minimum": 0,
                        "maximum": 100000000,
                        "type": "integer",
                        "description": "Drop listings priced above this amount (sale price or monthly rent)."
                    },
                    "minBaths": {
                        "title": "Minimum bathrooms",
                        "minimum": 0,
                        "maximum": 20,
                        "type": "number",
                        "description": "Drop listings with fewer bathrooms than this (e.g. 1.5)."
                    },
                    "minSqft": {
                        "title": "Minimum square feet",
                        "minimum": 0,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Drop listings smaller than this many square feet."
                    },
                    "maxSqft": {
                        "title": "Maximum square feet",
                        "minimum": 0,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Drop listings larger than this many square feet."
                    },
                    "openHouseOnly": {
                        "title": "Open houses only",
                        "type": "boolean",
                        "description": "Only show listings with a scheduled open house.",
                        "default": false
                    },
                    "comingSoonOnly": {
                        "title": "Coming soon only",
                        "type": "boolean",
                        "description": "Only show listings marked \"Coming Soon\" (not yet officially on market).",
                        "default": false
                    },
                    "soldOnly": {
                        "title": "Sold only",
                        "type": "boolean",
                        "description": "Only show recently sold/closed listings (comps). Only supported when \"For sale or for rent\" is set to For sale — Compass doesn't expose a reliable sold filter for rentals.",
                        "default": false
                    },
                    "pendingOnly": {
                        "title": "Pending / under contract only",
                        "type": "boolean",
                        "description": "Only show listings that are under contract or pending (not yet sold/closed). Supported for both for-sale and for-rent. Mutually exclusive with \"Sold only\".",
                        "default": false
                    },
                    "newConstructionOnly": {
                        "title": "New construction only",
                        "type": "boolean",
                        "description": "Only show newly built/new-construction listings. Supported for both for-sale and for-rent.",
                        "default": false
                    },
                    "petFriendlyOnly": {
                        "title": "Pet friendly only",
                        "type": "boolean",
                        "description": "Only show rentals that allow pets. Only supported when \"For sale or for rent\" is set to For rent — Compass doesn't expose a pet-friendly filter for home sales.",
                        "default": false
                    },
                    "newListingOnly": {
                        "title": "New listings only",
                        "type": "boolean",
                        "description": "Only show listings freshly marked \"New\" by Compass. Supported for both for-sale and for-rent.",
                        "default": false
                    },
                    "virtualTourOnly": {
                        "title": "Virtual tour only",
                        "type": "boolean",
                        "description": "Only show listings that have a virtual tour. Supported for both for-sale and for-rent.",
                        "default": false
                    },
                    "noFeeOnly": {
                        "title": "No fee only",
                        "type": "boolean",
                        "description": "Only show rentals with no broker/landlord fee (\"No Fee\" badge — common in NYC rental markets). Only supported when \"For sale or for rent\" is set to For rent.",
                        "default": false
                    },
                    "amenities": {
                        "title": "Must-have amenities",
                        "type": "array",
                        "description": "Only show listings with ALL selected amenities/features. Supported for both for-sale and for-rent.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "pool",
                                "garage",
                                "doorman",
                                "elevator",
                                "waterfront",
                                "washerDryer",
                                "privateOutdoorSpace",
                                "basement",
                                "airConditioning"
                            ],
                            "enumTitles": [
                                "Pool",
                                "Garage",
                                "Doorman",
                                "Elevator",
                                "Waterfront",
                                "Washer/dryer in unit",
                                "Private outdoor space",
                                "Basement",
                                "Air conditioning"
                            ]
                        },
                        "default": []
                    },
                    "listingType": {
                        "title": "Listing type",
                        "enum": [
                            "any",
                            "platformExclusives",
                            "mlsListings",
                            "forSaleByOwner"
                        ],
                        "type": "string",
                        "description": "Restrict results to how the listing is being sold: through the MLS, as a Compass Platform Exclusive (not on the MLS), or For Sale By Owner.",
                        "default": "any"
                    },
                    "listingUrls": {
                        "title": "Listing URLs (mode=listingDetail)",
                        "type": "array",
                        "description": "Compass.com listing detail URLs, e.g. `https://www.compass.com/homedetails/14916-Copper-Ridge-Ln-Austin-TX-78734/1FAMQS_pid/`.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "agentUrls": {
                        "title": "Agent profile URLs (mode=agentProfile)",
                        "type": "array",
                        "description": "Compass.com agent profile URLs, e.g. `https://www.compass.com/agents/shannon-reeve/`.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Hard cap on emitted records.",
                        "default": 60
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
