{
  "openapi": "3.0.1",
  "info": {
    "title": "Google AI Overviews Scraper",
    "description": "Scrape Google AI Overview (AIO) for any query — get the AI-generated answer text, cited source domains/URLs/titles, citation positions, and optional brand-match detection. Multi-country, desktop/mobile, MCP-ready for AI agents. Hybrid Camoufox scrape + optional SerpApi BYOK fallback.",
    "version": "0.1",
    "x-build-id": "5s5mv4F7Yo4nqui0j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~google-ai-overviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-google-ai-overviews-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/khadinakbar~google-ai-overviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-google-ai-overviews-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/khadinakbar~google-ai-overviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-google-ai-overviews-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": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search queries",
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "description": "List of Google search queries to check for AI Overviews (e.g., ['best CRM software 2026', 'how to scrape Google AI Overviews']). One record per query is returned. Max 50 queries per run. NOT a list of full Google URLs — pass plain text queries; the actor builds the SERP URL with countryCode/languageCode.",
            "items": {
              "type": "string"
            }
          },
          "targetDomain": {
            "title": "Brand domain to detect (optional)",
            "type": "string",
            "description": "Your brand domain to match against AIO source citations (e.g., 'apify.com', or comma-separated 'apify.com,docs.apify.com'). When set, output includes brandMatch.matched, position, citedUrl, matchCount. Leave empty to skip brand matching. NOT a full URL — pass bare domains only."
          },
          "countryCode": {
            "title": "Country code",
            "enum": [
              "us",
              "gb",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "br",
              "in",
              "au",
              "ca",
              "jp",
              "kr",
              "mx",
              "ar",
              "co",
              "pl",
              "ru",
              "tr",
              "ae",
              "sa",
              "za",
              "se",
              "no",
              "fi",
              "dk",
              "ch",
              "at",
              "be",
              "ie",
              "nz",
              "sg",
              "hk",
              "tw",
              "th",
              "id",
              "vn",
              "ph",
              "my",
              "il"
            ],
            "type": "string",
            "description": "Two-letter ISO 3166-1 alpha-2 country code for geo-targeting Google SERP (e.g., 'us', 'gb', 'de'). Affects which results and which AIO variant Google returns. Defaults to 'us'. NOT a country name — use ISO codes only.",
            "default": "us"
          },
          "languageCode": {
            "title": "Language code",
            "enum": [
              "en",
              "de",
              "es",
              "fr",
              "it",
              "nl",
              "pt",
              "ru",
              "ja",
              "ko",
              "zh",
              "ar",
              "hi",
              "tr",
              "pl",
              "sv",
              "no",
              "fi",
              "da",
              "el",
              "he",
              "th",
              "vi",
              "id",
              "ms",
              "cs"
            ],
            "type": "string",
            "description": "Two-letter ISO 639-1 language code for Google interface language (e.g., 'en', 'de', 'es'). Sets the hl= URL param. Defaults to 'en'. NOT a locale string like 'en-US' — use the bare language code.",
            "default": "en"
          },
          "device": {
            "title": "Device emulation",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Browser viewport to emulate when fetching the SERP. Google sometimes shows different AIO content for mobile vs desktop. Defaults to 'desktop'. NOT a specific phone model — only 'desktop' or 'mobile' accepted.",
            "default": "desktop"
          },
          "serpApiKey": {
            "title": "SerpApi key (BYOK fallback, optional)",
            "type": "string",
            "description": "Optional SerpApi.com key for hybrid fallback when the Camoufox scrape is blocked. Get one free at serpapi.com (100/mo free). When provided, failed queries are retried via SerpApi automatically. Leave empty to use Camoufox-only — most queries succeed. NOT a Google API key — must be a SerpApi.com key."
          },
          "maxRetries": {
            "title": "Max retries per query",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many times to retry a query that fails to load AIO or returns no answer container. Helps with intermittent rendering. Defaults to 2 (3 attempts total). NOT a global cap — applies per query.",
            "default": 2
          },
          "forceSerpapi": {
            "title": "Skip Camoufox, use SerpApi directly",
            "type": "boolean",
            "description": "Skip the Camoufox scrape attempt entirely and go straight to SerpApi (managed if you don't bring a key, BYOK otherwise). Saves ~7 seconds per query when you already know Google residential blocks. Defaults to false. NOT recommended for normal use — automatic circuit breaker handles persistent blocking.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy setup. Defaults to Apify residential (mandatory for Google scraping). Override only if you know what you're doing — datacenter proxies get blocked instantly by Google. NOT optional in practice.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}