# BBB Scraper - Business Directory Search (`goat255/bbb-scraper`) Actor

Search the public business directory across the US and Canada. One clean row per business with phone, full postal address split into fields and a link to its listing. No login and no API key.

- **URL**: https://apify.com/goat255/bbb-scraper.md
- **Developed by:** [Goutam Soni](https://apify.com/goat255) (community)
- **Categories:** Business, Lead generation, Automation
- **Stats:** 3 total users, 2 monthly users, 94.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.20 / 1,000 business scrapeds

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

## BBB Scraper

Search the public business directory across the United States and Canada. One clean row per business with phone, full postal address split into fields and a link to its listing. No login and no API key.

### What it does

- **Address split into fields**: street, city, state or province, postal code and country, plus one combined line. No string splitting on your side.
- **Phone in two forms**: as displayed, and digits only for joining and deduplication.
- **United States and Canada**, both returning the same fields.
- **Many terms and locations in one run.** Results are deduplicated across every combination, so a business matching two searches is delivered once and charged once.
- **Search a whole country** by leaving the location empty, or narrow to a city.

Common uses: local lead lists, market and competitor mapping, territory planning, data enrichment, and building a trades and services directory.

### Input

| Field | Type | Description |
|---|---|---|
| `searchTerms` | array | Trades, services or business names. One search per entry. |
| `locations` | array | City and state or province, for example `Austin, TX`. Leave empty for the whole country. |
| `country` | string | `USA` or `CAN`. |
| `maxResultsPerSearch` | integer | Cap per term and location pair. Default 100. |
| `proxyConfiguration` | object | Optional. Enable to spread requests across IPs. |

#### Example input

```json
{
  "searchTerms": ["plumber", "roofing"],
  "locations": ["Austin, TX", "Dallas, TX"],
  "country": "USA",
  "maxResultsPerSearch": 300
}
```

### Output

Each item is one business.

```json
{
  "name": "Acme Plumbing",
  "phone": "+1 555-0100",
  "phoneDigits": "15550100",
  "street": "1 Example Street",
  "city": "Austin",
  "region": "TX",
  "postalCode": "78701-1234",
  "postalCodeShort": "78701",
  "country": "US",
  "address": "1 Example Street, Austin, TX, 78701-1234",
  "searchTerm": "plumber",
  "searchLocation": "Austin, TX",
  "profileUrl": "https://www.bbb.org/us/tx/austin/profile/plumber/example-0000-1000000000"
}
```

### Notes

- **`street` is only filled when the business publishes one.** Businesses that work across a service area rather than from a shopfront often list only a city and postal code. Those rows keep every other field and return `null` rather than a guess.
- `postalCodeShort` is the five digit form of a US postal code, which is what most datasets join on. Canadian postal codes have no short form, so the field repeats the full value.
- Searching without a location covers the whole country and returns far more results, so set `maxResultsPerSearch` deliberately.
- A search returns businesses near the location as well as inside it, so results can include neighbouring towns. The `city` and `region` fields show exactly where each one is.
- Paging stops automatically when a search runs out of results, so a cap larger than the number of matches simply returns everything available.

### Privacy

To improve our actors we collect anonymized usage telemetry (run stats and input patterns). No personal account data is collected.

# Actor input Schema

## `searchTerms` (type: `array`):

Trades, services or business names. One search per entry.

## `locations` (type: `array`):

City and state or province, for example "Austin, TX". Leave empty to search the whole country.

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

Which country's directory to search.

## `maxResultsPerSearch` (type: `integer`):

Cap for each term and location pair. Results are deduplicated across every pair.

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

Optional. Enable to spread requests across IPs.

## Actor input object example

```json
{
  "searchTerms": [
    "plumber"
  ],
  "locations": [
    "Austin, TX"
  ],
  "country": "USA",
  "maxResultsPerSearch": 100
}
```

# Actor output Schema

## `records` (type: `string`):

No description

# 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 = {
    "searchTerms": [
        "plumber"
    ],
    "locations": [
        "Austin, TX"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("goat255/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 = {
    "searchTerms": ["plumber"],
    "locations": ["Austin, TX"],
}

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

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

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

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "plumber"
  ],
  "locations": [
    "Austin, TX"
  ]
}' |
apify call goat255/bbb-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=goat255/bbb-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/jFpifO26C338c4ILm/builds/1cowndZKCgKXlC4hI/openapi.json
