# BBB Listing Scraper

Scrape Business name, categories, rating, telephone, address from BBB.com listing pages by search term and location.

- Template page: [https://www.octoparse.com/template/bbb-listing-scraper](https://www.octoparse.com/template/bbb-listing-scraper)
- Categories: Lead Generation, Directories
- Status: `PUBLISHED`
- Run mode: `BOTH`

## Pricing

Free.

## What is an Octoparse template?

An Octoparse template is a ready-to-use scraping workflow with predefined inputs and structured outputs. Use the exact parameter keys below; do not invent parameters.

## Overview

This ready-to-use template collects structured data from listing pages.

## Output

The current workflow extracts 12 fields, including `Address`, `Categories`, `Find`, `GetAQuote_URL`, `Near`, `Page_URL`, `Page_number`, `Rating`, `Result_count`, `Telephone`, `Title`, `Title_URL`.

## Use Cases

- Use structured results for research, comparison, and monitoring.
- Collect rows without building the extraction workflow from scratch.
- Combine results with other templates for downstream enrichment.
- Review a representative result before starting a large batch.

## Why Octoparse

- **No coding required:** complete Search term;location, Country, Confirm and start the template in local or cloud mode.
- **Flexible export:** review and export results as CSV, Excel, or JSON.

## Input

### Search term;location

Required. Search term;location/keywords Constraints: minItems=1; maxItems=100000; items.minLength=1; items.maxLength=5000.

### Country

Required. Country Constraints: minLength=1; maxLength=5000. Callable values are the `const` keys in JSON `oneOf`, not the option titles.

### Confirm

Required. Country Confirm Constraints: minItems=1; maxItems=1; items.minLength=1; items.maxLength=5000; uniqueItems=true. Callable values are the `const` keys in JSON `oneOf`, not the option titles.

## How to Use

## BBB Listing Scraper

This template collects BBB search-result data for a search term and location, including result count, page URL and number, business title and URL, categories, rating, telephone, address, and quote-request URL. Data is collected from [Better Business Bureau](https://www.bbb.org/search).

### Pricing

**Free of charge** – no per-line usage fee. Octoparse plan or resource limits may still apply.

### Input

Complete the following fields:

- **Search term;location** (Required) – Search term;location/keywords. Up to 100,000 entries per run.
- **Country** (Required) – Options: `United States`, `Canada`.
- **Confirm** (Required) – Up to 1 entry.

### How to Use

1. Open the template and click **Try it!**.
2. Fill in **Search term;location**, **Country**, and **Confirm** (see Input section for limits).
3. Choose a local or cloud run in Octoparse and start the task.
4. Review output fields such as `Title`, `Page_URL`, `Rating`, `Address`, `Telephone`, `Categories`, and `GetAQuote_URL`.
5. Export the rows in your preferred format.

### Tips

- Start with a focused **Search term;location** to make the first run easy to review.
- Keep `Page_URL` in the export so every row can be traced back to its originating input or page.

## Limitations

Results depend on what the source site exposes at run time. Fields may be empty when a source page does not provide a value. The template enforces the input limits shown above.

## Tips

Use specific, valid inputs and review a representative result before starting a large batch. Remove duplicate inputs when repeated records are not needed.

## FAQ

### What do I need to enter?

Use the exact inputs and limits listed above.

### What data does this template return?

See Output Schema below; availability can vary by source record.

### How is usage billed?

See the Pricing section above for current pricing and billing details.

## Related Templates

- [eBay Listing Page Scraper (by keyword)](https://www.octoparse.com/template/ebay-product-list-scraper-by-keyword)
- [Booking.com Hotel Listing Scraper](https://www.octoparse.com/template/booking-com-scraper)
- [Google Maps Store Listing Scraper (Japan)](https://www.octoparse.com/template/google-maps-store-listing-scraper)
- [Zillow Listing Scraper (by URL)](https://www.octoparse.com/template/zillow-scraper)
- [Mercadolibre Listing Pages Scraper (Keywords)](https://www.octoparse.com/template/mercadolibre-listados-scraper)

## Input Schema

```json
{
  "title": "BBB Listing Scraper input",
  "description": "Input parameters configured for the current published template version.",
  "type": "object",
  "schemaVersion": 1,
  "additionalProperties": false,
  "properties": {
    "search_term;location": {
      "title": "Search term;location",
      "description": "Search term;location/keywords",
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 5000
      },
      "minItems": 1,
      "maxItems": 100000,
      "x-octoparse": {
        "apiEnabled": true
      }
    },
    "country": {
      "title": "Country",
      "description": "Country",
      "type": "string",
      "minLength": 1,
      "maxLength": 5000,
      "oneOf": [
        {
          "title": "United States",
          "const": "United States"
        },
        {
          "title": "Canada",
          "const": "Canada"
        }
      ],
      "x-octoparse": {
        "apiEnabled": true
      }
    },
    "confirm": {
      "title": "Confirm",
      "description": "Country Confirm",
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 5000,
        "oneOf": [
          {
            "title": "United States",
            "const": "//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[1]"
          },
          {
            "title": "Canada",
            "const": "//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[2]"
          }
        ]
      },
      "minItems": 1,
      "maxItems": 1,
      "uniqueItems": true,
      "x-octoparse": {
        "apiEnabled": true
      }
    }
  },
  "required": [
    "search_term;location",
    "country",
    "confirm"
  ],
  "allOf": [
    {
      "if": {
        "properties": {
          "country": {
            "const": "United States"
          }
        },
        "required": [
          "country"
        ]
      },
      "then": {
        "properties": {
          "confirm": {
            "items": {
              "type": "string",
              "oneOf": [
                {
                  "title": "United States",
                  "const": "//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[1]"
                }
              ]
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "country": {
            "const": "Canada"
          }
        },
        "required": [
          "country"
        ]
      },
      "then": {
        "properties": {
          "confirm": {
            "items": {
              "type": "string",
              "oneOf": [
                {
                  "title": "Canada",
                  "const": "//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[2]"
                }
              ]
            }
          }
        }
      }
    }
  ]
}
```

## Input JSON Example

Example 1

```json
{
  "confirm": [
    "//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[1]"
  ],
  "country": "United States",
  "search_term;location": [
    "Roofing Contractors;77494"
  ]
}
```

Example 2

```json
{
  "confirm": [
    "//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[2]"
  ],
  "country": "Canada",
  "search_term;location": [
    "Roofing Contractors;M5V 2T6"
  ]
}
```

Example 3

```json
{
  "confirm": [
    "//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[1]"
  ],
  "country": "United States",
  "search_term;location": [
    "Heating and Air Conditioning;60629",
    "Heating and Air Conditioning;33612",
    "Heating and Air Conditioning;77036",
    "Heating and Air Conditioning;32807",
    "Heating and Air Conditioning;85032"
  ]
}
```

Example 4

```json
{
  "confirm": [
    "//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[1]"
  ],
  "country": "United States",
  "search_term;location": [
    "Heating and Air Conditioning;60629",
    "Heating and Air Conditioning;33612",
    "Heating and Air Conditioning;77036",
    "Heating and Air Conditioning;32807",
    "Heating and Air Conditioning;85032"
  ]
}
```

Example 5

```json
{
  "confirm": [
    "//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[1]"
  ],
  "country": "United States",
  "search_term;location": [
    "Heating and Air Conditioning;60629",
    "Heating and Air Conditioning;33612",
    "Heating and Air Conditioning;77036",
    "Heating and Air Conditioning;32807",
    "Heating and Air Conditioning;85032"
  ]
}
```


## Output Schema

```json
{
  "schemaVersion": 1,
  "type": "object",
  "properties": {
    "Address": {
      "type": "string",
      "description": ""
    },
    "Categories": {
      "type": "string",
      "description": ""
    },
    "Find": {
      "type": "string",
      "description": ""
    },
    "GetAQuote_URL": {
      "type": "string",
      "description": ""
    },
    "Near": {
      "type": "string",
      "description": ""
    },
    "Page_URL": {
      "type": "string",
      "description": ""
    },
    "Page_number": {
      "type": "string",
      "description": ""
    },
    "Rating": {
      "type": "string",
      "description": ""
    },
    "Result_count": {
      "type": "string",
      "description": ""
    },
    "Telephone": {
      "type": "string",
      "description": ""
    },
    "Title": {
      "type": "string",
      "description": ""
    },
    "Title_URL": {
      "type": "string",
      "description": ""
    }
  },
  "title": "BBB Listing Scraper output",
  "description": "Initial output fields derived from the current published implementation. Field descriptions are maintained by Data Center; production field names and types should be refreshed from recent successful runs.",
  "additionalProperties": false
}
```

## Output Example

Example 1

```json
{
  "Address": "2717 Commercial Center Blvd., Katy, TX 77494",
  "Categories": "Roofing Contractors",
  "Find": "Roofing Contractors",
  "GetAQuote_URL": "https://www.bbb.org/houston/quote/request-kelsey-elite-services-llc-90050826",
  "Near": "77494",
  "Page_URL": "https://www.bbb.org/search?find_country=USA&find_loc=77494&find_text=Roofing%20Contractors&page=1",
  "Page_number": "Page\n1",
  "Rating": "BBB Rating: A+",
  "Result_count": "5,425",
  "Telephone": "(832) 752-5937",
  "Title": "Kelsey Elite Services, LLC",
  "Title_URL": "https://www.bbb.org/us/tx/katy/profile/roofing-contractors/kelsey-elite-services-llc-0915-90050826/addressId/182494"
}
```

Example 2

```json
{
  "Address": "3922 Broadway St, Houston, TX 77087-4702",
  "Categories": "",
  "Find": "Roofing Contractors",
  "GetAQuote_URL": "https://www.bbb.org/houston/quote/request-a-abana-auto-insurance-golfcrest-90052084",
  "Near": "M5V 2T6",
  "Page_URL": "https://www.bbb.org/search?find_country=USA&find_loc=M5V%202T6&find_text=Roofing%20Contractors&page=1",
  "Page_number": "Page\n1",
  "Rating": "",
  "Result_count": "7,548,464",
  "Telephone": "(713) 649-2626",
  "Title": "SINGLEREPORTING",
  "Title_URL": "https://www.bbb.org/us/tx/houston/profile/auto-insurance/a-abana-auto-insurance-golfcrest-0915-90052084"
}
```

Example 3

```json
{
  "Address": "36-21 164th Street, Flushing, NY 11358-2003",
  "Categories": "Heating and Air Conditioning",
  "Find": "Heating and Air Conditioning",
  "GetAQuote_URL": "https://www.bbb.org/new-york-city/quote/request-jc-national-air-conditioning-corporation-123715",
  "Near": "11368",
  "Page_URL": "https://www.bbb.org/search?find_country=USA&find_loc=11368&find_text=Heating%20and%20Air%20Conditioning&page=1",
  "Page_number": "Page\n1",
  "Rating": "BBB Rating: A+",
  "Result_count": "6,448",
  "Telephone": "(718) 463-7300",
  "Title": "JC National Air Conditioning Corporation",
  "Title_URL": "https://www.bbb.org/us/ny/flushing/profile/heating-and-air-conditioning/jc-national-air-conditioning-corporation-0121-123715"
}
```

Example 4

```json
{
  "Address": "3669 E La Salle St, Phoenix, AZ 85040",
  "Categories": "Home Services",
  "Find": "Heating and Air Conditioning",
  "GetAQuote_URL": "https://adclick.g.doubleclick.net/pcs/click?xai=AKAOjssWNBM9foNxuC5EfWlRvrVrupt8nBAP7eKQetZWvmQkZ-EZw7C1G5ELWvZrD6o1xRHnHKX-EJjn_Lg3FGo7ZujjZdDYnmmITso0NBZpTW0T40SymMwKgnmnB1wnXuCPYSgYvzM04ThXgXmSjG3-WI5T_1ZBN49_jrmrMTk0DLh2H0PoO57dTJTdEWdiARLaGjnbt53R6PSO4uv2n2raWn9o9qmdY1PwvU-EODqnc-Wte7bTrmhWnek-z0fAs3riGpGVZ1CVMJkYdbFlSYSVlLNvtGYzz-sloreMAwOSOtIpmboBGD4BSmpVX8ok6QINJ1DEuhRw-HLitns-ZWZKvULSuc6vmg7fAVXgnkfTjlcd-F2llfrnWv0w4qC3BCsU8Pd0JGGHJewAoweikOso5ASl6y5L4Q&sai=AMfl-YRdUyo335fqp1Bp1L48-AW2saVvLJRa-OBQ3NQCMByYjc2v1VYD9K91nKMO6WEgutyrvrFpMd79aPXMoWDGYgiBXKk_fcZhJfPUzXSpqYmPbxioQ_EZ3YAActjG1bf6uQTUAOY190YeHhmdkQ3WwLvUCzpZ7ZOneGKEJmsETYKRoL2x3_t5KLkScFwJMRyO-GH6fZAfG15fBY-deF2FDv9DyNP_ba-yW_-h6Q84oUykqSJknjMhFFtPVO2xHQceFzhkLEK2hmrpkZUBeiDkDmGNvxl39QrVrupH3EcugqEwI_JlSioUdEnCKPYjfJhLznEtyYXMQPKQorO3c3GsO4iaJ--r9ZpJl7TxmbxiBvPsvN3FHDjt67FhNtsuCYs3CfNR8CAbfsrE6-aaDQ&sig=Cg0ArKJSzPKX6ms9EZTuEAE&fbs_aeid=%5Bgw_fbsaeid%5D&urlfix=1&adurl=https://www.bbb.org/pacific-southwest/quote/request-day-night-air-conditioning-heating-plumbing-llc-364",
  "Near": "85032",
  "Page_URL": "https://www.bbb.org/search?find_country=USA&find_loc=85032&find_text=Heating%20and%20Air%20Conditioning&page=1",
  "Page_number": "Page\n1",
  "Rating": "BBB Rating: A+",
  "Result_count": "2,235",
  "Telephone": "(602) 956-9404",
  "Title": "advertisement:\nDay & Night Air Conditioning Heating & Plumbing LLC",
  "Title_URL": "https://adclick.g.doubleclick.net/pcs/click?xai=AKAOjssWNBM9foNxuC5EfWlRvrVrupt8nBAP7eKQetZWvmQkZ-EZw7C1G5ELWvZrD6o1xRHnHKX-EJjn_Lg3FGo7ZujjZdDYnmmITso0NBZpTW0T40SymMwKgnmnB1wnXuCPYSgYvzM04ThXgXmSjG3-WI5T_1ZBN49_jrmrMTk0DLh2H0PoO57dTJTdEWdiARLaGjnbt53R6PSO4uv2n2raWn9o9qmdY1PwvU-EODqnc-Wte7bTrmhWnek-z0fAs3riGpGVZ1CVMJkYdbFlSYSVlLNvtGYzz-sloreMAwOSOtIpmboBGD4BSmpVX8ok6QINJ1DEuhRw-HLitns-ZWZKvULSuc6vmg7fAVXgnkfTjlcd-F2llfrnWv0w4qC3BCsU8Pd0JGGHJewAoweikOso5ASl6y5L4Q&sai=AMfl-YRdUyo335fqp1Bp1L48-AW2saVvLJRa-OBQ3NQCMByYjc2v1VYD9K91nKMO6WEgutyrvrFpMd79aPXMoWDGYgiBXKk_fcZhJfPUzXSpqYmPbxioQ_EZ3YAActjG1bf6uQTUAOY190YeHhmdkQ3WwLvUCzpZ7ZOneGKEJmsETYKRoL2x3_t5KLkScFwJMRyO-GH6fZAfG15fBY-deF2FDv9DyNP_ba-yW_-h6Q84oUykqSJknjMhFFtPVO2xHQceFzhkLEK2hmrpkZUBeiDkDmGNvxl39QrVrupH3EcugqEwI_JlSioUdEnCKPYjfJhLznEtyYXMQPKQorO3c3GsO4iaJ--r9ZpJl7TxmbxiBvPsvN3FHDjt67FhNtsuCYs3CfNR8CAbfsrE6-aaDQ&sig=Cg0ArKJSzPKX6ms9EZTuEAE&fbs_aeid=%5Bgw_fbsaeid%5D&urlfix=1&adurl=https://www.bbb.org/us/az/phoenix/profile/home-services/day-night-air-conditioning-heating-plumbing-llc-1126-364"
}
```

Example 5

```json
{
  "Address": "7687 Frontage Rd, Cicero, NY 13039-8921",
  "Categories": "Health Club",
  "Find": "Heating and Air Conditioning",
  "GetAQuote_URL": "",
  "Near": "32807",
  "Page_URL": "https://www.bbb.org/search?find_country=CAN&find_loc=32807&find_text=Heating%20and%20Air%20Conditioning&page=1",
  "Page_number": "Page\n1",
  "Rating": "BBB Rating: A+",
  "Result_count": "7,524,320",
  "Telephone": "(315) 452-5522",
  "Title": "Champions Fitness Super Center",
  "Title_URL": "https://www.bbb.org/us/ny/cicero/profile/health-club/champions-fitness-super-center-0041-54000418"
}
```

## API

`POST https://openapi.octoparse.com/api/agentTools/executeTask`

This is the OpenAPI Agent Tools `executeTask` endpoint. Authenticate with a Bearer token.

Request body:

`templateName` is the template slug; `parameters` is a JSON object string whose keys match Input Schema; `taskName`, `idempotencyKey`, and `maxCollectedRows` are optional.

Obtain a token:

```http
POST https://openapi.octoparse.com/token
Content-Type: application/json

{
  "username": "YOUR_USERNAME",
  "password": "YOUR_PASSWORD",
  "grant_type": "password"
}
```

Use `data.access_token` as `Authorization: Bearer <token>`. After starting, poll `getTaskStatus` and export with `exportData`.

```json
{
  "templateName": "bbb-listing-scraper",
  "taskName": "BBB Listing Scraper",
  "parameters": "{\"confirm\":[\"//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[1]\"],\"country\":\"United States\",\"search_term;location\":[\"Roofing Contractors;77494\"]}"
}
```

## Python Example

```python
import json
import requests

OPENAPI_BASE = "https://openapi.octoparse.com"
ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"

parameters = json.loads("{\"confirm\":[\"//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[1]\"],\"country\":\"United States\",\"search_term;location\":[\"Roofing Contractors;77494\"]}")

response = requests.post(
    f"{OPENAPI_BASE}/api/agentTools/executeTask",
    headers={
        "Authorization": f"Bearer {ACCESS_TOKEN}",
        "Content-Type": "application/json",
    },
    json={
        "templateName": "bbb-listing-scraper",
        "taskName": "BBB Listing Scraper",
        "parameters": json.dumps(parameters, ensure_ascii=False),
    },
    timeout=60,
)
print(response.status_code)
print(response.json())
```

## HTTP/cURL Example

```bash
curl -X POST "https://openapi.octoparse.com/api/agentTools/executeTask" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "templateName": "bbb-listing-scraper",
  "taskName": "BBB Listing Scraper",
  "parameters": "{\"confirm\":[\"//body/div[1]/main[1]/div[1]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/div[2]/ul[1]/li[1]\"],\"country\":\"United States\",\"search_term;location\":[\"Roofing Contractors;77494\"]}"
}
JSON
```

## MCP Setup

Connect an MCP-compatible AI client to `https://mcp.octoparse.com` using browser OAuth or an Octoparse API key. Find `bbb-listing-scraper`, inspect its inputs, create a cloud task with the exact Input Schema keys, and export JSON results.

## Machine-readable Resources

- [Template contract](https://www.octoparse.com/templates/bbb-listing-scraper.json)
- [Manifest](https://www.octoparse.com/templates/bbb-listing-scraper-manifest.json)
