{
  "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. Independent tool, not affiliated with BizBuySell.",
    "version": "0.1",
    "x-build-id": "cL5sIfpR48MnxOEZP"
  },
  "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 search. Combine with Industry categories for a state + industry search. Leave States, Industry categories and Search URLs all empty to search the nationwide feed.",
            "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": "BizBuySell industry categories to search. Combine with States to narrow to a state + industry. 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 or listing URLs (advanced)",
            "type": "array",
            "description": "Paste BizBuySell URLs straight from your browser: a search or browse page (a city or county page, a filtered search) is paged through, and a single listing page (/business-opportunity/...) or franchise page (/franchise-for-sale/<brand>/) becomes one full record. A pasted listing is read from its own page, so it is billed as one listing plus one detail-page enrichment. These run in addition to States / Industry categories.",
            "items": {
              "type": "string"
            }
          },
          "urlsFromFile": {
            "title": "Import URLs from a file (one per line)",
            "type": "string",
            "description": "Bulk-load URLs without adding them one at a time. Either <b>paste your whole list</b> here, one URL per line, or give <b>a single link to the file</b> and it is downloaded for you - a public <code>.txt</code>/<code>.csv</code>, a Google Sheets or Drive share link (auto-converted to CSV export), or an Apify key-value-store record. Blank lines, <code>#</code> comments, quotes and extra CSV columns are ignored, and duplicates are only scraped once."
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Search BizBuySell's own keyword search (titles and full listing text), for example \"laundromat\" or \"liquor store\". Works on its own (nationwide) or with States / Industry categories."
          },
          "listingTypes": {
            "title": "Listing types",
            "type": "array",
            "description": "Keep only these listing types. Leave empty for every business for sale. \"Franchise\" returns the franchise opportunities BizBuySell shows inside its results (cash required, average unit revenue) plus franchise resales.",
            "items": {
              "type": "string",
              "enum": [
                "Established Business",
                "Asset Sale",
                "Business Real Estate",
                "Startup",
                "Franchise"
              ]
            }
          },
          "minAskingPrice": {
            "title": "Min asking price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with an asking price at or above this value. Listings that do not disclose a price are left out when this is set."
          },
          "maxAskingPrice": {
            "title": "Max asking price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with an asking price at or below this value. Listings that do not disclose a price are left out when this is set."
          },
          "minCashFlow": {
            "title": "Min cash flow ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with annual cash flow (SDE) at or above this value."
          },
          "minGrossRevenue": {
            "title": "Min gross revenue ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with annual gross revenue at or above this value (applied by BizBuySell; the revenue figure itself is added to each row with Enrich with detail pages)."
          },
          "listedWithinDays": {
            "title": "Listed within the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only listings BizBuySell published (or re-published) in the last N days, for example 7. Great for a daily or weekly new-deals feed."
          },
          "includeDetails": {
            "title": "Enrich with detail pages",
            "type": "boolean",
            "description": "Add each listing's full record: gross revenue, the full description, industry and sub-industry, year established, employees, inventory and FF&E, real estate owned or leased, building size, rent, lease expiry, financing terms, training, reason for selling, and the contact's name and phone for listings whose search data does not carry them. Where the seller publishes them: street address, ZIP code, coordinates, county and business website. Billed per detail enrichment.",
            "default": false
          },
          "maxItems": {
            "title": "Max listings",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of listing records to return across all searches (shared fairly between them), up to 10,000 per run. Left empty, a search returns up to 100."
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search",
            "minimum": 1,
            "type": "integer",
            "description": "Safety cap on how many result pages (about 50 listings each) to page through per search, up to 200.",
            "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 the listings already delivered (in a named key-value store) and output only listings that are NEW or whose price / cash flow / title changed, each with a monitorStatus of \"new\" or \"updated\". The first run reads what was listed in the last 7 days; later runs read what was listed since the last complete check, and a run stopped by \"Max listings\" leaves the rest for the next run. Schedule it daily or weekly for a fresh-deal feed; nothing is billed for listings you already have.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Name of the key-value store that holds monitor-mode memory. 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": "How many detail pages are opened at the same time when enrichment is on (values above 8 run as 8). BizBuySell turns more of them away when many are opened at once, so higher is not faster.",
            "default": 4
          },
          "maxAttemptsPerPage": {
            "title": "Max attempts per page",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many times a page is retried when BizBuySell's protection turns a request away (values above 6 run as 6).",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Nothing to set here: the actor picks the connection for each page itself. Search pages load over a direct connection (or Apify's datacenter proxy), and listing and franchise pages, which BizBuySell's Akamai protection guards more closely, go through Apify's Unblocker. The field is kept so saved inputs keep working.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}