{
  "openapi": "3.0.1",
  "info": {
    "title": "BBB Scraper ($2.50/1K) - Leads, Ratings, Reviews, Complaints",
    "description": "Scrape BBB (Better Business Bureau, bbb.org) business listings by keyword and location: name, BBB rating, accreditation, phone, address, categories. Add-ons: owners and contacts, email, website, business details, customer reviews and complaints.",
    "version": "0.0",
    "x-build-id": "JDEpP5JrJIhTv27pd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/carabain-digital~bbb-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-carabain-digital-bbb-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/carabain-digital~bbb-scraper/runs": {
      "post": {
        "operationId": "runs-sync-carabain-digital-bbb-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/carabain-digital~bbb-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-carabain-digital-bbb-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "What to search for, as on bbb.org: a trade or category (`plumber`, `roofing`, `dentist`) or a business name. Each term is searched in every location below. Example: `roofing`.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Where to search: `City, ST`, a ZIP code or a state code. Leave empty to search the whole country. Example: `Denver, CO`, `78753` or `TX`.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "US",
              "CA"
            ],
            "type": "string",
            "description": "BBB covers the United States and Canada. Example: `US`.",
            "default": "US"
          },
          "startUrls": {
            "title": "BBB URLs",
            "type": "array",
            "description": "BBB search result pages (`https://www.bbb.org/search?find_text=...&find_loc=...`, filters in the URL are kept) or business profiles (`https://www.bbb.org/us/tx/austin/profile/.../indeed-0825-1000101793`). A profile URL always comes with its details. Used in addition to the search terms.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max businesses",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many businesses in total. Example: `100`.",
            "default": 100
          },
          "maxItemsPerSearch": {
            "title": "Max businesses per search",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap each search term x location, so one big city does not use up Max businesses. Empty = no cap. Example: `200`."
          },
          "splitLargeSearches": {
            "title": "Get past BBB's 225-result limit",
            "type": "boolean",
            "description": "BBB shows at most 225 results per search. When a search has more, the Actor repeats it per category (up to about 2,500 businesses per search). For more, add ZIP codes or nearby towns as locations.",
            "default": true
          },
          "accreditedOnly": {
            "title": "BBB Accredited only",
            "type": "boolean",
            "description": "Only BBB Accredited Businesses.",
            "default": false
          },
          "minRating": {
            "title": "Minimum BBB rating",
            "enum": [
              "A+",
              "A",
              "A-",
              "B+",
              "B",
              "B-",
              "C+",
              "C",
              "C-",
              "D+",
              "D",
              "D-",
              "F"
            ],
            "type": "string",
            "description": "Skip businesses with a lower BBB letter grade (and unrated ones). Example: `A`."
          },
          "maxDistanceMiles": {
            "title": "Max distance (miles)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Only businesses within this many miles of each location. Example: `10`."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "distance",
              "rating",
              "name",
              "name_desc"
            ],
            "type": "string",
            "description": "Order of the search results, as on bbb.org.",
            "default": "relevance"
          },
          "includeDetails": {
            "title": "Details: owners, email, website (paid add-on)",
            "type": "boolean",
            "description": "Open each business profile for website, email, owners and managers with their titles, extra phones, entity type, years in business, start, incorporation and accreditation dates, review and complaint counts and the description. Adds $2.00 per 1,000 businesses.",
            "default": false
          },
          "maxReviews": {
            "title": "Customer reviews per business (paid add-on)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Also collect up to this many customer reviews per business, newest first: rating, text, date, author and the business's reply. 0 = off. Adds $1.50 per 1,000 reviews. Example: `20`.",
            "default": 0
          },
          "maxComplaints": {
            "title": "Complaints per business (paid add-on)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Also collect up to this many BBB complaints per business, newest first: type, status, date, text and the replies of business and customer. 0 = off. Adds $1.50 per 1,000 complaints. Example: `20`.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "BBB sits behind Cloudflare, which blocks datacenter IPs. The default (a US residential proxy) is built in and included in the price. Change it only to use your own proxy.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}