# BBB Business Leads Scraper (`devilscrapes/bbb-business-leads-scraper`) Actor

Scrape structured business leads from bbb.org by category+location search or direct profile URLs — business name, phone, address, BBB rating, accreditation status, and years in business, ready for prospecting and reputation research.

- **URL**: https://apify.com/devilscrapes/bbb-business-leads-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## BBB Business Leads Scraper

**💰 $1.22 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Scrape structured business leads from bbb.org by category+location search or direct profile URLs — business name, phone, address, BBB rating, accreditation status, and years in business, ready for prospecting and reputation research.

</div>

***

### 🎯 What this scrapes

BBB (Better Business Bureau) accreditation and letter-grade ratings are a trust signal SMB lead-gen agencies, franchise HQs, insurers, and reputation-monitoring teams all want at scale, but bbb.org fronts every page with a bot-management challenge most scrapers can't clear. This Actor discovers businesses by category+location search or enriches a list of direct BBB profile URLs, returning name, contact info, BBB rating/accreditation, address, and years in business as clean, typed dataset rows.

### 🔥 What we handle for you

- 🛡️ **Browser fingerprint rotation** — `curl-cffi` impersonates real Chrome / Firefox / Safari TLS handshakes so the target sees a browser, not Python.
- 🌐 **Residential proxy rotation** via Apify Proxy — fresh session and exit IP on every block.
- 🔁 **Retries with exponential backoff** on `408 / 429 / 5xx` — up to 5 attempts per page, `Retry-After` honoured.
- 🧱 **Rate-limit-aware pacing** — when the target pushes back, we slow down instead of getting banned.
- 🧊 **Clean, typed dataset rows** — Pydantic-validated, ISO-8601 timestamps, stable IDs, JSON / CSV / Excel export straight from the Apify Console.
- 💰 **Pay-Per-Event pricing** — you only pay for results that hit your dataset. No data, no charge.

### 💡 Use cases

- **SMB lead-gen prospecting** — build fresh prospect lists by category and metro, with BBB rating and accreditation baked in as a pre-qualifying trust signal.
- **Franchise HQ territory audits** — enumerate accredited vs. non-accredited competitors across a franchise footprint.
- **Insurance and vendor vetting** — check accreditation status, complaint counts, and years-in-business before onboarding a contractor or vendor.
- **Reputation monitoring** — enrich an existing business list with current BBB rating, review counts, and accreditation dates via direct profile URLs.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `searchQueries` | `array` | no | \[] | Discovery mode: list of {"category": "...", "location": "..."} objects, e.g. category="plumber", location="Austin, TX".… |
| `profileUrls` | `array` | no | \[] | Direct-URL enrichment mode: bbb.org/{us,ca}/.../profile/... URLs to fetch as-is. At least one of Search queries or… |
| `maxResultsPerQuery` | `integer` | no | 40 | Cap on businesses discovered per Search queries item. |
| `maxTotalResults` | `integer` | no | 500 | Hard cap on businesses returned across the whole run, both modes combined. |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': True, 'apifyProxyGroups': \['BUYPROXIES94952']} | Pinned to BUYPROXIES94952 — the only proxy group confirmed to clear bbb.org's Cloudflare wall. |

#### Example input

```json
{
  "searchQueries": [
    {
      "category": "plumber",
      "location": "Austin, TX"
    }
  ],
  "profileUrls": [
    "https://www.bbb.org/us/tx/austin/profile/plumber/calixto-plumbing-0825-1000223803"
  ],
  "maxResultsPerQuery": 5,
  "maxTotalResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "BUYPROXIES94952"
    ]
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `business_name` | `string` | webDigitalData.business\_name. |
| `bbb_id` | `string` | webDigitalData.bbb\_id (issuing BBB office). |
| `business_id` | `string` | webDigitalData.business\_id. |
| `canonical_url` | `string` | Resolved profile URL. |
| `phone` | `['string', 'null']` | webDigitalData.business\_phone. |
| `address` | `['object', 'null']` | street/city/state/zip\_code, all best-effort. |
| `bbb_rating` | `['string', 'null']` | webDigitalData.business\_rating (letter grade). |
| `accredited` | `boolean` | webDigitalData.accredited\_status == 'AB'. |
| `accreditation_date` | `['string', 'null']` | Detail-page DOM. |
| `years_in_business` | `['integer', 'null']` | Detail-page DOM. |
| `website` | `['string', 'null']` | Detail-page DOM. |
| `category` | `['string', 'null']` | Search result / breadcrumb. |
| `complaint_count` | `['integer', 'null']` | Detail-page DOM, best-effort. |
| `review_count` | `['integer', 'null']` | Detail-page DOM, best-effort. |
| `average_review_score` | `['number', 'null']` | Detail-page DOM, best-effort. |
| `scraped_at` | `string` | ISO-8601 UTC timestamp at fetch time. |

#### Example output

```json
{
  "business_name": "Calixto Plumbing",
  "bbb_id": "0825",
  "business_id": "1000223803",
  "canonical_url": "https://www.bbb.org/us/tx/austin/profile/plumber/calixto-plumbing-0825-1000223803",
  "phone": "(512) 945-3143",
  "address": {
    "street": "1200 Main St",
    "city": "Austin",
    "state": "TX",
    "zip_code": "78753-6003"
  },
  "bbb_rating": "A+",
  "accredited": true,
  "accreditation_date": "2018-03-14",
  "years_in_business": 8,
  "website": "https://calixtoplumbing.com",
  "category": "Plumber",
  "complaint_count": 2,
  "review_count": 14,
  "average_review_score": 4.6,
  "scraped_at": "2026-08-12T10:00:00Z"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.02 | One-off warm-up charge per run |
| `business-scraped` | $0.0012 | PPE event |

Example: 1 000 results at the rates above ≈ **$1.22**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

Full complaint-narrative or review-text scraping is out of scope — only aggregate counts/scores are surfaced. Covers US/CA BBB directories only, no international equivalents. One-shot per run — no rating-history or alerting. No lead scoring or third-party enrichment beyond what the BBB profile page itself publishes.

### ❓ FAQ

**Do I need a BBB account or API key?**

No. This Actor scrapes bbb.org's own publicly listed business profile data — no login, no API key.

**Why is the proxy group locked to BUYPROXIES94952?**

bbb.org fronts every page with a Cloudflare bot-management challenge. Cloud recon (2026-08-12) confirmed BUYPROXIES94952 is the only proxy group in this account that clears it — Apify RESIDENTIAL had zero availability and Webshare residential was independently confirmed blocked for this target. The Actor hardcodes it so a run never silently falls back to a blocked path.

**Can I mix category search and direct profile URLs in one run?**

Yes — searchQueries (discovery) and profileUrls (direct enrichment) both run in the same call, deduped by business\_id, first-seen wins.

**Does this scrape review text or complaint narratives?**

No. Only aggregate counts/scores (review\_count, complaint\_count, average\_review\_score) are surfaced — per-review text and complaint narratives are out of scope.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

## `searchQueries` (type: `array`):

Discovery mode: list of {"category": "...", "location": "..."} objects, e.g. category="plumber", location="Austin, TX". At least one of Search queries or Profile URLs is required.

## `profileUrls` (type: `array`):

Direct-URL enrichment mode: bbb.org/{us,ca}/.../profile/... URLs to fetch as-is. At least one of Search queries or Profile URLs is required.

## `maxResultsPerQuery` (type: `integer`):

Cap on businesses discovered per Search queries item.

## `maxTotalResults` (type: `integer`):

Hard cap on businesses returned across the whole run, both modes combined.

## `proxyConfiguration` (type: `object`):

Pinned to BUYPROXIES94952 — the only proxy group confirmed (2026-08-12 cloud recon) to clear bbb.org's Cloudflare wall. Not user-overridable on the group; client.py hardcodes it regardless of what's set here.

## Actor input object example

```json
{
  "searchQueries": [
    {
      "category": "plumber",
      "location": "Austin, TX"
    }
  ],
  "profileUrls": [],
  "maxResultsPerQuery": 10,
  "maxTotalResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "BUYPROXIES94952"
    ]
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        {
            "category": "plumber",
            "location": "Austin, TX"
        }
    ],
    "profileUrls": [],
    "maxResultsPerQuery": 10,
    "maxTotalResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "BUYPROXIES94952"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/bbb-business-leads-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": [{
            "category": "plumber",
            "location": "Austin, TX",
        }],
    "profileUrls": [],
    "maxResultsPerQuery": 10,
    "maxTotalResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["BUYPROXIES94952"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/bbb-business-leads-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    {
      "category": "plumber",
      "location": "Austin, TX"
    }
  ],
  "profileUrls": [],
  "maxResultsPerQuery": 10,
  "maxTotalResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "BUYPROXIES94952"
    ]
  }
}' |
apify call devilscrapes/bbb-business-leads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/bbb-business-leads-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/tVBZW6gz9XQCyE8bz/builds/GnJwfoP16kAQvDAWO/openapi.json
