{
  "openapi": "3.0.1",
  "info": {
    "title": "BizBuySell Scraper — Businesses for Sale, Franchises & Brokers",
    "description": "Scrape BizBuySell businesses for sale, franchises, and broker contacts. Get asking price, cash flow (SDE), revenue, EBITDA, photos, and broker phone. Search by state, category, keyword, or URL. Fast hybrid HTTP scraper.",
    "version": "1.0",
    "x-build-id": "QgaavLOhAbNUfujZa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~bizbuysell-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-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/crawloop~bizbuysell-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-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/crawloop~bizbuysell-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "url",
              "franchise",
              "broker"
            ],
            "type": "string",
            "description": "search = filter-based business search; url = paste BizBuySell URLs; franchise = franchise directory/brand pages; broker = broker directory or profile URLs.",
            "default": "search"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Free-text keyword (requires US Residential proxy — uses www.bizbuysell.com)."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "US state or nested location slug/text, e.g. California or Florida/Boca Raton. Path-based locations use the mobile subdomain without proxy."
          },
          "category": {
            "title": "Category slug",
            "type": "string",
            "description": "Industry slug for businesses (e.g. restaurants-and-food) or franchise category (e.g. retail-franchise)."
          },
          "listingType": {
            "title": "Listing type",
            "enum": [
              "all",
              "established",
              "asset-sale"
            ],
            "type": "string",
            "description": "Business listing type filter.",
            "default": "all"
          },
          "minAskingPrice": {
            "title": "Min asking price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum asking price filter (www + proxy)."
          },
          "maxAskingPrice": {
            "title": "Max asking price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum asking price filter (www + proxy)."
          },
          "minCashFlow": {
            "title": "Min cash flow / SDE (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum cash flow filter (www + proxy)."
          },
          "minGrossRevenue": {
            "title": "Min gross revenue (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum gross revenue filter (www + proxy)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "default",
              "price-asc",
              "price-desc",
              "newest",
              "cashflow-desc"
            ],
            "type": "string",
            "description": "Result sort order (non-default sorts use www + proxy).",
            "default": "default"
          },
          "urls": {
            "title": "BizBuySell URLs",
            "type": "array",
            "description": "Search, category, listing, franchise, or broker URLs. Used in url / franchise / broker modes (and search when no filters are set).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many dataset records (0 = no limit other than maxPages).",
            "default": 50
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum search result pages to walk per start URL (1–100).",
            "default": 3
          },
          "fetchDetails": {
            "title": "Fetch listing details",
            "type": "boolean",
            "description": "Open each listing/franchise/broker profile for full financials, description, photos, and broker contacts.",
            "default": true
          },
          "mirrorImages": {
            "title": "Mirror images to Key-Value Store",
            "type": "boolean",
            "description": "Download listing images and store them in this run's Key-Value Store (helps when BizBuySell CDN blocks browsers).",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Used for www.bizbuysell.com (keyword/price filters, broker directory, and automatic fallback). Path-based geo searches use m.bizbuysell.com without proxy.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}