{
  "openapi": "3.0.1",
  "info": {
    "title": "BizBuySell Scraper - Businesses for Sale & Cash Flow",
    "description": "Scrape BizBuySell businesses for sale by keyword, state, city or URL: asking price, cash flow, category, seller financing, broker and phone. Optional listing page with revenue, EBITDA, inventory, employees, rent and reason for selling. New-listing alerts.",
    "version": "0.1",
    "x-build-id": "DsqlhlL00eKDSnt4B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~bizbuysell-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-bizbuysell-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/scrapewise~bizbuysell-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-bizbuysell-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/scrapewise~bizbuysell-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-bizbuysell-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": {
          "searchTerms": {
            "title": "Keywords",
            "type": "array",
            "description": "Words to search in BizBuySell listings, one per line (for example laundromat, hvac, car wash, amazon fba). Each keyword runs as its own search, combined with every location below. Leave empty to list everything in the locations.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations (US states or cities)",
            "type": "array",
            "description": "US states or cities, one per line: Texas, TX, Dallas TX or Miami, Florida. Leave empty to search the whole country.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "BizBuySell categories, one per line, as on the site: an industry (Restaurants & Food, Service Businesses, Online & Technology) or a narrower one (Bars, Pubs & Taverns, Laundromats). The URL piece (restaurants-and-food) and BizBuySell's category ids (17) also work. Each category runs in each location and with each keyword. Leave empty for all categories.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "BizBuySell URLs",
            "type": "array",
            "description": "A list of URLs copied from bizbuysell.com, for example [\"https://www.bizbuysell.com/texas-businesses-for-sale/\", \"https://www.bizbuysell.com/restaurants-and-food-businesses-for-sale/\"]. Search, state, city and category URLs are paged by the Actor (the page number in the URL is ignored, its ?q= filters are kept). Listing URLs (/business-opportunity/...) come back with the full listing page. Items can also be objects such as {\"url\": \"https://...\"}."
          },
          "minPrice": {
            "title": "Minimum asking price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings asking at least this much. Uses BizBuySell's own filter."
          },
          "maxPrice": {
            "title": "Maximum asking price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings asking at most this much. Uses BizBuySell's own filter."
          },
          "minCashFlow": {
            "title": "Minimum cash flow (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with at least this seller's discretionary earnings (SDE) per year. Uses BizBuySell's own filter. BizBuySell's filter also lets through listings whose seller did not disclose cash flow (cashFlow null)."
          },
          "maxCashFlow": {
            "title": "Maximum cash flow (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with at most this cash flow per year. Uses BizBuySell's own filter."
          },
          "minRevenue": {
            "title": "Minimum gross revenue (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with at least this gross revenue per year. Uses BizBuySell's own filter."
          },
          "maxRevenue": {
            "title": "Maximum gross revenue (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with at most this gross revenue per year. Uses BizBuySell's own filter."
          },
          "listedWithinDays": {
            "title": "Listed in the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings added in the last N days (for example 7). Uses BizBuySell's own filter."
          },
          "establishedAfter": {
            "title": "Established after (year)",
            "minimum": 1800,
            "maximum": 2100,
            "type": "integer",
            "description": "Only businesses established after this year (for example 2015). Uses BizBuySell's own filter."
          },
          "listingType": {
            "title": "Listing type",
            "enum": [
              "all",
              "established",
              "asset-sale",
              "startup"
            ],
            "type": "string",
            "description": "All listings, only established businesses, only asset sales or only startups. Uses BizBuySell's own filter.",
            "default": "all"
          },
          "sellerFinancingOnly": {
            "title": "Seller financing only",
            "type": "boolean",
            "description": "Only listings where the seller offers financing. Listings that do not match are skipped and not charged; maxItems counts only matching listings.",
            "default": false
          },
          "realEstateIncludedOnly": {
            "title": "Real estate included only",
            "type": "boolean",
            "description": "Only listings that include the real estate. Listings that do not match are skipped and not charged; maxItems counts only matching listings.",
            "default": false
          },
          "priceReducedOnly": {
            "title": "Price reduced only",
            "type": "boolean",
            "description": "Only listings whose asking price was reduced. Listings that do not match are skipped and not charged; maxItems counts only matching listings.",
            "default": false
          },
          "maxItems": {
            "title": "Max listings per search",
            "minimum": 0,
            "type": "integer",
            "description": "Stop each search (each keyword and location pair, or URL) after this many listings. BizBuySell pages 50 at a time, up to 10,000 per search. 0 = up to 10,000.",
            "default": 50
          },
          "maxTotalItems": {
            "title": "Max listings in the whole run",
            "minimum": 0,
            "type": "integer",
            "description": "Optional cap across all searches and URLs together, so a run with many keywords, locations or categories never delivers (or charges) more than this. 0 or empty = no cap."
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "default",
              "newest",
              "price-asc",
              "price-desc",
              "cashflow-desc",
              "cashflow-asc"
            ],
            "type": "string",
            "description": "BizBuySell's own order for the results: its default, newest first, asking price or cash flow. With a limit, this decides which listings you get.",
            "default": "default"
          },
          "maxPages": {
            "title": "Max pages per search",
            "minimum": 0,
            "type": "integer",
            "description": "Optional: stop each search after this many result pages of 50. 0 or empty = no page limit (up to 200)."
          },
          "includeDetails": {
            "title": "Full listing pages",
            "type": "boolean",
            "description": "Also open each listing's own page: gross revenue, EBITDA, inventory and FF&E, year established, employees, real estate, rent and lease, facilities, competition, growth, financing terms, support and training, reason for selling, the full description and the street address when published. Charged as a second event per listing, plus one small fee per run that opens listing pages.",
            "default": false
          },
          "includeFranchises": {
            "title": "Include franchise ads",
            "type": "boolean",
            "description": "BizBuySell mixes new-franchise ads into the results. They are skipped by default; turn this on to keep them.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new listings since the last run",
            "type": "boolean",
            "description": "For scheduled runs. Remembers which listings each search (with its filters) already returned, in a named key-value store in your account ('bizbuysell-scraper-state'), and delivers only listings not seen before. The first run delivers up to the limit and marks everything it read as seen. Seen listings are not delivered and not charged. Delete the store to start over.",
            "default": false
          },
          "trackPriceChanges": {
            "title": "Track asking price changes",
            "type": "boolean",
            "description": "Compares each listing's asking price with the one seen in your previous runs of the same search and adds previousPrice, priceChange, priceChangePct, isPriceDrop, isNewListing, firstSeenAt and previousSeenAt. With 'Only new listings' on too, listings whose price changed are delivered as well.",
            "default": false
          },
          "onlyPriceDrops": {
            "title": "Only price drops (not increases)",
            "type": "boolean",
            "description": "With 'Only new listings' and 'Track asking price changes' both on: of the listings seen before, deliver only those whose asking price went down.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Works with the default Apify Proxy. If you get BLOCKED rows, switch to the RESIDENTIAL group with country US.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}