{
  "openapi": "3.0.1",
  "info": {
    "title": "Google SERP Scraper — Organic, AI Overviews & Leads",
    "description": "Scrape Google Search without an API key: ranked organic results, People Also Ask, related searches, shopping, knowledge panel and local pack, plus the AI Overview with every cited source resolved to a domain and citation index.",
    "version": "0.0",
    "x-build-id": "acp8HuTNLvz7tYJpw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/brilliant_gum~google-serp-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-brilliant_gum-google-serp-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/brilliant_gum~google-serp-scraper/runs": {
      "post": {
        "operationId": "runs-sync-brilliant_gum-google-serp-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/brilliant_gum~google-serp-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-brilliant_gum-google-serp-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 or Google URLs",
            "type": "array",
            "description": "Search terms OR raw Google search URLs. A full https://www.google.com/search?q=... URL is used verbatim (missing params are filled in).",
            "default": [
              "best running shoes 2026"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerQuery": {
            "title": "Max organic results per page (num)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Target number of organic results per SERP page (Google 'num'). Note: Google deprecated num=100 in Sep 2025; values <= ~20 are reliable. Alias: num.",
            "default": 10
          },
          "maxPagesPerQuery": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many SERP pages to paginate per query.",
            "default": 1
          },
          "includeUnfilteredResults": {
            "title": "Include unfiltered results",
            "type": "boolean",
            "description": "Append &filter=0 to include omitted / near-duplicate results.",
            "default": false
          },
          "countryCode": {
            "title": "Country (gl)",
            "type": "string",
            "description": "Country of the search (Google 'gl'). Alias: gl.",
            "default": "us"
          },
          "languageCode": {
            "title": "Language (hl)",
            "type": "string",
            "description": "Interface / results language (Google 'hl'). Alias: hl.",
            "default": "en"
          },
          "searchLanguage": {
            "title": "Restrict results to language (lr)",
            "type": "string",
            "description": "Google 'lr', e.g. lang_en."
          },
          "locationUule": {
            "title": "Pre-computed location string",
            "type": "string",
            "description": "Pre-computed canonical location string, for advanced users. Overrides locationName."
          },
          "locationName": {
            "title": "Location name",
            "type": "string",
            "description": "Human location, e.g. 'New York,New York,United States'. Encoded for you automatically."
          },
          "googleDomain": {
            "title": "Google domain",
            "type": "string",
            "description": "Google host to query, e.g. google.com or google.co.uk.",
            "default": "google.com"
          },
          "resultLanguage": {
            "title": "Result country restrict (cr)",
            "type": "string",
            "description": "Google 'cr', e.g. countryUS."
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Device layout / header fingerprint.",
            "default": "desktop"
          },
          "safeSearch": {
            "title": "SafeSearch",
            "enum": [
              "off",
              "active",
              "nfpr"
            ],
            "type": "string",
            "description": "off | active | nfpr (nfpr disables spelling auto-correction, &nfpr=1).",
            "default": "off"
          },
          "quickDateRange": {
            "title": "Quick date range",
            "enum": [
              "",
              "h",
              "d",
              "w",
              "m",
              "y"
            ],
            "type": "string",
            "description": "Recency filter -> tbs=qdr:*.",
            "default": ""
          },
          "beforeDate": {
            "title": "Before date",
            "type": "string",
            "description": "Upper bound YYYY-MM-DD (tbs cdr cd_max)."
          },
          "afterDate": {
            "title": "After date",
            "type": "string",
            "description": "Lower bound YYYY-MM-DD (tbs cdr cd_min)."
          },
          "tbs": {
            "title": "Raw tbs",
            "type": "string",
            "description": "Raw tbs passthrough (overrides quickDateRange / before / after)."
          },
          "forceExactMatch": {
            "title": "Force exact match",
            "type": "boolean",
            "description": "Wrap the whole query in quotes.",
            "default": false
          },
          "site": {
            "title": "site:",
            "type": "string",
            "description": "Restrict to a site (site: operator)."
          },
          "relatedToSite": {
            "title": "related:",
            "type": "string",
            "description": "related: operator."
          },
          "wordsInTitle": {
            "title": "Words in title",
            "type": "string",
            "description": "intitle: / allintitle: operator."
          },
          "wordsInText": {
            "title": "Words in text",
            "type": "string",
            "description": "intext: operator."
          },
          "wordsInUrl": {
            "title": "Words in URL",
            "type": "string",
            "description": "inurl: operator."
          },
          "fileTypes": {
            "title": "File types",
            "type": "string",
            "description": "filetype: operator. Comma list -> OR group."
          },
          "excludeWords": {
            "title": "Exclude words",
            "type": "string",
            "description": "Space/comma list; each term is prefixed with '-'."
          },
          "includeOrganic": {
            "title": "Include organic results",
            "type": "boolean",
            "description": "Include organic search results in the output.",
            "default": true
          },
          "includeAds": {
            "title": "Include ads",
            "type": "boolean",
            "description": "Include paid ad results (when Google serves them).",
            "default": false
          },
          "includePeopleAlsoAsk": {
            "title": "Include People Also Ask",
            "type": "boolean",
            "description": "Include the People Also Ask questions block.",
            "default": false
          },
          "includeRelatedSearches": {
            "title": "Include related searches",
            "type": "boolean",
            "description": "Include the related searches shown at the bottom of the page.",
            "default": false
          },
          "includeFeaturedSnippet": {
            "title": "Include featured snippet",
            "type": "boolean",
            "description": "Include the featured snippet (answer box) when present.",
            "default": false
          },
          "includeKnowledgePanel": {
            "title": "Include knowledge panel",
            "type": "boolean",
            "description": "Include the knowledge panel (entity card) when present.",
            "default": false
          },
          "includeLocalPack": {
            "title": "Include local pack",
            "type": "boolean",
            "description": "Include the local pack (map business results) when present.",
            "default": false
          },
          "includeShopping": {
            "title": "Include shopping",
            "type": "boolean",
            "description": "Include shopping / popular product results when present.",
            "default": false
          },
          "includeAiOverview": {
            "title": "Include AI Overview",
            "type": "boolean",
            "description": "Parse the AI Overview block (text + source domains + citation index). Opt-in add-on.",
            "default": true
          },
          "includeAiMode": {
            "title": "Include AI Mode",
            "type": "boolean",
            "description": "Attempt to capture AI Mode (usually requires JS rendering).",
            "default": false
          },
          "aiOverviewMode": {
            "title": "AI Overview capture mode",
            "enum": [
              "http",
              "render"
            ],
            "type": "string",
            "description": "How to capture the AI Overview. 'http' (cheap default) parses the AIO from the search HTML — fast, but Google often defers the AIO behind a JS token, so it is captured only opportunistically (captureType async_pending / not_present). 'render' keeps the cheap HTTP pass for organic results and, whenever HTTP did NOT already return a full AIO, escalates that query to a real headless Chromium (also over the default proxy) that runs Google's JS to reliably render/expand the AI Overview (captureType 'rendered'). Render is slower and uses more CPU/memory. Requires the Playwright browser image.",
            "default": "http"
          },
          "includeWebsiteContent": {
            "title": "Scrape organic page content",
            "type": "boolean",
            "description": "Opt-in: fetch each organic result URL and extract title, meta description and page text. NOTE: with the default proxy setting the result URL is the site ORIGIN only (deep paths are encrypted), so content is the landing/home page. Fetched directly (the default proxy serves only Google).",
            "default": false
          },
          "websiteContentMaxPages": {
            "title": "Max organic pages to scrape content from",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Cap on how many organic URLs per SERP page are fetched when 'Scrape organic page content' is on.",
            "default": 10
          },
          "enrichLeads": {
            "title": "Enrich leads from result domains",
            "type": "boolean",
            "description": "Opt-in lead enrichment. After organic results are gathered, the top result domains are crawled for contacts — named people from team/about pages plus emails, phones and socials that the site publishes. `email` is filled only from an address found on the site; when none exists, a name-derived candidate appears in `emailGuess`, marked as an unverified guess.",
            "default": false
          },
          "maximumLeadsEnrichmentRecords": {
            "title": "Max leads per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on the number of leads returned per query. Also bounds how many of the top organic domains are crawled.",
            "default": 5
          },
          "leadsEnrichmentDepartments": {
            "title": "Lead departments (filter)",
            "type": "array",
            "description": "Optional. Keep only named people whose inferred department is in this list. Leave empty to keep all.",
            "items": {
              "type": "string",
              "enum": [
                "executive",
                "engineering",
                "product",
                "sales",
                "marketing",
                "finance",
                "hr",
                "operations",
                "legal",
                "it"
              ],
              "enumTitles": [
                "Executive",
                "Engineering",
                "Product",
                "Sales",
                "Marketing",
                "Finance",
                "HR",
                "Operations",
                "Legal",
                "IT"
              ]
            },
            "default": []
          },
          "verifyLeadsEnrichmentEmails": {
            "title": "Verify lead emails",
            "type": "boolean",
            "description": "Check each published work email. On the Apify platform outbound port 25 is filtered, so the SMTP handshake cannot run and this falls back to an MX record check: it confirms the domain accepts mail, not that the address exists (emailStatus stays \"unknown\"). Addresses are never guessed from a person's name — only ones published on the site are returned.",
            "default": true
          },
          "linkProspecting": {
            "title": "Link prospecting",
            "type": "boolean",
            "description": "Also emit a flat outreach list (one row per crawled domain: website, contact emails, phones, socials, named-contact count) for link-building / prospecting. Attached under enrichment.linkProspects and mirrored into a 'link-prospects' dataset.",
            "default": false
          },
          "leadsEnrichmentPhones": {
            "title": "Collect phone numbers (leads)",
            "type": "boolean",
            "description": "Harvest phone numbers during the contact crawl (attached to leads / link-prospects).",
            "default": false
          },
          "leadsEnrichmentMaxPagesPerDomain": {
            "title": "Max pages per domain (leads crawl)",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "How many pages to crawl on each company domain while looking for contacts. Needs to be deep enough to reach team/about/leadership/contact pages where people and emails live.",
            "default": 15
          },
          "geminiSearch": {
            "title": "Also query Google Gemini (BYO key)",
            "type": "boolean",
            "description": "Add a geminiResult (answer + cited sources) via the Gemini API with Google Search grounding. Requires geminiApiKey (or GEMINI_API_KEY env). Emits a 'skipped, needs key' record when the key is missing.",
            "default": false
          },
          "perplexitySearch": {
            "title": "Also query Perplexity (BYO key)",
            "type": "boolean",
            "description": "Add a perplexityResult via the Perplexity Sonar API. Requires perplexityApiKey (or PERPLEXITY_API_KEY env).",
            "default": false
          },
          "chatGptSearch": {
            "title": "Also query ChatGPT / OpenAI (BYO key)",
            "type": "boolean",
            "description": "Add a chatGptResult via the OpenAI Responses API with web_search. Requires openaiApiKey (or OPENAI_API_KEY env).",
            "default": false
          },
          "copilotSearch": {
            "title": "Also query Microsoft Copilot",
            "type": "boolean",
            "description": "Add a copilotResult. Microsoft Copilot has no public bring-your-own-key answer API, so this always emits an honest 'skipped / unsupported' record.",
            "default": false
          },
          "geminiApiKey": {
            "title": "Gemini API key",
            "type": "string",
            "description": "Google AI (Gemini) API key for geminiSearch. Kept secret; falls back to the GEMINI_API_KEY env var."
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Perplexity API key for perplexitySearch. Kept secret; falls back to the PERPLEXITY_API_KEY env var."
          },
          "openaiApiKey": {
            "title": "OpenAI API key",
            "type": "string",
            "description": "OpenAI API key for chatGptSearch. Kept secret; falls back to the OPENAI_API_KEY env var."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy. Leave the default in place — it is the configuration this Actor is tuned for, and Google refuses most other networks on the search endpoint."
          },
          "saveHtmlToKVS": {
            "title": "Save raw HTML to KVS",
            "type": "boolean",
            "description": "Persist raw SERP HTML to the key-value store (debugging / AIO re-parsing).",
            "default": false
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "fast",
              "full"
            ],
            "type": "string",
            "description": "fast = organic only (cheapest); full = all enabled blocks incl. AIO.",
            "default": "full"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}