Use BizBuySell Businesses-for-Sale & Financials Scraper with Python
Search BizBuySell business-for-sale listings by keyword, state, city, county, industry, price, cash flow, revenue and listing type. Get financials, broker contacts, images, detail status and incremental monitoring fields.
1. Choose the data you need
Review the published README for supported collection modes, examples, and limits. The recipe below uses the current published input definition.
2. Prepare a source-based input
This JSON contains published prefills and required-field defaults. Review every value for your task before running it; it is not a promise of successful collection.
{
"absenteeOwner": false,
"category": "ALL",
"city": "",
"county": "",
"emitUnchanged": false,
"enrichDetails": false,
"franchiseResale": false,
"homeBased": false,
"listedWithinDays": 0,
"listingIds": [],
"listingType": "all",
"maxItems": 3,
"mirrorImages": true,
"mode": "search",
"onlyNew": false,
"priceReduced": false,
"realEstateIncluded": false,
"searchQuery": "laundromat",
"sellerFinancing": false,
"sortBy": "default",
"startUrls": [],
"state": "ALL",
"strictFilters": false
}
Download input.example.json and save your reviewed copy as input.json.
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | required | What to scrape. Search runs a filtered marketplace query; byUrls accepts BizBuySell search or listing URLs; byListingIds looks up exact listing IDs. |
searchQuery | string | optional | Free-text keyword, e.g. laundromat, restaurant, HVAC, car wash. Leave blank to browse all listings. (mode=search) |
state | string | optional | US state filter. Choose All states to search nationwide. (mode=search) |
city | string | optional | Optional city filter, e.g. Austin or Los Angeles. Resolved against BizBuySell locations. (mode=search) |
county | string | optional | Optional county filter, e.g. Los Angeles County. Resolved against BizBuySell locations. (mode=search) |
category | string | optional | BizBuySell industry category. Choose All categories to search every industry. (mode=search) |
listingType | string | optional | Established businesses, business assets, business real estate, or startup listings. (mode=search) |
minAskingPrice | integer | optional | Only listings at or above this asking price. Leave blank for no minimum. |
maxAskingPrice | integer | optional | Only listings at or below this asking price. Leave blank for no maximum. |
minCashFlow | integer | optional | Only listings at or above this annual cash flow (SDE). Leave blank for no minimum. |
maxCashFlow | integer | optional | Only listings at or below this annual cash flow (SDE). Leave blank for no maximum. |
minGrossRevenue | integer | optional | Only listings at or above this annual gross revenue. Leave blank for no minimum. |
maxGrossRevenue | integer | optional | Only listings at or below this annual gross revenue. Leave blank for no maximum. |
establishedAfterYear | integer | optional | Only businesses established after this year, e.g. 2015. Leave blank for any year. |
listedWithinDays | integer | optional | Only listings added or refreshed within this many days. 0 means any age. |
sortBy | string | optional | Result ordering. Relevance is the marketplace default. |
sellerFinancing | boolean | optional | Only listings that offer seller financing. |
homeBased | boolean | optional | Only home-based businesses. |
realEstateIncluded | boolean | optional | Only listings where real estate is included in the asking price. |
absenteeOwner | boolean | optional | Only listings that allow an absentee owner. |
priceReduced | boolean | optional | Only listings with a reduced asking price. |
franchiseResale | boolean | optional | Only franchise resale listings. |
strictFilters | boolean | optional | When a gross-revenue filter is set, trust BizBuySell's source-side filter when detail revenue is unavailable; when enrichDetails successfully reads a detail page, drop records whose detail revenue is still unknown. Default false. |
enrichDetails | boolean | optional | Adds full description, gross revenue, employees, established year, inventory, FF&E, rent, facilities, financing and broker phone. Adds one request per listing and is slower. |
mirrorImages | boolean | optional | Store listing photos in this run's key-value store and return public Apify URLs. On by default so images open from any client; turn off to keep the source URLs. |
startUrls | array | optional | BizBuySell search, category, state, city, county or listing URLs. (mode=byUrls) |
listingIds | array | optional | Numeric BizBuySell listing IDs, e.g. 2501583. (mode=byListingIds) |
maxItems | integer | optional | Hard cap on the number of listings to save. |
stateKey | string | optional | Optional. Set the same key on scheduled runs to remember previously seen listings in a named key-value store. Leave empty for stateless scraping. |
onlyNew | boolean | optional | With stateKey, emit only listing IDs that were never seen in a previous run. New/changed records are emitted by default when stateKey is set. |
emitUnchanged | boolean | optional | With stateKey, also emit listings whose tracked fields did not change. Leave off to receive only new or changed listings. |
proxyConfiguration | object | optional | Optional override for advanced users. Leave empty to let the actor connect directly and choose its own fallback route; search works without any proxy setup. |
3. Start an Actor run
Set APIFY_TOKEN in your environment. Python 3.10 or newer is sufficient; this recipe uses no third-party packages.
Execution may incur charges. Review current pricing on Apify. The request asks for a 120-second timeout and a charge limit; these settings are subject to Apify’s pricing and do not guarantee an all-inclusive spending cap.
import json
import os
import urllib.request
# Save the schema-derived example as input.json; review and edit it first.
with open("input.json", encoding="utf-8") as stream:
actor_input = json.load(stream)
token = os.environ["APIFY_TOKEN"]
request = urllib.request.Request(
"https://api.apify.com/v2/acts/og7SVG0cv9HByYWXi/runs?timeout=120&maxTotalChargeUsd=0.50",
data=json.dumps(actor_input).encode("utf-8"),
headers={"Authorization": "Bearer " + token, "Content-Type": "application/json"},
method="POST",
)
# This starts a potentially billable run. Do not automatically retry this POST.
with urllib.request.urlopen(request, timeout=40) as response:
run = json.load(response)["data"]
print("Run ID:", run["id"])
print("Status:", run["status"])
# Inspect and download results in Apify Console once the run succeeds.
4. Inspect the actual results
Open the run in Apify Console and wait for a successful completion. Use the published output schema to locate results and the dataset schema to understand declared views. Missing or optional record fields must not be treated as guaranteed values.
One record per BizBuySell business-for-sale listing with asking price, location, financials, broker contacts, listing age, lease terms, optional full detail-page fields, incremental-monitoring change flags and inactive tombstones for missing explicit listing IDs.
Questions before you run
Which inputs are required?
The published required fields are mode
What does this guide verify?
The fields, prefills, and schema links are rendered from the published build. This is a usage recipe, not a paid live extraction test. Source availability and collection results can vary.
What if the run request times out?
Check Apify Console before retrying. The first request may already have created a run. Do not automatically repeat a run-creation POST.
Generated from source build wEIFBh05Vywiqqs7t and its README and schemas. Source changes regenerate this guide; no third-party editorial claims are inferred.