# Compass Scraper (`getdataforme/compass-scraper`) Actor

The Compass Scraper is a web crawler that extracts real estate listings from Compass. It collects details like price, location, size, bedrooms, bathrooms, and listing status. The scraper efficiently handles pagination and dynamic content, providing up-to-date, accurate insights.

- **URL**: https://apify.com/getdataforme/compass-scraper.md
- **Developed by:** [GetDataForMe](https://apify.com/getdataforme) (community)
- **Categories:** Real estate
- **Features:** Full permissions
- **Stats:** 20 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$30.00 / 1,000 results

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

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Compass Scraper Documentation

Looking to scrape property listings from **Compass.com**? The **Compass Scraper** allows you to efficiently extract detailed property data from Compass listings. Whether you're interested in price, amenities, or school information, this actor has you covered.

**Note**: Please activate the proxy to avoid any interruptions when scraping data.

### How This Compass Scraper Works

- Rent the **Compass Scraper** and enjoy a **2-hour free trial** to test the actor and determine if it fits your needs.
- Simply input the URL of the property listing you'd like to scrape. The scraper will then extract the relevant details.
- Once the scraping process is complete, you will receive the data in a structured and readable format.

#### Configuration Inputs

To use the **Compass Scraper**, you need to provide the following input configuration:

```json
{
    "proxyConfiguration": {
        "useApifyProxy": true
    },
    "urls": [
        "https://www.compass.com/listing/113-jefferson-drive-columbia-tn-38401/1721827764917827545/"
    ]
}
```

- **proxyConfiguration**: Set to `true` to use Apify Proxy for uninterrupted data extraction.
- **urls**: Provide the URLs of the Compass property listings you wish to scrape.

#### Compass Scraper Output Result Sample

After the scraping is complete, you will receive the following output:

```json
[
    {
        "title": "113 Jefferson Drive, Columbia, TN, 38401",
        "property_type": null,
        "price": null,
        "bedrooms": 4,
        "bathrooms": 5,
        "square_footage": null,
        "lot_size": null,
        "year_built": null,
        "street_address": "113 Jefferson Drive",
        "city": "Columbia",
        "state": "TN",
        "zip_code": "38401",
        "neighborhood": "Columbia",
        "parking_spaces": null,
        "heating": null,
        "cooling": null,
        "HOA_fees": null,
        "property_tax": null,
        "image_urls": [],
        "listing_agent_name": null,
        "listing_agency_name": null,
        "listing_agency_phone": null,
        "listing_agent_email": null,
        "listing_date": null,
        "MLS_number": null,
        "price_history": [],
        "description": "",
        "property_status": "Canceled",
        "nearby_schools": [
            "R Howell Elementary School",
            "E. A. Cox Middle School",
            "Columbia Central High School",
            "Northfield Academy",
            "Virtual Academy of Maury County",
            "Columbia Academy",
            "Calvary Baptist Academy"
        ]
    }
]
```

The returned fields include:

- **title**: The title of the listing, which includes the address of the property.
- **property_type**: The type of the property (e.g., single-family home, condo).
- **price**: The price of the property (if available).
- **bedrooms**: The number of bedrooms in the property.
- **bathrooms**: The number of bathrooms in the property.
- **square_footage**: The size of the property in square feet (if available).
- **lot_size**: The size of the lot (if available).
- **year_built**: The year the property was built (if available).
- **street_address**: The street address of the property.
- **city**: The city where the property is located.
- **state**: The state where the property is located.
- **zip_code**: The zip code of the property.
- **neighborhood**: The neighborhood in which the property is located.
- **parking_spaces**: The number of parking spaces available (if available).
- **heating**: The heating system of the property (if available).
- **cooling**: The cooling system of the property (if available).
- **HOA_fees**: The HOA fees (if available).
- **property_tax**: The property tax (if available).
- **image_urls**: URLs to images of the property (if available).
- **listing_agent_name**: The name of the listing agent (if available).
- **listing_agency_name**: The name of the agency representing the listing (if available).
- **listing_agency_phone**: The contact phone number of the listing agency (if available).
- **listing_agent_email**: The contact email of the listing agent (if available).
- **listing_date**: The date when the listing was published (if available).
- **MLS_number**: The MLS number of the property (if available).
- **price_history**: Historical price data for the property (if available).
- **description**: A description of the property.
- **property_status**: The status of the property (e.g., Active, Canceled, Sold).
- **nearby_schools**: A list of schools near the property.

### Support

For more custom/simplified outputs or if you encounter any bugs, please contact support@getdataforme.com or report an issue.

You can also easily reach us here: [Get Data For Me Contact](https://getdataforme.com/contact/)

When reaching out, please include the email subject and any specific support requests you have.

Thank you for choosing the **Compass Scraper**! Happy scraping!

# Actor input Schema

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

A list of URLs of the web pages you want to scrape data from.

## `proxyConfiguration` (type: `object`):

Specifies proxy servers that will be used by the scraper in order to hide its origin.

## Actor input object example

```json
{
  "urls": [
    "https://www.compass.com/listing/113-jefferson-drive-columbia-tn-38401/1721827764917827545/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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": [
        "https://www.compass.com/listing/113-jefferson-drive-columbia-tn-38401/1721827764917827545/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("getdataforme/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 = {
    "urls": ["https://www.compass.com/listing/113-jefferson-drive-columbia-tn-38401/1721827764917827545/"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("getdataforme/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 '{
  "urls": [
    "https://www.compass.com/listing/113-jefferson-drive-columbia-tn-38401/1721827764917827545/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call getdataforme/compass-scraper --silent --output-dataset

```

## MCP server setup

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