{
  "openapi": "3.0.1",
  "info": {
    "title": "BizBuySell Scraper - Businesses For Sale & Broker Leads",
    "description": "Scrape BizBuySell businesses-for-sale listings by state, category, price or URL. Get asking price, cash flow, EBITDA, gross revenue, broker name & phone, location, financing & lead score.",
    "version": "0.1",
    "x-build-id": "1pvPTNst9S7kmlazl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~bizbuysell-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~bizbuysell-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-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/scrapesage~bizbuysell-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-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": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "US states to scrape businesses for sale from. Leave empty to scrape the nationwide feed (or use Search URLs / Categories).",
            "items": {
              "type": "string",
              "enum": [
                "Alabama",
                "Alaska",
                "Arizona",
                "Arkansas",
                "California",
                "Colorado",
                "Connecticut",
                "Delaware",
                "District of Columbia",
                "Florida",
                "Georgia",
                "Hawaii",
                "Idaho",
                "Illinois",
                "Indiana",
                "Iowa",
                "Kansas",
                "Kentucky",
                "Louisiana",
                "Maine",
                "Maryland",
                "Massachusetts",
                "Michigan",
                "Minnesota",
                "Mississippi",
                "Missouri",
                "Montana",
                "Nebraska",
                "Nevada",
                "New Hampshire",
                "New Jersey",
                "New Mexico",
                "New York",
                "North Carolina",
                "North Dakota",
                "Ohio",
                "Oklahoma",
                "Oregon",
                "Pennsylvania",
                "Rhode Island",
                "South Carolina",
                "South Dakota",
                "Tennessee",
                "Texas",
                "Utah",
                "Vermont",
                "Virginia",
                "Washington",
                "West Virginia",
                "Wisconsin",
                "Wyoming"
              ]
            }
          },
          "categories": {
            "title": "Industry categories",
            "type": "array",
            "description": "Industry categories to scrape. Combine with States to narrow further (state + category). Leave empty for all industries.",
            "items": {
              "type": "string",
              "enum": [
                "Agriculture",
                "Automotive & Boat",
                "Beauty & Personal Care",
                "Building & Construction",
                "Communication & Media",
                "Education & Children",
                "Entertainment & Recreation",
                "Financial Services",
                "Health Care & Fitness",
                "Manufacturing",
                "Online & Technology",
                "Pet Services",
                "Real Estate",
                "Restaurants & Food",
                "Retail",
                "Service Businesses",
                "Transportation & Storage",
                "Travel",
                "Wholesale & Distribution"
              ]
            }
          },
          "searchUrls": {
            "title": "Search URLs (advanced)",
            "type": "array",
            "description": "Paste any BizBuySell browse/search URL (e.g. a keyword search, city page, or filtered result). Copy the URL straight from your browser after searching on bizbuysell.com. These run in addition to the States/Categories above.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword filter",
            "type": "string",
            "description": "Optional. Only keep listings whose title, description, industry or location contains this text (applied to the listings returned by your search)."
          },
          "listingTypes": {
            "title": "Listing types",
            "type": "array",
            "description": "Keep only these listing types. Leave empty to include all.",
            "items": {
              "type": "string",
              "enum": [
                "Established Business",
                "Asset Sale",
                "Business Real Estate",
                "Startup",
                "Franchise"
              ]
            }
          },
          "minAskingPrice": {
            "title": "Min asking price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only listings with an asking price at or above this value."
          },
          "maxAskingPrice": {
            "title": "Max asking price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only listings with an asking price at or below this value."
          },
          "minCashFlow": {
            "title": "Min cash flow ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only listings with annual cash flow (SDE) at or above this value."
          },
          "includeDetails": {
            "title": "Enrich with detail pages",
            "type": "boolean",
            "description": "Fetch each listing's detail page to add gross revenue, full description, year established, employees, inventory, FF&E, real-estate value and reason for selling. Slower and billed per detail-enrichment event.",
            "default": false
          },
          "maxItems": {
            "title": "Max listings",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of listing records to return.",
            "default": 100
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search",
            "minimum": 1,
            "type": "integer",
            "description": "Safety cap on how many result pages (60 listings each) to page through per search.",
            "default": 50
          },
          "deduplicateListings": {
            "title": "Deduplicate listings",
            "type": "boolean",
            "description": "Drop duplicate listings (same listing ID) across all searches in this run.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new / changed)",
            "type": "boolean",
            "description": "Remember listings seen in previous runs (in a named key-value store) and output only listings that are NEW or whose price / cash flow / title changed. Each record gets a monitorStatus of \"new\" or \"updated\". Works independently of Apify Schedules — schedule this actor to run daily/weekly to build a fresh-deal feed.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Name of the key-value store that holds monitor-mode state. Use a distinct name per saved search to keep their histories separate.",
            "default": "bizbuysell-monitor"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Concurrent detail-page fetches when enrichment is on. Keep modest to stay reliable behind BizBuySell's anti-bot.",
            "default": 4
          },
          "maxAttemptsPerPage": {
            "title": "Max attempts per page",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many fresh proxy sessions to try before giving up on a page. BizBuySell intermittently blocks individual residential IPs; more attempts = higher coverage.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. BizBuySell blocks datacenter traffic — keep the default US RESIDENTIAL proxy for reliable results.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}