# BizBuySell — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search for businesses available for sale across multiple categories and view detailed information about specific listings on BizBuySell.com. Browse business categories to explore different industries and find opportunities that match your investment interests.

**Category:** Marketplaces | **Website:** [bizbuysell.com/](https://bizbuysell.com/) | **Docs:** [parse.bot/marketplace/f71464eb-f585-4dff-bbd3-697fb863e905/bizbuysell-com-api](https://parse.bot/marketplace/f71464eb-f585-4dff-bbd3-697fb863e905/bizbuysell-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-bizbuysell-com-api-f71464eb/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_categories

Retrieve the full hierarchy of business categories available on BizBuySell. Returns parent categories with nested child subcategories. Category url_stub values can be used as the category filter in search_listings.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bizbuysell-com-api-f71464eb/get_categories \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_listing_detail

Get comprehensive details for a specific business listing by its URL. Extracts structured data from the listing page including financials, location, description, category, and similar listings. The URL can be obtained from search_listings results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full listing URL from search_listings results (e.g. 'https://www.bizbuysell.com/business-opportunity/listing-title/1234567/') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bizbuysell-com-api-f71464eb/get_listing_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### search_listings

Search for businesses for sale on BizBuySell with optional filters for location, category, price, and cash flow. Excludes franchises and restaurants by default. Returns paginated results with listing summaries including financials. Each result includes a URL suitable for get_listing_detail.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Business category URL stub to filter by (e.g. 'automotive-and-boat-businesses'). Values available from get_categories endpoint url_stub field. The '-businesses' suffix is handled automatically. |
| `exclude_franchises` | boolean | No | Exclude franchise listings from results |
| `exclude_restaurants` | boolean | No | Exclude restaurant/bar listings from results |
| `max_price` | integer | No | Maximum asking price filter |
| `min_cash_flow` | integer | No | Minimum cash flow filter |
| `min_price` | integer | No | Minimum asking price filter |
| `page` | integer | No | Page number for pagination |
| `query` | string | No | Search keyword (e.g. 'laundromat', 'car wash') |
| `state` | string | No | US state name to filter by (e.g. 'florida', 'california'). Use lowercase. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-bizbuysell-com-api-f71464eb/search_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","exclude_franchises":"<boolean>","exclude_restaurants":"<boolean>","max_price":"<integer>","min_cash_flow":"<integer>","min_price":"<integer>","page":"<integer>","query":"<string>","state":"<string>"}'
```
