{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Scraper — SERP, AI Overview, Ads & Operators",
    "description": "Scrape Google Search SERP — organic results, paid ads, related queries, People Also Ask, knowledge panels — with built-in anti-block defenses (AdsBot UA, udm=14, multi-selector parsing, dual-engine HTTP).",
    "version": "1.0",
    "x-build-id": "NaT2QZMCyvfLejNDY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~google-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-google-search-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/memo23~google-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-google-search-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/memo23~google-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-google-search-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",
            "type": "array",
            "description": "One or more search queries. Each query produces one or more SERP rows.",
            "items": {
              "type": "string"
            }
          },
          "resultsPerPage": {
            "title": "Results per page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many organic results per SERP page (Google's effective cap is 10 on most pages since Sept 2025).",
            "default": 10
          },
          "maxPagesPerQuery": {
            "title": "Max pages per query",
            "minimum": 1,
            "type": "integer",
            "description": "Paginate through this many SERP pages per query.",
            "default": 1
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "Two-letter country code (gl param). Affects which results Google considers locally relevant.",
            "default": "US"
          },
          "languageCode": {
            "title": "Language code",
            "type": "string",
            "description": "Two-letter language code (hl param). Controls the SERP UI language.",
            "default": "en"
          },
          "safeSearch": {
            "title": "Safe search",
            "enum": [
              "off",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "Safe search level.",
            "default": "off"
          },
          "includeAds": {
            "title": "Include paid ads",
            "type": "boolean",
            "description": "Parse and return sponsored results alongside organic.",
            "default": true
          },
          "includeRelated": {
            "title": "Include related queries",
            "type": "boolean",
            "description": "Include 'Related searches' and 'People also ask' boxes.",
            "default": true
          },
          "includeKnowledgePanel": {
            "title": "Include knowledge panel",
            "type": "boolean",
            "description": "Parse the right-rail knowledge panel if present.",
            "default": true
          },
          "includeAiOverview": {
            "title": "Include AI Overview (citations)",
            "type": "boolean",
            "description": "Detect the AI Overview block and extract its cited source links (great for GEO/AEO). Note: the generated prose is created client-side and is NOT available over the HTTP proxy — only detection + sources are returned. Requires appendUdm14 = false (udm=14 strips AI Overviews).",
            "default": true
          },
          "useAdsBotUA": {
            "title": "Use AdsBot user-agent (experimental)",
            "type": "boolean",
            "description": "Use AdsBot-Google UA to attempt to receive the legacy SERP layout. As of May 2026 Google serves a 'browser unsupported' page to this UA on most IPs — leave OFF unless you have a specific proxy where it works.",
            "default": false
          },
          "appendUdm14": {
            "title": "Force classic Web mode (udm=14)",
            "type": "boolean",
            "description": "Append &udm=14 to disable AI Overviews. Stacks with AdsBot UA for maximum parser stability.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "How many queries to process in parallel.",
            "default": 5
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "type": "integer",
            "description": "Retries per SERP page request when soft-blocked.",
            "default": 5
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify GOOGLE_SERP proxy group is strongly recommended for Google scraping.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "GOOGLE_SERP"
              ]
            }
          },
          "site": {
            "title": "Site",
            "type": "string",
            "description": "Limit results to one site, e.g. `example.com` (applies the `site:` operator). Takes precedence over 'Related to site'."
          },
          "relatedToSite": {
            "title": "Related to site",
            "type": "string",
            "description": "Find pages related to a site, e.g. `example.com` (applies the `related:` operator). Ignored if 'Site' is set."
          },
          "wordsInTitle": {
            "title": "Words in title",
            "type": "array",
            "description": "Each entry must appear in the page title (`intitle:`). Multi-word entries are auto-quoted.",
            "items": {
              "type": "string"
            }
          },
          "wordsInText": {
            "title": "Words in text",
            "type": "array",
            "description": "Each entry must appear in the page body text (`intext:`).",
            "items": {
              "type": "string"
            }
          },
          "wordsInUrl": {
            "title": "Words in URL",
            "type": "array",
            "description": "Each entry must appear in the page URL (`inurl:`).",
            "items": {
              "type": "string"
            }
          },
          "fileTypes": {
            "title": "File types",
            "type": "array",
            "description": "Restrict to file types, OR-combined (e.g. `pdf`, `docx`). Applies the `filetype:` operator.",
            "items": {
              "type": "string"
            }
          },
          "forceExactMatch": {
            "title": "Force exact match",
            "type": "boolean",
            "description": "Wrap the query in quotes for an exact-phrase match.",
            "default": false
          },
          "searchLanguage": {
            "title": "Results language",
            "type": "string",
            "description": "Restrict results to a language via the `lr` parameter, e.g. `de` or `lang_de`. Distinct from the `hl` interface language."
          },
          "locationUule": {
            "title": "Exact location (uule)",
            "type": "string",
            "description": "Google `uule` code for an exact location. Use a UULE generator to produce it."
          },
          "quickDateRange": {
            "title": "Quick date range",
            "type": "string",
            "description": "Relative recency filter (`tbs=qdr:`). Examples: `h` (past hour), `d10` (10 days), `w`, `m6`, `y1`. Wins over Before/After if both set."
          },
          "afterDate": {
            "title": "After date",
            "type": "string",
            "description": "Only results after this date. Absolute date `YYYY-MM-DD` or `MM/DD/YYYY`."
          },
          "beforeDate": {
            "title": "Before date",
            "type": "string",
            "description": "Only results before this date. Absolute date `YYYY-MM-DD` or `MM/DD/YYYY`."
          },
          "includeUnfilteredResults": {
            "title": "Include unfiltered results",
            "type": "boolean",
            "description": "Include the near-duplicate results Google normally omits (`filter=0`). Off by default for cleaner output.",
            "default": false
          },
          "saveHtml": {
            "title": "Save HTML to dataset",
            "type": "boolean",
            "description": "Attach the raw SERP HTML to each dataset row under `html`. Makes the dataset large — use for debugging.",
            "default": false
          },
          "saveHtmlToKeyValueStore": {
            "title": "Save HTML to key-value store",
            "type": "boolean",
            "description": "Save each SERP's raw HTML to the key-value store and add a `htmlSnapshotUrl` to the dataset row.",
            "default": false
          },
          "enrichEmails": {
            "title": "Enrich results with contact emails",
            "type": "boolean",
            "description": "Opt-in, best-effort lead enrichment: for the top business domains in each SERP, scrape the result's OWN site for contact emails and people. Adds `contactEmail` + `emailEnrichment` to those organic results. Skips non-business domains (search/social/Wikipedia/marketplaces). Best on business-intent queries (e.g. 'plumbers chicago', 'B2B SaaS vendors').",
            "default": false
          },
          "qualifyByPayment": {
            "title": "💳 Qualify by payment (flag businesses that take money online)",
            "type": "boolean",
            "description": "Requires \"Enrich with contact emails\". Scans each business's website — reusing the pages already fetched for email discovery, so no extra cost or time — for payment processors and e-commerce platforms (Stripe, Shopify, PayPal, Paddle, Lemon Squeezy, WooCommerce, Square, Chargebee and more). Adds takesPayments (is this a real paying business?), paymentProcessors (which stack), stripeLiveKey (the public key if exposed) and paymentConfidence. Turn raw contacts into monetization-qualified leads. No extra charge — included with each enriched company.",
            "default": false
          },
          "maxEnrichedDomainsPerPage": {
            "title": "Max enriched domains per page",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Cap how many unique business domains to enrich per SERP page (bounds cost/time). Only applies when 'Enrich results with contact emails' is on.",
            "default": 3
          },
          "perplexitySearch": {
            "title": "Add a Perplexity AI answer",
            "type": "boolean",
            "description": "Also fetch a Perplexity (Sonar) AI answer per query, attached to the page-1 row as `perplexity`. Bring your own Perplexity API key below — you are billed by Perplexity per request.",
            "default": false
          },
          "perplexityApiKey": {
            "title": "Perplexity API key",
            "type": "string",
            "description": "Your Perplexity API key (from docs.perplexity.ai). Required for the Perplexity answer; runs are billed to YOUR Perplexity account. Leave blank to disable."
          },
          "perplexitySearchRecency": {
            "title": "Perplexity recency filter",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Restrict Perplexity's web grounding to recent content."
          },
          "perplexityRelatedQuestions": {
            "title": "Perplexity related questions",
            "type": "boolean",
            "description": "Ask Perplexity to also return follow-up questions.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}