{
  "openapi": "3.0.1",
  "info": {
    "title": "DealStream Businesses for Sale & Broker Scraper",
    "description": "Extract 100% live DealStream businesses for sale with asking prices, gross revenue, verbatim Cash Flow/SDE, calculated valuation multiples, $5M-capped SBA 7(a) DSCR underwriting, native Deal Terms, and verified public broker cross-post emails, phones, websites, and LinkedIn profiles.",
    "version": "0.0",
    "x-build-id": "sxgU4mrnnk9eQlmLx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/unique_dev~dealstream-businesses-for-sale-broker-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-unique_dev-dealstream-businesses-for-sale-broker-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/unique_dev~dealstream-businesses-for-sale-broker-scraper/runs": {
      "post": {
        "operationId": "runs-sync-unique_dev-dealstream-businesses-for-sale-broker-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/unique_dev~dealstream-businesses-for-sale-broker-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-unique_dev-dealstream-businesses-for-sale-broker-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": {
          "categories": {
            "title": "Industry Categories",
            "type": "array",
            "description": "DealStream business-for-sale categories to extract (e.g., ['manufacturing', 'construction-and-contractors', 'technology-and-media', 'healthcare', 'wholesale-and-distribution', 'business-services', 'accounting-and-tax', 'automotive', 'transportation-and-logistics']). Leave empty for all categories.",
            "default": [
              "manufacturing",
              "construction-and-contractors",
              "technology-and-media",
              "healthcare",
              "wholesale-and-distribution"
            ],
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "US States Filter",
            "type": "array",
            "description": "2-letter US state codes or full state names to filter business-for-sale opportunities by (e.g., ['TX', 'FL', 'CA', 'OH', 'NC', 'NY', 'GA', 'IL', 'PA', 'AZ']). Leave empty for nationwide.",
            "default": [
              "TX",
              "FL",
              "CA",
              "OH",
              "NC"
            ],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Niche Keywords Filter (Optional)",
            "type": "array",
            "description": "Optional niche keywords to filter live DealStream listings by (e.g., ['HVAC', 'plumbing', 'CNC', 'MSP', 'SaaS', 'CPA', 'accounting', 'home health', 'pharmacy', 'trucking']). Leave empty for all listings in selected categories.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (Optional Direct DealStream URLs)",
            "type": "array",
            "description": "Optional direct DealStream category, state, or listing URLs (e.g., https://dealstream.com/texas-businesses-for-sale or https://dealstream.com/d/biz-sale/machinery-mfg/emkz3q).",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "minAskingPrice": {
            "title": "Minimum Asking Price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum business asking price in USD (0 for no minimum).",
            "default": 0
          },
          "maxAskingPrice": {
            "title": "Maximum Asking Price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum business asking price in USD (default $25,000,000).",
            "default": 25000000
          },
          "minCashFlow": {
            "title": "Minimum Cash Flow / SDE (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum annual Seller's Discretionary Earnings (SDE) / cash flow in USD (0 for no minimum).",
            "default": 0
          },
          "maxMultiple": {
            "title": "Maximum Valuation Multiple (Asking Price / Cash Flow SDE)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Maximum acceptable valuation multiple (askingPrice / cashFlowSde). Default 10.0x.",
            "default": 10
          },
          "sbaInterestRatePct": {
            "title": "Modeled SBA 7(a) Annual Interest Rate (%)",
            "minimum": 1,
            "maximum": 30,
            "type": "number",
            "description": "Annual interest rate percentage used to calculate SBA 7(a) debt service (default 10.5%).",
            "default": 10.5
          },
          "sbaTermYears": {
            "title": "Modeled SBA 7(a) Loan Amortization Term (Years)",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Loan amortization term in years for SBA 7(a) acquisition debt modeling (default 10 years).",
            "default": 10
          },
          "strictFilters": {
            "title": "Strict Filter Enforcement",
            "type": "boolean",
            "description": "When enabled, outputs only listings that strictly match every filter criterion without topping up from other discovered live DealStream listings.",
            "default": false
          },
          "enrichBrokerContacts": {
            "title": "Resolve Verified Business Broker & M&A Advisory Contacts",
            "type": "boolean",
            "description": "When enabled (default), enriches corporate brokerage emails, phones, websites, and LinkedIn profiles whenever disclosed on DealStream or verified via an exact public brokerage cross-posting (includes clickable brokerCrosspostUrl proof; stays null when NDA-only).",
            "default": true
          },
          "onlyNewListings": {
            "title": "Stateful Delta Mode (Only New or Updated Listings)",
            "type": "boolean",
            "description": "When enabled, computes SHA-256 listing snapshots against Apify Key-Value Store ('DEALSTREAM-STATE') and outputs only new or updated business-for-sale listings.",
            "default": false
          },
          "onlyPriceDrops": {
            "title": "Only Price Drops (Historical Reductions)",
            "type": "boolean",
            "description": "When enabled, returns only listings that have recorded an asking price reduction compared to their original observed asking price.",
            "default": false
          },
          "minDaysOnMarket": {
            "title": "Minimum Days on Market",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum tracked days on market (0 for no minimum). Useful for spotting motivated sellers on stale listings.",
            "default": 0
          },
          "forceLiveRefresh": {
            "title": "Force Fresh Live Crawl",
            "type": "boolean",
            "description": "When enabled, bypasses historical snapshot lookup and fetches every listing fresh directly from DealStream.",
            "default": false
          },
          "stateKey": {
            "title": "Key-Value Store State Key",
            "type": "string",
            "description": "Named Apify Key-Value Store used for stateful SHA-256 delta change tracking across runs.",
            "default": "DEALSTREAM-STATE"
          },
          "maxItems": {
            "title": "Maximum Items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of live DealStream business-for-sale listings to extract in a single run (1 to 10,000).",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Proxy settings for DealStream requests (Residential proxies recommended on cloud datacenters).",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}