{
  "openapi": "3.0.1",
  "info": {
    "title": "BBB Scraper | $0.90 per 1k | Past the 225-Result Limit",
    "description": "Scrape Better Business Bureau (BBB.org) businesses by keyword and city, ZIP or state, US and Canada: BBB rating, accreditation, categories, address, phone, coordinates. Goes past BBB's 225-result limit. No residential proxy. Never a silent empty run.",
    "version": "0.1",
    "x-build-id": "vF2fXj2LpsN4FDcPv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solidrows~bbb-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solidrows-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/solidrows~bbb-scraper/runs": {
      "post": {
        "operationId": "runs-sync-solidrows-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/solidrows~bbb-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-solidrows-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": {
          "searchQueries": {
            "title": "What to search",
            "type": "array",
            "description": "Business categories, keywords or business names, as you would type them on BBB.org: \"plumber\", \"roofing contractors\", \"dentist\", \"Roto-Rooter\". Every query is searched in every location.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Cities, ZIP / postal codes or states: \"New York, NY\", \"90210\", \"Toronto, ON\", \"TX\". Paste a whole list of cities or ZIP codes - one search per line and query. Leave empty for a nationwide search.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "auto",
              "USA",
              "CAN"
            ],
            "type": "string",
            "description": "Limit results to the United States or Canada. \"Auto\" lets BBB decide from the location.",
            "default": "auto"
          },
          "distanceMiles": {
            "title": "Distance (miles)",
            "minimum": 0,
            "type": "integer",
            "description": "Search radius around each location in miles. BBB otherwise pads long result lists with businesses from farther away. 0 = BBB default.",
            "default": 0
          },
          "accreditedOnly": {
            "title": "BBB Accredited businesses only",
            "type": "boolean",
            "description": "Return only BBB Accredited businesses. The filter is applied on BBB.org, so you do not pay for the others.",
            "default": false
          },
          "minRating": {
            "title": "Minimum BBB rating",
            "enum": [
              "any",
              "A+",
              "A",
              "A-",
              "B+",
              "B",
              "B-",
              "C+",
              "C",
              "C-",
              "D+",
              "D",
              "D-",
              "F"
            ],
            "type": "string",
            "description": "Keep only businesses rated at this grade or better. Businesses without a rating (NR) are left out. Skipped businesses are not charged.",
            "default": "any"
          },
          "categories": {
            "title": "Only these BBB categories",
            "type": "array",
            "description": "Optional. Keep only businesses listed in a BBB category whose name contains one of these texts, e.g. \"Roofing Contractors\", \"Plumber\". Removes loosely related results that a keyword search brings in. Skipped businesses are not charged.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort results by",
            "enum": [
              "Relevance",
              "Distance",
              "Rating",
              "AToZ",
              "ZToA"
            ],
            "type": "string",
            "description": "Order of results on BBB.org. Decides which businesses come first when you limit the number of results.",
            "default": "Relevance"
          },
          "splitLargeSearches": {
            "title": "Get more than 225 results per search",
            "type": "boolean",
            "description": "BBB.org shows at most 225 businesses for any search. When on, a larger search is automatically repeated in narrower variants (by rating, category and name order) and duplicates are removed, so you get far more of the matches. Turn off to get only the first 225.",
            "default": true
          },
          "includeBranches": {
            "title": "Keep every branch address",
            "type": "boolean",
            "description": "BBB lists a multi-location business (a bank, a franchise, a credit union) once per address. By default the scraper keeps one row per business. Turn on to save every branch address as its own row (same id, different addressId and address); each row is charged as a business.",
            "default": false
          },
          "onlyNewBusinesses": {
            "title": "Only new businesses (monitoring)",
            "type": "boolean",
            "description": "Remembers which businesses were already returned for this search and returns only new ones on the next runs. The first run returns everything and builds the memory. You pay only for businesses that are returned.",
            "default": false
          },
          "trackRatingChanges": {
            "title": "Also return rating and accreditation changes",
            "type": "boolean",
            "description": "Works with \"Only new businesses\". Businesses seen before are returned again when their BBB rating or accreditation changed, with changeType \"changed\", previousRating and previousAccredited.",
            "default": false
          },
          "startUrls": {
            "title": "BBB search URLs",
            "type": "array",
            "description": "Optional BBB.org search result URLs, e.g. https://www.bbb.org/search?find_text=roofing&find_loc=Dallas%2C+TX. All filters set on the website are kept. Only search pages are supported; business profile and category pages are protected by a browser challenge and are not opened.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max businesses",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of businesses to save in the whole run. Use 0 for no limit.",
            "default": 100
          },
          "maxItemsPerSearch": {
            "title": "Max businesses per search",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of businesses per query + location pair, so that every city gets a balanced share. Use 0 for no limit.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is used by default. Datacenter proxies work for BBB search pages, no residential proxies needed.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}