{
  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}