{
  "openapi": "3.0.1",
  "info": {
    "title": "Businesses for Sale Leads: Listings + Broker Contacts",
    "description": "Businesses listed for sale across Transworld, BizBen, BusinessesForSale.com and Empire Flippers: asking price, cash flow, revenue, location and the broker's public phone and email. Filter by state, category and price; schedule it for daily new-listing alerts.",
    "version": "0.1",
    "x-build-id": "29ENghAfJ79lktNnR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/buff_pineapple~businesses-for-sale-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-buff_pineapple-businesses-for-sale-leads",
        "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/buff_pineapple~businesses-for-sale-leads/runs": {
      "post": {
        "operationId": "runs-sync-buff_pineapple-businesses-for-sale-leads",
        "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/buff_pineapple~businesses-for-sale-leads/run-sync": {
      "post": {
        "operationId": "run-sync-buff_pineapple-businesses-for-sale-leads",
        "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": {
          "sources": {
            "title": "Marketplaces",
            "type": "array",
            "description": "Marketplaces to read. Transworld Business Advisors (named advisor with phone and email; its robots.txt asks for one request every 10 seconds, so about 6 listings per minute), BusinessesForSale.com US (largest open catalogue; broker name only, no phone/email), Empire Flippers (online businesses only, no state) and BizBen (California-heavy catalogue with the broker or owner name, phone and email as plain text and the real posting date; BizBen's terms forbid automated access, see the README legal section; listings it republishes from Transworld are skipped when Transworld is selected too, and listings it republishes from Flippa are never read). The requested results are shared fairly between the marketplaces; the order sets who gets the extra row when they do not divide evenly. BizBuySell, BizQuest and LoopNet are not covered. An empty list reads ALL marketplaces (the run logs a warning and its status message says so); to read fewer, list the ones you want.",
            "items": {
              "type": "string",
              "enum": [
                "transworld",
                "businessesforsale",
                "empireflippers",
                "bizben"
              ],
              "enumTitles": [
                "Transworld Business Advisors",
                "BusinessesForSale.com (US)",
                "Empire Flippers (online businesses)",
                "BizBen (broker and owner contacts, posting dates)"
              ]
            },
            "default": [
              "transworld",
              "businessesforsale",
              "empireflippers",
              "bizben"
            ]
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Optional. Presets mapped to each marketplace's own categories: restaurants, food, retail, services, manufacturing, online, healthcare, construction, automotive, franchises, transportation, wholesale, professional-services, beauty-fitness, education-childcare, technology, leisure-hospitality. BusinessesForSale lists related-category ads in a category search, so a preset keeps a listing only when its own primary category or its title matches. Any other text is matched against the listing's category and title. Leave empty for all categories.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional. A listing matches when its title, category or description contains any of these words.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "US state names or codes (Florida, TX), 'City, ST' (Miami, FL) or 'United States'. A listing matches when it is in any of them. Empire Flippers lists online businesses without a state, so it only contributes to 'United States'. BizBen hides the city of many listings, so a city search finds only those that show it.",
            "default": [
              "United States"
            ],
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum asking price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Listings without a disclosed asking price are left out when this is set (a price range counts when it overlaps)."
          },
          "maxPrice": {
            "title": "Maximum asking price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Listings without a disclosed asking price are left out when this is set (a price range counts when it overlaps)."
          },
          "minCashFlow": {
            "title": "Minimum cash flow / SDE (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Listings that do not show a cash flow are left out when this is set."
          },
          "minRevenue": {
            "title": "Minimum revenue (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Listings that do not show revenue are left out when this is set. BusinessesForSale.com shows revenue on its list pages; Transworld rows are read from the listing page."
          },
          "postedWithinDays": {
            "title": "Posted or updated within (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Optional. Keeps listings posted or updated within this many days when the marketplace shows a date (BizBen: the true posting date, so it works exactly; Empire Flippers: listing date; BusinessesForSale.com: last-modified date from its sitemap). Transworld shows no dates: its rows are kept and flagged date_unknown."
          },
          "sellerType": {
            "title": "Listed by",
            "enum": [
              "any",
              "broker",
              "owner"
            ],
            "type": "string",
            "description": "any, broker or owner. Broker/owner is known from the listing page only (Transworld and Empire Flippers are always brokers; BizBen says broker or owner on its listing pages); rows where it is not shown are left out when broker or owner is chosen.",
            "default": "any"
          },
          "includeDetails": {
            "title": "Read each listing page",
            "type": "boolean",
            "description": "On: each listing page is read for the full description, inventory, furniture and fixtures, employees, year established, reason for selling and the broker. Off: list-page data only (faster, fewer requests). Transworld: with a category, price or cash-flow filter, or with this switch off, the search index is read (9 listings per request) and only matching listings are opened; off gives index data only (no revenue, description or broker contact). BusinessesForSale with a category: off matches the category on the title only, because the category is only known from the listing page. BizBen: with this switch off its rows come from the state pages (price, revenue, cash flow, category, location and dates, no broker contact); on, a US-wide search without filters reads the newest listings first.",
            "default": true
          },
          "maxResults": {
            "title": "Max listings",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on delivered rows for this run, shared fairly between the selected marketplaces. If maxTotalChargeUsd pays for fewer, the run stops there and the status says so.",
            "default": 200
          },
          "newSinceLastRun": {
            "title": "Only listings new since the last run",
            "type": "boolean",
            "description": "For scheduled runs (daily deal-flow alerts): deliver only listings not delivered before for the same search (marketplaces, categories, keywords, locations, price, cash flow, revenue and seller filters). Delivered listing ids are remembered in a named key-value store 'bfs-seen' in your account.",
            "default": false
          },
          "maxRunMinutes": {
            "title": "Max run minutes",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "After this many minutes the actor stops reading, keeps what it delivered and finishes with a status message. Keep it below the run timeout.",
            "default": 25
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Pages are read directly first. Only when a marketplace blocks a request is it retried through an Apify datacenter proxy (or the datacenter groups or proxy URLs you choose here). Apify residential proxies are never used: a RESIDENTIAL group chosen here is ignored and the run log says so. Your own third-party proxy URLs are used as you give them.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debugSaveRawPages": {
            "title": "Save raw pages (diagnostics)",
            "type": "boolean",
            "description": "Diagnostics only: stores up to 25 fetched pages of this run in its key-value store (keys raw_<source>_<kind>_<id>). Leave off.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}