# BBB Scraper (`datascrapers/bbb-scraper`) Actor

Collect Better Business Bureau search records, including name, address, phone, rating, and report URL.

- **URL**: https://apify.com/datascrapers/bbb-scraper.md
- **Developed by:** [Data Scrapers](https://apify.com/datascrapers) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 dataset items

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

**BBB Scraper** creates a structured dataset of business profiles collected from Better Business Bureau search results. Each dataset item is one business and can include the business name, street address, city, state, postal code, phone numbers, category, letter rating, rating score, coordinates, and the public report URL. Query the source with a search phrase, a location, and a country of USA or Canada, then retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, XML, or another supported format.

[![BBB Scraper — input to structured data](https://raw.githubusercontent.com/faizanalii/apify-actor-assets/main/bbb-scraper/bbb-scraper-value-demo.gif)](https://apify.com/datascrapers/bbb-scraper)

### Dataset at a glance

| Property | Value |
|---|---|
| Source | bbb.org search results |
| Record unit | One business profile from search |
| Input methods | `search_query`, `location`, `country` |
| Main identifiers | `id` and `businessId` |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML, and other Apify dataset exports |
| Update model | Fresh records per Actor run |
| Pricing | $1.00 per 1,000 results (`dataset-item`). Platform usage is billed separately. |

### Coverage and available records

The Actor searches BBB with `search_query`, `location`, and `country`. The saved sample used the query `garden` and the location `California`. In that file, `city` is the town name California and `state` is `MO`, so the location string is a place name, not a guaranteed US state filter.

Supported:

- United States (`USA`) and Canada (`CAN`)
- Business name, address, city, state, postal code, and phone list
- Type-of-business text and a `categories` array
- Letter `rating`, numeric `ratingScore`, and a separate `score`
- Report URL, review URL, BBB office id and name, member flag, and charity flags
- `location` as a `latitude,longitude` string
- Distance text such as `0.9 mi` on the saved results

Not currently collected:

- The full complaint or review text from the profile page
- A `maxItems` limit. The input schema does not define one
- A historical rating series

`businessName` can contain HTML from the search highlight, such as `<em>` around the matched word. `phone` is null when the result has no number. `rating` can be an empty string.

### Data dictionary

Fields match a saved BBB search result. `categories` is an array of `{ "id", "name" }`.

| Field | Type | Nullable | Description | Example |
|---|---|---:|---|---|
| `id` | string | No | Result id. Bureau, business, and a third segment. Best field for deduplication. | `0734_310607482_125163` |
| `businessId` | string | No | BBB business number. | `310607482` |
| `businessName` | string | No | Business name. May include search-highlight HTML. | `Dent Contracting and Lawn Care` |
| `address` | string or null | Yes | Street or mailing address. | `PO Box 31` |
| `city` | string or null | Yes | City name. | `California` |
| `state` | string or null | Yes | State or province code. | `MO` |
| `postalcode` | string or null | Yes | Postal code. | `65018-0031` |
| `phone` | array of strings or null | Yes | Phone numbers. Null when none are listed. | `null` |
| `tobText` | string or null | Yes | Type-of-business label. | `Lawn Maintenance` |
| `tobId` | string or null | Yes | Type-of-business id. | `00157-000` |
| `categories` | array | No | Category objects with `id` and `name`. | Lawn Maintenance |
| `rating` | string | Yes | Letter rating. Empty string when unrated in the sample. | `""` |
| `ratingScore` | number | Yes | Numeric rating score. `0` on the unrated sample row. | `0` |
| `score` | number | Yes | Search score, separate from the letter rating. | `11251.702` |
| `bbbMember` | boolean | Yes | Member flag. | `false` |
| `reportUrl` | string | Yes | Public profile URL. | `https://www.bbb.org/us/mo/california/profile/...` |
| `leaveReviewUrl` | string or null | Yes | Customer-review URL. | Profile `/customer-reviews` URL |
| `location` | string or null | Yes | `latitude,longitude`. | `38.61751,-92.56141` |
| `distance` | string or null | Yes | Distance text from the search center. | `0.9 mi` |
| `bbbId` | string | Yes | Local BBB office id. | `0734` |
| `bbbName` | string | Yes | Local BBB office name. | `BBB Serving Greater Missouri & Southern Illinois` |
| `logoUri` | string or null | Yes | Logo URL. Null on the sample row. | `null` |
| `charitySeal` | boolean | Yes | Charity seal flag. | `false` |
| `isCharity` | integer | Yes | Charity marker. `0` on the sample row. | `0` |
| `accreditedCharity` | boolean | Yes | Accredited charity flag. | `false` |
| `outOfBusinessStatus` | integer or null | Yes | Out-of-business code. Null on some rows, `4501` on the sample row. | `4501` |
| `raqEnabled` | boolean | Yes | Request-a-quote flag. | `true` |
| `requestAQuoteUrl` | string or null | Yes | Quote URL. Null on the sample row. | `null` |
| `hasServiceArea` | boolean | Yes | Service-area flag. | `false` |
| `serviceAreaDescription` | string or null | Yes | Service-area text. Null on the sample row. | `null` |

### Example dataset record

This row is from a search for `garden` with location `California`. The stored `categories` list is longer. This example keeps one category. `phone` is null on this row.

```json
{
  "id": "0734_310607482_125163",
  "businessName": "Dent Contracting and Lawn Care",
  "address": "PO Box 31",
  "city": "California",
  "state": "MO",
  "postalcode": "65018-0031",
  "tobText": "Lawn Maintenance",
  "rating": "",
  "bbbMember": false,
  "charitySeal": false,
  "isCharity": 0,
  "accreditedCharity": false,
  "reportUrl": "https://www.bbb.org/us/mo/california/profile/lawn-maintenance/dent-contracting-and-lawn-care-0734-310607482",
  "phone": null,
  "location": "38.61751,-92.56141",
  "businessId": "310607482",
  "ratingScore": 0,
  "score": 11251.702,
  "logoUri": null,
  "tobId": "00157-000",
  "bbbId": "0734",
  "bbbName": "BBB Serving Greater Missouri & Southern Illinois",
  "distance": "0.9 mi",
  "outOfBusinessStatus": 4501,
  "categories": [{ "id": "00157-000", "name": "Lawn Maintenance" }],
  "hasServiceArea": false,
  "raqEnabled": true
}
```

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---|---:|---|---|---|
| `search_query` | string | No | None | Search text | Prefill: `garden`. |
| `location` | string | No | `California` | Place name | Location sent with the search. |
| `country` | string | No | `USA` | `USA`, `CAN` | United States or Canada. |
| `proxyConfiguration` | object | No | Apify residential proxy | Apify proxy editor | Proxy for the search request. |

Minimal request:

```json
{
  "search_query": "garden",
  "location": "California",
  "country": "USA"
}
```

There is no second filter set. The schema does not include a result cap or a category filter.

### Retrieve the data through the API

1. Start `datascrapers/bbb-scraper` with the JSON input.
2. Wait until the run finishes, or call the synchronous dataset endpoint.
3. Read items from the run's default dataset.
4. Paginate with dataset `offset` and `limit`, or export from the Apify console.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("datascrapers/bbb-scraper").call(
    run_input={
        "search_query": "garden",
        "location": "California",
        "country": "USA",
    }
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["businessId"], item["businessName"], item["state"])
```

Other languages are listed on the Actor's API tab. This is the Apify Actor API, not a BBB API.

### Data quality and record handling

- One dataset item is one search result. Each pushed result charges one `dataset-item` event.
- Deduplicate on `id`. `businessId` is the business number inside that id and can repeat if more than one result row is returned for the same business.
- `businessName` is not stripped. A highlighted match can contain `<em>` tags.
- An empty `rating` and a `ratingScore` of 0 mean the sample row had no letter rating. They are not a confirmed F rating.
- `location` is one string, not separate latitude and longitude fields.
- `phone` is either an array of strings or null. It is not a single string.
- `outOfBusinessStatus` is null on some saved rows and an integer on others. The Actor does not translate that code.
- There is no internal result cap.

### Pricing and cost examples

Each business pushed to the dataset charges one `dataset-item` event at **$0.001** ($1.00 per 1,000 results) on every Apify plan. There is no separate price file in the Actor folder. Apify bills platform usage, including compute units and residential proxy traffic, in addition to that event.

| Records | Actor event cost |
|---:|---:|
| 1,000 | $1.00 |
| 10,000 | $10.00 |

### Limitations and responsible data use

- The dataset is the current BBB search page, not a national dump and not a complaint archive.
- `location` is a place string. In the saved file it matched a town named California in Missouri, not the state of California.
- Business names, phones, and addresses are public profile fields. Use them in line with the privacy rules that apply to your project.
- Ratings change. Store a run yourself if you need the rating as of a date.
- You are responsible for complying with BBB's terms and applicable law.

### Dataset questions

#### What does one dataset item represent?

One business returned by a Better Business Bureau search.

#### Which field should I use as a unique identifier?

Use `id`. `businessId` is the business number embedded in that id.

#### Are fields nullable or conditional?

Yes. Phone, logo, quote URL, and service-area text are null on the saved row. Rating can be an empty string.

#### Can I retrieve the records as CSV or JSON?

Yes. Export the default dataset as JSON, CSV, Excel, XML, or another Apify format.

#### How do I paginate large datasets?

Use `limit` and `offset` on the dataset items endpoint. The Actor input has no `maxItems` field.

#### Does the Actor return historical data?

No. Each run returns the search results available at request time.

#### What counts as a billable result?

One `dataset-item` event per business saved to the dataset, at $0.001. Platform usage is billed separately.

### Related datasets from Data Scrapers

- [Clutch Scraper](https://apify.com/datascrapers/clutch-scraper) collects company profiles you can compare with BBB ratings.
- [BizBuySell Scraper](https://apify.com/datascrapers/bizbuysell-scraper) collects business-for-sale listings with location and category fields.
- [Amazon Scraper](https://apify.com/datascrapers/amazon-scraper) collects seller and product records for commercial research.
- [AppSumo Scraper](https://apify.com/datascrapers/appsumo-scraper) collects software-business listings from a different directory.

### Data Scrapers support

Need an additional field, record type, or export workflow? Contact Data Scrapers at stardustspotlight@gmail.com. Include a sample source URL, required fields, expected record volume, and preferred delivery format.

# Actor input Schema

## `search_query` (type: `string`):

Search Query

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

Location for the search

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

Select proxy groups or use your custom proxies

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

Country for the search

## Actor input object example

```json
{
  "search_query": "garden",
  "location": "California",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "country": "USA"
}
```

# Actor output Schema

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

Dataset of BBB business search records.

## `runStats` (type: `string`):

Run metadata key when the Actor writes run-stats.

# 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 = {
    "search_query": "garden",
    "location": "California",
    "country": "USA"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/bbb-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 = {
    "search_query": "garden",
    "location": "California",
    "country": "USA",
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/bbb-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 '{
  "search_query": "garden",
  "location": "California",
  "country": "USA"
}' |
apify call datascrapers/bbb-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datascrapers/bbb-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/JbcOPKrW8wnBQZc4J/builds/aZ7aF59bHFzbeBj6Q/openapi.json
