{
  "openapi": "3.0.1",
  "info": {
    "title": "BBB Business Scraper: Leads, Ratings & Complaints",
    "description": "BBB businesses with grade, accreditation, phone, email and website, plus reviews and complaints. $12 per 1,000 profiles. Name, grade, phone, email, website, owner, hours, licence and address; listing rows $3 per 1,000, reviews and complaints $4 per 1,000. No login needed.",
    "version": "0.1",
    "x-build-id": "Aj89CenobhyVjeICM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luzivanlt~bbb-business-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luzivanlt-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/luzivanlt~bbb-business-scraper/runs": {
      "post": {
        "operationId": "runs-sync-luzivanlt-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/luzivanlt~bbb-business-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-luzivanlt-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": {
          "searches": {
            "title": "Keywords",
            "type": "array",
            "description": "What to search for on BBB, one per line, such as \"plumbers\", \"roofers\" or \"dentists\". Each keyword is paired with every location below.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "A city and state such as \"New York, NY\", a state such as \"Texas\", or a ZIP code such as 78701. Empty searches the whole USA, which the site still caps at 225 rows per search.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "BBB search or business links",
            "type": "array",
            "description": "Paste a BBB search link such as https://www.bbb.org/search?find_text=roofers&find_loc=Austin%2C+TX or a business link such as https://www.bbb.org/us/ny/new-york/profile/plumber/name-0121-12345. A business link reads that page even when full business pages are off.",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Full business pages",
            "type": "boolean",
            "description": "On by default. Each business's own BBB page is read as well, which adds the decoded email, website, social profiles, owner and contacts, hours, service areas, years in business, licences and payment methods. Off saves the search rows only: name, grade, accreditation, phone, address, categories, rating and counts.",
            "default": true
          },
          "includeReviews": {
            "title": "Customer reviews",
            "type": "boolean",
            "description": "Off by default. On adds one row per customer review, with the star rating, the reviewer's first name, the date, the text and the business's reply. Charged per review row.",
            "default": false
          },
          "maxReviewPages": {
            "title": "Review pages per business",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How many review pages to read per business, 10 reviews to a page. 0 reads every page the site lists. A business with more reviews than the limit is saved with the reviews read so far and the run status says so.",
            "default": 0
          },
          "includeComplaints": {
            "title": "Complaints",
            "type": "boolean",
            "description": "Off by default. On adds one row per complaint BBB publishes, with the complaint type, status, date, text and the business's responses. Charged per complaint row.",
            "default": false
          },
          "maxComplaintPages": {
            "title": "Complaint pages per business",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How many complaint pages to read per business. 0 reads every page the site lists. A business with more complaints than the limit is saved with the complaints read so far and the run status says so.",
            "default": 0
          },
          "maxResults": {
            "title": "Maximum businesses",
            "minimum": 0,
            "maximum": 50000,
            "type": "integer",
            "description": "How many business rows to save in total, from 0 to 50000. 0 means every business the searches find. The site answers at most 225 rows per search, so more rows need more keywords or locations.",
            "default": 20
          },
          "accreditedOnly": {
            "title": "Accredited businesses only",
            "type": "boolean",
            "description": "Off by default. On keeps only businesses BBB accredits, which are the ones that paid for BBB membership and carry the seal.",
            "default": false
          },
          "minRating": {
            "title": "Lowest BBB grade",
            "enum": [
              "",
              "A+",
              "A",
              "A-",
              "B+",
              "B",
              "B-",
              "C+",
              "C",
              "C-",
              "D+",
              "D",
              "D-",
              "F"
            ],
            "type": "string",
            "description": "Keep only businesses at this grade or better. BBB grades run A+ down to F; businesses BBB has not rated are dropped when a grade is chosen. Empty keeps every business.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}