# 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
- **Stats:** 18 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

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

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

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

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

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

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

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

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

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

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

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


# README

## 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("💾 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": [
    "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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=getdataforme/compass-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Compass Scraper",
        "description": "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.",
        "version": "0.0",
        "x-build-id": "vGUJbgG7SWfpICfPb"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/getdataforme~compass-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-getdataforme-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/getdataforme~compass-scraper/runs": {
            "post": {
                "operationId": "runs-sync-getdataforme-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/getdataforme~compass-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-getdataforme-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": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "List of URLs of the Compass pages",
                        "type": "array",
                        "description": "A list of URLs of the web pages you want to scrape data from.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Specifies proxy servers that will be used by the scraper in order to hide its origin.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
