{
  "openapi": "3.0.1",
  "info": {
    "title": "Stessa Investment Properties Scraper - Rental Data",
    "description": "Scrape Stessa's investment-property marketplace (formerly Roofstock) for 37k+ turnkey single-family listings. Extract Roofstock Neighborhood Score, rent estimate with low/high/confidence, HOA, MLS number, listing-agent contact, photo array and CBSA metro code. Daily delta feed.",
    "version": "0.0",
    "x-build-id": "2LW6gbFjPwnOcA0S1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/growth-installations~stessa-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-growth-installations-stessa-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/growth-installations~stessa-scraper/runs": {
      "post": {
        "operationId": "runs-sync-growth-installations-stessa-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/growth-installations~stessa-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-growth-installations-stessa-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",
        "properties": {
          "maxItems": {
            "title": "Maximum items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many records. 0 = no cap (crawl all pages).",
            "default": 3
          },
          "maxPages": {
            "title": "Maximum list pages",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on pagination clicks (each page is 24 listings). 0 = up to 50.",
            "default": 0
          },
          "includeOffMarket": {
            "title": "Include Off-Market Beta listings",
            "type": "boolean",
            "description": "Toggle Stessa's Off-Market Beta feed. Higher WTP for distressed-asset investors.",
            "default": false
          },
          "includeSaleComps": {
            "title": "Enrich with sale comps (Playwright, +cost)",
            "type": "boolean",
            "description": "Renders each property's detail page in a headless browser and extracts the 'Comparable sale properties' table (nearby active listings). Written to the `comps` named dataset keyed by property_id.",
            "default": false
          },
          "filters": {
            "title": "Buy-box filters",
            "type": "object",
            "description": "Filter records at scrape time. All fields optional; combine as an AND.",
            "default": {}
          },
          "includeRentComps": {
            "title": "Enrich with rent comps (Playwright, +cost)",
            "type": "boolean",
            "description": "Renders each property's detail page in a headless browser and extracts the 'Comparable rent properties' table (nearby rentals). Written to the `comps` named dataset keyed by property_id.",
            "default": false
          },
          "includeInvestmentCalc": {
            "title": "Enrich with year-1 pro-forma calculator (Playwright, +cost)",
            "type": "boolean",
            "description": "Opens the 'Edit assumptions' modal in a headless browser and captures Stessa's full year-1 pro-forma: purchase price, down payment, loan rate, monthly rent, vacancy %, property tax, PM %, leasing %, HOA, insurance, repairs reserve, mortgage yearly, annual income, operating expenses, NOI, net cash flow. Written to the `comps` dataset alongside comps (if requested).",
            "default": false
          },
          "enrichConcurrency": {
            "title": "Max concurrency (ENRICH phase)",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Number of parallel Playwright browsers for the comps enrichment pass.",
            "default": 2
          },
          "downloadPhotos": {
            "title": "Download property photos to key-value store",
            "type": "boolean",
            "description": "When true, fetches up to 40 photos per property and stores them under photoStoreName. Adds cost per record.",
            "default": false
          },
          "photoStoreName": {
            "title": "Photo key-value store name",
            "type": "string",
            "description": "Named store where downloaded JPEGs live.",
            "default": "stessa-photos"
          },
          "onlyChanged": {
            "title": "Delta mode (only push changed rows)",
            "type": "boolean",
            "description": "Compare each row against the last snapshot; skip unchanged. Unchanged rows billed at discounted rate.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store used to persist snapshots between runs.",
            "default": "roofstock-stessa-state"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy REQUIRED. This site blocks datacenter IPs — the actor will exit with an error if RESIDENTIAL is not selected in the proxy groups.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency (DETAIL phase)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Cap on parallel Cheerio requests for detail pages.",
            "default": 5
          },
          "listConcurrency": {
            "title": "Max concurrency (LIST phase)",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Number of Playwright browsers running LIST pagination in parallel. Almost always 1.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retry a failed request this many times before giving up. Raise for flaky proxies, lower for fast-fail behaviour.",
            "default": 3
          },
          "requestHandlerTimeoutSecs": {
            "title": "Per-request timeout (seconds)",
            "minimum": 10,
            "maximum": 600,
            "type": "integer",
            "description": "Hard timeout per request handler execution. Default 180s to accommodate the LIST phase walking multiple pages.",
            "default": 180
          },
          "sessionPoolMaxSize": {
            "title": "Session pool size",
            "minimum": 4,
            "maximum": 200,
            "type": "integer",
            "description": "Number of long-lived sessions with cookies. Larger pool = more IP rotation but slower cookie warmup.",
            "default": 40
          },
          "sessionMaxUsageCount": {
            "title": "Requests per session before rotation",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Sessions get retired after this many requests, forcing a fresh IP and cookies.",
            "default": 20
          },
          "sameDomainDelaySecs": {
            "title": "Delay between requests to same domain (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Pause between consecutive requests to stessa.com. Only enable if you see 429s. 0 = no delay.",
            "default": 0
          },
          "maxErrorRateAbort": {
            "title": "Abort if DETAIL error rate exceeds",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "If more than this fraction (0.0-1.0) of DETAIL requests fail, abort before running the ENRICH phase to avoid billing on a broken run. 0 = never abort.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}