# Better Business Bureau Scraper — BBB Directory (`parsing_machine/better-business-bureau-scraper`) Actor

Scrape BBB.org business profiles by category and location: name, phone, address, categories, accreditation. Optional detail mode adds BBB rating, complaint counts, accreditation date and hours the standard search view leaves empty. No proxy needed by default.

- **URL**: https://apify.com/parsing\_machine/better-business-bureau-scraper.md
- **Developed by:** [Iakov Iudin](https://apify.com/parsing_machine) (community)
- **Categories:** Lead generation, Marketing, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Better Business Bureau Scraper — BBB.org Business Directory

Scrape **BBB.org** business profiles by category (or name) and location. Returns business
name, phone, address, categories, BBB profile URL and accreditation status by default — no
proxy needed. Turn on `scrapeDetails` to also pull **BBB rating, complaint count, accreditation
date and business hours** straight off each business's profile page — fields the default search
view leaves empty.

### What you get (list mode — `scrapeDetails:false`)

| Field | Description |
|---|---|
| `businessName` | Business display name |
| `bbbRating` | BBB letter grade — `null` in list mode |
| `isAccredited` | BBB accreditation status |
| `phone` | Phone number as listed |
| `addressRaw` | Full address |
| `categories` | Business category labels |
| `bbbProfileUrl` | Canonical bbb.org profile URL |
| `logoUrl` | Business logo image URL |
| `scrapedAt` | ISO-8601 UTC scrape timestamp |
| `parse_confidence` / `warnings` | Parse-quality envelope |

### Detail wedge (`scrapeDetails:true`)

Adds one extra request per business (its BBB profile page) and populates:

| Field | Description |
|---|---|
| `bbbRating` | BBB letter grade (e.g. `"A+"`) |
| `complaintsCount` | Number of BBB complaints on file |
| `complaintsSummary` | Short complaint-activity summary |
| `accreditationDate` | Date BBB accreditation began |
| `hours` | Business hours |

### How it works

1. `GET bbb.org/search?find_text=<query>&find_loc=<location>&find_country=<country>&find_type=<Category|Name>`
   — Next.js server-rendered page; the search-result list lives in the page's own
   `__NEXT_DATA__` payload, extracted structurally (no hand-pinned field paths, so a BBB
   field rename doesn't silently break the parser).
2. `scrapeDetails:true` → `GET` each business's profile URL, same structural extraction, for
   the rating/complaints/accreditation/hours wedge.
3. Normalize → push + charge per result.

curl\_cffi (Chrome TLS impersonation), **no proxy by default** — BBB.org is a public directory,
COGS measured ZERO. A request that comes back blocked is automatically retried once through
Apify Residential proxy (billed to the run owner, never to us).

### Input

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchQuery` | string | "Restaurants" | Category keyword or business name |
| `searchType` | enum | "Category" | `"Category"` or `"Name"` |
| `location` | string | "New York, NY" | City + state |
| `country` | string | "USA" | Directory country |
| `profileUrls` | array | `[]` | Skip search, scrape these profile URLs directly (detail mode) |
| `scrapeDetails` | boolean | `false` | Fetch rating/complaints/accreditation/hours per business |
| `maxItems` | integer | 20 | Max results returned (0 = all available) |
| `proxyConfiguration` | object | none | Apify proxy; left empty by default (see above) |

### PII

BBB detail pages for a sole-proprietor business can carry a "Principal Contact" block with a
named individual's personal phone/name. This actor never reads that block — only
business-level fields are extracted, so a named person's personal contact info is structurally
excluded from the output, not filtered after the fact.

### Output sample

```json
{
  "businessName": "Example Plumbing LLC",
  "bbbRating": "A+",
  "isAccredited": true,
  "phone": "(212) 555-0100",
  "addressRaw": "123 Main St, New York, NY 10001",
  "categories": ["Plumbers"],
  "bbbProfileUrl": "https://www.bbb.org/us/ny/new-york/profile/plumber/example-plumbing-llc-0121-12345",
  "logoUrl": null,
  "scrapedAt": "2026-07-10T12:00:00+00:00",
  "complaintsCount": 2,
  "complaintsSummary": "2 complaint(s) on file",
  "accreditationDate": "2015-03-01",
  "hours": ["Mon-Fri 8:00 AM - 5:00 PM"],
  "parse_confidence": 0.9,
  "warnings": []
}
```

### Legal note

BBB.org is a public business directory. Business names, phone numbers, addresses,
accreditation status and ratings are published by BBB for the explicit purpose of helping
consumers find and evaluate businesses. This actor never reads personal-contact fields for
named individuals (see PII note above).

# Actor input Schema

## `searchQuery` (type: `string`):

Category keyword (e.g. 'Restaurants') or business name to search for on BBB.org — depends on searchType.

## `searchType` (type: `string`):

Whether searchQuery is a business category or a specific business name.

## `location` (type: `string`):

City + state to search in, e.g. 'New York, NY'.

## `country` (type: `string`):

BBB directory country.

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

Skip search and scrape these BBB profile URLs directly (always in detail mode). When set, searchQuery/location are ignored.

## `scrapeDetails` (type: `boolean`):

When true, visits each business's BBB profile page to fetch bbbRating, complaints count, accreditation date and hours — fields the default search view leaves empty. Adds one extra request per business.

## `maxItems` (type: `integer`):

Maximum number of business records to return. Each returned record = one PPE charge. Set 0 for all available results on the search.

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

Apify proxy settings. Left empty by default — BBB.org is a public directory and normally needs no proxy (zero extra cost). If a request gets blocked, the actor automatically retries it through Apify Residential proxy.

## Actor input object example

```json
{
  "searchQuery": "Restaurants",
  "searchType": "Category",
  "location": "New York, NY",
  "country": "USA",
  "profileUrls": [],
  "scrapeDetails": false,
  "maxItems": 20
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset containing BBB business records (businessName, bbbRating, isAccredited, phone, addressRaw, categories, bbbProfileUrl, logoUrl, complaintsCount, accreditationDate, hours, parse\_confidence).

# 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 = {
    "searchQuery": "Restaurants",
    "searchType": "Category",
    "location": "New York, NY",
    "country": "USA",
    "profileUrls": [],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsing_machine/better-business-bureau-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 = {
    "searchQuery": "Restaurants",
    "searchType": "Category",
    "location": "New York, NY",
    "country": "USA",
    "profileUrls": [],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("parsing_machine/better-business-bureau-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 '{
  "searchQuery": "Restaurants",
  "searchType": "Category",
  "location": "New York, NY",
  "country": "USA",
  "profileUrls": [],
  "maxItems": 20
}' |
apify call parsing_machine/better-business-bureau-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parsing_machine/better-business-bureau-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/1RnkRhTYFFpdraRlw/builds/aiVPWe9UbG9cV3hsS/openapi.json
