# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/bizbuysell/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/bizbuysell/get-categories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bizbuysell/get-listing-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/bizbuysell/search-listings \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.