{
  "openapi": "3.0.1",
  "info": {
    "title": "Businesses For Sale Scraper - DealStream Listings & Deals",
    "description": "Reads businesses, franchises and M&A deals listed for sale on DealStream: asking price, cash flow, revenue, industry, county level location and the full deal terms, from a marketplace of 16,900 live listings.",
    "version": "0.1",
    "x-build-id": "NptwybOfFUQsZ1FTf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~dealstream-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-dealstream-listings-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/parseforge~dealstream-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-dealstream-listings-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/parseforge~dealstream-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-dealstream-listings-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": {
          "browsePaths": {
            "title": "Browse pages",
            "uniqueItems": true,
            "type": "array",
            "description": "DealStream browse slugs to walk, for example 'tobacco-shops-for-sale', 'florida-businesses-for-sale' or 'broward-county-businesses-for-sale'. Leave empty to walk 'businesses-for-sale', which is the whole marketplace. Turn on the category directory output once to get the full list of valid slugs.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: limited to 10 items (preview). Paid users: up to 1,000,000."
          },
          "maxPagesPerBrowsePath": {
            "title": "Max pages per browse page",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "How deep to page into each browse slug. Each page holds 25 listings. DealStream's bot defence lets a browser session read about 11 pages before it cuts in, so the actor opens a fresh browser when that happens; a lower number here means fewer browser restarts and a cheaper run."
          },
          "outputs": {
            "title": "Outputs",
            "uniqueItems": true,
            "type": "array",
            "description": "What the run collects. Listings is the marketplace inventory. Category directory is one row per browse page DealStream publishes, with its slug, which is how you learn the valid values for the field above. Pick both and maxItems is split evenly, with whatever one does not use rolling into the other.",
            "items": {
              "type": "string",
              "enum": [
                "listings",
                "categories"
              ],
              "enumTitles": [
                "Business listings",
                "Browse category directory"
              ]
            },
            "default": [
              "listings"
            ]
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional. Paste DealStream listing URLs (https://dealstream.com/d/...) to read those exact listings instead of walking a browse page. Ignored when empty.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "keywords": {
            "title": "Keywords",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only listings whose title, industry or summary contains one of these words. DealStream's own search box is off limits under its robots file, so this filter runs on the rows the browse page returned. A listing dropped here is never billed.",
            "items": {
              "type": "string"
            }
          },
          "minAskingPriceUsd": {
            "title": "Minimum asking price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop listings priced below this. Listings with no published price are dropped by any price filter; leave both empty to keep them."
          },
          "maxAskingPriceUsd": {
            "title": "Maximum asking price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop listings priced above this."
          },
          "minCashFlowUsd": {
            "title": "Minimum cash flow (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop listings whose published cash flow is below this. Listings with no published cash flow are dropped when this is set."
          },
          "states": {
            "title": "States or regions",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only listings in these regions, as DealStream spells them: 'Florida', 'Texas', 'Ontario'. Matched case insensitively against the region in the listing's structured data.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries",
            "uniqueItems": true,
            "type": "array",
            "description": "Two letter country codes as DealStream publishes them, for example 'US', 'CA', 'GB'.",
            "items": {
              "type": "string"
            }
          },
          "requireRealEstate": {
            "title": "Only listings that include real estate",
            "type": "boolean",
            "description": "Keep only listings flagged 'Real Estate Included'.",
            "default": false
          },
          "requireSellerFinancing": {
            "title": "Only listings with seller financing",
            "type": "boolean",
            "description": "Keep only listings flagged 'Seller Financing'.",
            "default": false
          },
          "requireManagementStays": {
            "title": "Only listings where management stays",
            "type": "boolean",
            "description": "Keep only listings flagged 'Management Will Stay'.",
            "default": false
          },
          "requireRelocatable": {
            "title": "Only relocatable listings",
            "type": "boolean",
            "description": "Keep only listings flagged 'Relocatable'.",
            "default": false
          },
          "includeFullDescription": {
            "title": "Include the full description",
            "type": "boolean",
            "description": "Opens each listing's own page and adds the complete seller write up. The browse page carries only a truncated summary. One extra page load per listing.",
            "default": false
          },
          "includeFinancials": {
            "title": "Include revenue and the financials block",
            "type": "boolean",
            "description": "Adds the listing's published revenue, plus asking price and cash flow as the financials table states them. Revenue appears only on the listing page, never on the browse page.",
            "default": false
          },
          "includeDealTerms": {
            "title": "Include the deal terms",
            "type": "boolean",
            "description": "Adds the ten deal conditions DealStream publishes: represented by a broker, buyer fee, seller financing, willing to co-broke, principals only, franchise, management will stay, relocatable and real estate.",
            "default": false
          },
          "includeDates": {
            "title": "Include the listing dates",
            "type": "boolean",
            "description": "Adds the date the listing was first posted and the date it was last renewed, which is how you tell a fresh deal from one that has been sitting.",
            "default": false
          },
          "includeCategoryPath": {
            "title": "Include the category path",
            "type": "boolean",
            "description": "Adds the breadcrumb category hierarchy from the listing page and the browse URL of each level.",
            "default": false
          },
          "includeRawJsonLd": {
            "title": "Include the raw structured data",
            "type": "boolean",
            "description": "Adds DealStream's own schema.org Product record for the listing, untouched. Useful when you want a field this actor does not map.",
            "default": false
          },
          "proxyMode": {
            "title": "Proxy",
            "enum": [
              "residential",
              "none"
            ],
            "type": "string",
            "description": "DealStream remembers the IP that its bot defence blocked, so a shared datacenter address stops working after a few hundred listings. Residential is the default for that reason. 'None' is cheaper and works from a clean address, so it is worth trying for small runs.",
            "default": "residential"
          },
          "countryCode": {
            "title": "Proxy country",
            "type": "string",
            "description": "Two letter country for the residential proxy. DealStream is a US marketplace, so US is the default.",
            "default": "US"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}