{
  "openapi": "3.0.1",
  "info": {
    "title": "BBB Scraper: Business Leads, Reviews & Complaints",
    "description": "Find US and Canadian businesses on BBB. Collect company details, public contacts, customer reviews, complaints and replies for lead generation, supplier checks and reputation research. View each business in one place or export to CSV, Excel and JSON. No coding needed.",
    "version": "0.1",
    "x-build-id": "VDzgWn4kPOg0I2qSw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/arjun_code~bbb-business-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-arjun_code-bbb-business-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/arjun_code~bbb-business-scraper/runs": {
      "post": {
        "operationId": "runs-sync-arjun_code-bbb-business-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/arjun_code~bbb-business-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-arjun_code-bbb-business-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": {
          "country": {
            "title": "🌎 Country for custom locations",
            "enum": [
              "USA",
              "CAN"
            ],
            "type": "string",
            "description": "Choose the country for cities or postal codes you type yourself. Suggested cities use their own country automatically. A country filter in a pasted BBB search link takes priority.",
            "default": "USA"
          },
          "keywords": {
            "title": "🔎 Business names or industries",
            "type": "array",
            "description": "Select an industry or type a company name, such as plumber or LawDepot. Add locations below. Each name or industry is searched in every location. Leave blank to use only BBB links.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "plumber",
                "roofing",
                "electrician",
                "heating and air conditioning",
                "general contractor",
                "home remodeling",
                "landscaping",
                "tree service",
                "pest control",
                "house cleaning",
                "moving company",
                "self storage",
                "auto repair",
                "used car dealer",
                "auto body repair",
                "insurance",
                "real estate",
                "property management",
                "accounting",
                "tax preparation",
                "dentist",
                "lawyer",
                "mortgage broker",
                "solar installation"
              ],
              "enumTitles": [
                "Plumbing services",
                "Roofing contractors",
                "Electricians",
                "Heating and air conditioning (HVAC)",
                "General contractors",
                "Home remodeling",
                "Landscaping",
                "Tree services",
                "Pest control",
                "House cleaning",
                "Moving companies",
                "Self storage",
                "Auto repair",
                "Used car dealers",
                "Auto body repair",
                "Insurance",
                "Real estate",
                "Property management",
                "Accounting",
                "Tax preparation",
                "Dentists",
                "Lawyers",
                "Mortgage brokers",
                "Solar installation"
              ]
            }
          },
          "locations": {
            "title": "📍 Cities, states or postal codes",
            "type": "array",
            "description": "Pick cities or enter a city, state, province or postal code. Required when searching by business name or industry. Suggested US and Canadian cities can be mixed; other locations use the country selected above.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "Austin, TX",
                "Atlanta, GA",
                "Boston, MA",
                "Charlotte, NC",
                "Chicago, IL",
                "Dallas, TX",
                "Denver, CO",
                "Detroit, MI",
                "Houston, TX",
                "Las Vegas, NV",
                "Los Angeles, CA",
                "Miami, FL",
                "Minneapolis, MN",
                "Nashville, TN",
                "New York, NY",
                "Orlando, FL",
                "Philadelphia, PA",
                "Phoenix, AZ",
                "Portland, OR",
                "San Antonio, TX",
                "San Diego, CA",
                "San Francisco, CA",
                "Seattle, WA",
                "Tampa, FL",
                "Washington, DC",
                "Toronto, ON",
                "Vancouver, BC",
                "Montreal, QC",
                "Calgary, AB",
                "Edmonton, AB",
                "Ottawa, ON",
                "Winnipeg, MB",
                "Quebec City, QC",
                "Hamilton, ON",
                "Kitchener, ON",
                "London, ON",
                "Victoria, BC",
                "Halifax, NS",
                "Saskatoon, SK",
                "Regina, SK"
              ],
              "enumTitles": [
                "Austin, TX (United States)",
                "Atlanta, GA (United States)",
                "Boston, MA (United States)",
                "Charlotte, NC (United States)",
                "Chicago, IL (United States)",
                "Dallas, TX (United States)",
                "Denver, CO (United States)",
                "Detroit, MI (United States)",
                "Houston, TX (United States)",
                "Las Vegas, NV (United States)",
                "Los Angeles, CA (United States)",
                "Miami, FL (United States)",
                "Minneapolis, MN (United States)",
                "Nashville, TN (United States)",
                "New York, NY (United States)",
                "Orlando, FL (United States)",
                "Philadelphia, PA (United States)",
                "Phoenix, AZ (United States)",
                "Portland, OR (United States)",
                "San Antonio, TX (United States)",
                "San Diego, CA (United States)",
                "San Francisco, CA (United States)",
                "Seattle, WA (United States)",
                "Tampa, FL (United States)",
                "Washington, DC (United States)",
                "Toronto, ON (Canada)",
                "Vancouver, BC (Canada)",
                "Montreal, QC (Canada)",
                "Calgary, AB (Canada)",
                "Edmonton, AB (Canada)",
                "Ottawa, ON (Canada)",
                "Winnipeg, MB (Canada)",
                "Quebec City, QC (Canada)",
                "Hamilton, ON (Canada)",
                "Kitchener, ON (Canada)",
                "London, ON (Canada)",
                "Victoria, BC (Canada)",
                "Halifax, NS (Canada)",
                "Saskatoon, SK (Canada)",
                "Regina, SK (Canada)"
              ]
            }
          },
          "startUrls": {
            "title": "🔗 BBB links (optional)",
            "type": "array",
            "description": "Paste BBB business, review, complaint or search links. Leave business names and locations blank to collect only these links. If you fill in both methods, links are collected first.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxCompanies": {
            "title": "Total business limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum unique businesses for the whole run. For example, 20 means up to 20 businesses in total across all links, searches and locations. Inputs are collected in order until this limit is reached.",
            "default": 20
          },
          "includeCompanyDetails": {
            "title": "🏢 Include business details",
            "type": "boolean",
            "description": "Add available websites, public contacts, BBB ratings, accreditation and business history. $8.80 per 1,000 businesses. When off, search listings cost $1.80 per 1,000 instead. Choose reviews and complaints separately below.",
            "default": true
          },
          "includeReviews": {
            "title": "⭐ Collect customer reviews",
            "type": "boolean",
            "description": "Add review text, star ratings, dates and available replies to each business's results. $4.80 per 1,000 reviews delivered, including replies. Choose the number per business below.",
            "default": false
          },
          "maxReviewsPerCompany": {
            "title": "Reviews per business (0 = all public)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Collect up to this many newest reviews for each business. Enter 0 for all accessible public reviews. Applies when Collect customer reviews is switched on; available replies are included.",
            "default": 10
          },
          "includeComplaints": {
            "title": "💬 Collect complaints",
            "type": "boolean",
            "description": "Add public complaint text, type, status and available replies to each business's results. $4.80 per 1,000 complaints delivered, including replies. Hidden complaint text is unavailable and not charged.",
            "default": false
          },
          "maxComplaintsPerCompany": {
            "title": "Complaints per business (0 = all public)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Collect up to this many most recent public complaints for each business. Enter 0 for all accessible public complaints. Applies when Collect complaints is switched on; available replies are included.",
            "default": 10
          },
          "maxSearchPages": {
            "title": "Search pages per search",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Number of result pages to visit for each search. Your total business limit still applies. BBB offers a limited search window; use more specific cities or industries for broader research.",
            "default": 5
          },
          "includeRawData": {
            "title": "Include extra source data",
            "type": "boolean",
            "description": "Add the original BBB data for custom analysis or troubleshooting. This makes downloads larger. Most users can leave this off.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}