{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Business Profile Q&A Scraper",
    "version": "1.0",
    "x-build-id": "zJxPs800dbXYFLIBG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kayhermes~google-business-profile-q-a-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kayhermes-google-business-profile-q-a-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/kayhermes~google-business-profile-q-a-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kayhermes-google-business-profile-q-a-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/kayhermes~google-business-profile-q-a-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kayhermes-google-business-profile-q-a-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",
        "required": [
          "sourceMode",
          "maxPlaces",
          "maxQuestionsPerPlace",
          "outputFilter",
          "includeAnswerDetails",
          "locale",
          "maxConcurrency",
          "maxRequestRetries",
          "navigationTimeoutSecs",
          "requestHandlerTimeoutSecs",
          "scrollAttempts",
          "saveDebugArtifacts"
        ],
        "properties": {
          "sourceMode": {
            "title": "Source mode",
            "enum": [
              "DEMO",
              "LIVE_URLS",
              "IMPORTED_HTML",
              "IMPORTED_JSON"
            ],
            "type": "string",
            "description": "DEMO runs a realistic offline fixture through the same DOM extraction pipeline. LIVE_URLS opens Google Maps place URLs. IMPORTED_HTML processes saved rendered pages. IMPORTED_JSON normalizes previously collected Q&A records.",
            "default": "DEMO"
          },
          "startUrls": {
            "title": "Google Maps place URLs",
            "maxItems": 100,
            "type": "array",
            "description": "Specific Google Maps business/place URLs. Search-result pages and arbitrary websites are rejected. Short maps.app.goo.gl links are accepted but may require proxy-supported redirects.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "Google Maps business/place URL to inspect for public questions and answers."
                }
              }
            },
            "default": []
          },
          "importedHtmlPages": {
            "title": "Imported rendered HTML pages",
            "maxItems": 50,
            "type": "array",
            "description": "For IMPORTED_HTML. Each item must contain sourceUrl and renderedHtml captured after opening the Q&A panel. Useful for audits and regression runs without live navigation.",
            "items": {
              "type": "object",
              "required": [
                "sourceUrl",
                "renderedHtml"
              ],
              "properties": {
                "sourceUrl": {
                  "type": "string",
                  "title": "Source Google Maps URL",
                  "description": "Original Google Maps business URL associated with the imported rendered HTML page."
                },
                "renderedHtml": {
                  "type": "string",
                  "title": "Rendered Q&A HTML",
                  "description": "Rendered HTML captured after the Google Business Profile Q&A panel was opened."
                }
              }
            },
            "default": []
          },
          "importedPlaces": {
            "title": "Imported Q&A JSON",
            "maxItems": 100,
            "type": "array",
            "description": "For IMPORTED_JSON. Each place can include sourceUrl, placeName, address, placeId, and questions[]. Imported records still pass normalization, deduplication, topic classification, scoring, filtering, and schema checks.",
            "items": {
              "type": "object"
            },
            "default": []
          },
          "maxPlaces": {
            "title": "Maximum places",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Hard cap on unique place sources processed in one run.",
            "default": 20
          },
          "maxQuestionsPerPlace": {
            "title": "Maximum questions per place",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stops scrolling and output after this many deduplicated questions for each place.",
            "default": 100
          },
          "outputFilter": {
            "title": "Question filter",
            "enum": [
              "ALL",
              "UNANSWERED",
              "NO_OWNER_RESPONSE",
              "OWNER_ANSWERED"
            ],
            "type": "string",
            "description": "Return all questions, only unanswered questions, only questions without an owner response, or only questions answered by the owner.",
            "default": "ALL"
          },
          "topics": {
            "title": "Topics to include",
            "uniqueItems": true,
            "type": "array",
            "description": "Optional topic filter. Leave empty to include every classified topic.",
            "items": {
              "type": "string",
              "enum": [
                "hours",
                "parking_transport",
                "accessibility",
                "pricing_payment",
                "products_services",
                "reservations_wait",
                "policies_requirements",
                "location_contact",
                "availability_inventory",
                "general"
              ]
            },
            "default": []
          },
          "questionTextContains": {
            "title": "Question text contains",
            "maxLength": 200,
            "type": "string",
            "description": "Optional case-insensitive substring filter applied after normalization.",
            "default": ""
          },
          "includeAnswerDetails": {
            "title": "Include answer details",
            "type": "boolean",
            "description": "Include answer text, author, owner signal, date, and helpful count. When disabled, answer counts and coverage fields remain available.",
            "default": true
          },
          "locale": {
            "title": "Google Maps locale",
            "pattern": "^[a-z]{2}(?:-[A-Z]{2})?$",
            "type": "string",
            "description": "BCP-47 style locale used for Accept-Language and hl parameters. Extraction recognizes common English Q&A labels and semantic DOM signals; non-English interfaces may reduce coverage.",
            "default": "en-US"
          },
          "maxConcurrency": {
            "title": "Maximum browser concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Google Maps is resource-intensive. Start low; higher values increase block risk and memory use.",
            "default": 2
          },
          "maxRequestRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries transient navigation, timeout, and blocked-page failures with exponential backoff and fresh Chromium sessions.",
            "default": 2
          },
          "navigationTimeoutSecs": {
            "title": "Navigation timeout (seconds)",
            "minimum": 15,
            "maximum": 180,
            "type": "integer",
            "description": "Maximum time for initial Google Maps navigation.",
            "default": 60
          },
          "requestHandlerTimeoutSecs": {
            "title": "Per-place timeout (seconds)",
            "minimum": 30,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum total processing time for one listing, including Q&A panel scrolling.",
            "default": 150
          },
          "scrollAttempts": {
            "title": "Q&A scroll attempts",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum panel scrolls used to load additional questions. Stops early when no new content appears.",
            "default": 12
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional for demo/import modes. Strongly recommended for live Google Maps runs. Residential proxy access may be required depending on volume and region.",
            "default": {
              "useApifyProxy": true
            }
          },
          "saveDebugArtifacts": {
            "title": "Save debug artifacts",
            "type": "boolean",
            "description": "On live failures, save a screenshot and rendered HTML in the default key-value store. Disabled by default because pages can contain public contributor names and other page content.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}