# BBB Business Directory Scraper 🏢 (`easyapi/bbb-business-directory-scraper`) Actor

Scrape business listings from BBB.org (Better Business Bureau) including company details, ratings, contact information, and accreditation status. Perfect for market research and lead generation.

- **URL**: https://apify.com/easyapi/bbb-business-directory-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Lead generation, Integrations
- **Stats:** 275 total users, 8 monthly users, 98.1% runs succeeded, 12 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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

## BBB Business Directory Scraper 🏢

Extract detailed business information from the Better Business Bureau (BBB.org) website. This actor helps you gather comprehensive data about businesses, their ratings, and accreditation status across different locations and categories in the United States.

### 🎯 Use Cases

- Market research and competitive analysis
- Lead generation for B2B sales
- Verify business credibility and ratings
- Monitor business reputation
- Build business directories and databases

### ✨ Features

- 🔍 Search by location, category, or specific business criteria
- 📊 Get detailed business information including:
  - Company name and category
  - BBB rating
  - Contact information (phone numbers)
  - Physical address
  - Profile URL
  - Accreditation status
- ⚡ Fast and efficient scraping with pagination support
- 📅 Timestamp for each scraped record
- 🛡️ Built-in anti-blocking measures
- 🎚️ Configurable maximum items limit

### 📋 Input Parameters

The actor accepts the following input parameters:

- `searchUrls`: Array of BBB search URLs to scrape
- `maxItems`: Maximum number of results to collect

### 📝 Tips for Usage

1. Start with a specific location and category to get targeted results
2. Use the `maxItems` parameter to control the amount of data collected
3. Consider rate limiting and fair usage of the BBB website
4. Check the BBB website's terms of service before scraping

### ⚠️ Important Notes

- This actor respects BBB.org's structure and implements necessary delays
- Results may vary based on BBB's data availability
- Some businesses might not have complete information

#### Input Example

A full explanation of an input example in JSON.

```json
{
    "searchUrls": [
        "https://www.bbb.org/search?find_country=USA&find_entity=50544-000&find_id=4847_19000&find_latlng=40.762801%2C-73.977818&find_loc=New+York%2C+NY&find_text=Restaurants&find_type=Category&page=1&touched=10"
    ],
    "maxItems": 30
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```json
[
    {
        "searchUrl": "https://www.bbb.org/search?find_country=USA&find_entity=50544-000&find_id=4847_19000&find_latlng=40.762801%2C-73.977818&find_loc=New+York%2C+NY&find_text=Restaurants&find_type=Category&page=1&touched=10",
        "listing": {
            "name": "Cityspree, Inc.",
            "category": "Restaurants",
            "rating": "BBB Rating: NR",
            "phone": "(850) 359-9121",
            "address": "1350 6th Avenue, New York, NY 10019",
            "profileUrl": "https://www.bbb.org/us/ny/new-york/profile/restaurants/cityspree-inc-0121-60114",
            "isAccredited": false
        },
        "scrapedAt": "2025-01-20T07:25:42.022Z"
    },
    ...
]
```

# Actor input Schema

## `searchUrls` (type: `array`):

List of BBB search URLs to scrape

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

Maximum number of business listings to scrape

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.bbb.org/search?find_country=USA&find_loc=New+York%2C+NY&find_text=Restaurants"
  ],
  "maxItems": 30
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/bbb-business-directory-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("easyapi/bbb-business-directory-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 '{}' |
apify call easyapi/bbb-business-directory-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,easyapi/bbb-business-directory-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/xqvoE3O1gEOje4Q56/builds/2SfCa6obK377x9ORU/openapi.json
