{
  "openapi": "3.0.1",
  "info": {
    "title": "BBB Scraper - Ratings, Reviews, Complaints & Business Leads",
    "description": "Scrape Better Business Bureau profiles: BBB rating, accreditation, owner contacts, decoded emails, website, customer reviews and complaints. USA and Canada. Export CSV, Excel, JSON or XML.",
    "version": "0.1",
    "x-build-id": "AL7KPCfZRpbRYGxFU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~bbb-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-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/parseforge~bbb-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-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/parseforge~bbb-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-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": "Business names or industries to search on BBB, for example \"plumber\" or \"roofing contractor\". One search runs per term and location.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "BBB profile URLs",
            "type": "array",
            "description": "Direct links to BBB business profiles, for example https://www.bbb.org/us/tx/austin/profile/plumber/calixto-plumbing-0825-1000223803",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "City and state or postal code, for example \"Austin, TX\" or \"Toronto, ON\". Leave empty to search the whole country.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "USA",
              "CAN"
            ],
            "type": "string",
            "description": "BBB serves the United States and Canada.",
            "default": "USA"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
          },
          "includeProfileDetails": {
            "title": "Include full profile details",
            "type": "boolean",
            "description": "Owner and contacts, decoded emails, website, licenses, dates, review and complaint totals. Turn off for a fast listing-only run (name, rating, phone, address, categories).",
            "default": true
          },
          "includeReviews": {
            "title": "Include customer reviews",
            "type": "boolean",
            "description": "Adds one row per customer review. Needs full profile details.",
            "default": false
          },
          "maxReviewsPerBusiness": {
            "title": "Max reviews per business",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Reviews are collected newest first. Every review BBB shows is reachable.",
            "default": 20
          },
          "includeComplaints": {
            "title": "Include complaints",
            "type": "boolean",
            "description": "Adds one row per complaint, with the consumer text and every business and BBB response. Needs full profile details.",
            "default": false
          },
          "maxComplaintsPerBusiness": {
            "title": "Max complaints per business",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "BBB exposes at most 10,000 complaints per business and filter combination. Use the status and type filters to reach more.",
            "default": 20
          },
          "complaintStatus": {
            "title": "Complaint status",
            "enum": [
              "",
              "answered",
              "resolved"
            ],
            "type": "string",
            "description": "Only collect complaints with this status.",
            "default": ""
          },
          "complaintType": {
            "title": "Complaint type",
            "enum": [
              "",
              "billingissues",
              "customerservice",
              "delivery",
              "order",
              "productissues",
              "salesadvertising",
              "serviceorrepair"
            ],
            "type": "string",
            "description": "Only collect complaints of this type.",
            "default": ""
          },
          "sort": {
            "title": "Sort search results",
            "enum": [
              "Relevance",
              "Distance",
              "Rating",
              "AToZ",
              "ZToA"
            ],
            "type": "string",
            "description": "Order of the search results.",
            "default": "Relevance"
          },
          "accreditedOnly": {
            "title": "Accredited businesses only",
            "type": "boolean",
            "description": "Only BBB Accredited Businesses.",
            "default": false
          },
          "ratingGrade": {
            "title": "BBB rating grade",
            "enum": [
              "",
              "A",
              "B",
              "C",
              "D",
              "F"
            ],
            "type": "string",
            "description": "Only businesses whose letter grade starts with this letter (A includes A+, A and A-).",
            "default": ""
          },
          "stateFilter": {
            "title": "State or province",
            "enum": [
              "",
              "AL",
              "AK",
              "AZ",
              "AR",
              "CA",
              "CO",
              "CT",
              "DE",
              "DC",
              "FL",
              "GA",
              "HI",
              "ID",
              "IL",
              "IN",
              "IA",
              "KS",
              "KY",
              "LA",
              "ME",
              "MD",
              "MA",
              "MI",
              "MN",
              "MS",
              "MO",
              "MT",
              "NE",
              "NV",
              "NH",
              "NJ",
              "NM",
              "NY",
              "NC",
              "ND",
              "OH",
              "OK",
              "OR",
              "PA",
              "RI",
              "SC",
              "SD",
              "TN",
              "TX",
              "UT",
              "VT",
              "VA",
              "WA",
              "WV",
              "WI",
              "WY",
              "AB",
              "BC",
              "MB",
              "NB",
              "NL",
              "NS",
              "ON",
              "PE",
              "QC",
              "SK"
            ],
            "type": "string",
            "description": "Only businesses in this state or province.",
            "default": ""
          },
          "categoryId": {
            "title": "BBB category ID",
            "type": "string",
            "description": "BBB category code such as 10113-000 (Plumber). The codes appear as filter_category in BBB search URLs."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies are used to get past the Cloudflare check on profile pages.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}