{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Scraper — SERP, AI Overview, Ads",
    "description": "Scrape Google Search (SERP) results at scale: organic, paid ads, AI Overview, knowledge graph, People Also Ask, local pack, news, related searches. Supports desktop / mobile, 200+ domains, location & language targeting. No CAPTCHAs — handled by ScrapeBadger's residential proxy + browser farm.",
    "version": "1.2",
    "x-build-id": "SXpRHEZ6OIA6pF9XW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrape.badger~google-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrape.badger-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/scrape.badger~google-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrape.badger-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/scrape.badger~google-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrape.badger-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": [
          "q"
        ],
        "properties": {
          "q": {
            "title": "Search query",
            "type": "string",
            "description": "Google search terms. Supports operators: <b>site:</b>, <b>intitle:</b>, <b>inurl:</b>, <b>\"quoted phrase\"</b>, <b>-exclude</b>. Example: <b>site:reddit.com best vpn 2026</b>"
          },
          "mode": {
            "title": "Response mode",
            "enum": [
              "full",
              "fast"
            ],
            "type": "string",
            "description": "<b>full</b> (default): every SERP block — organic, ads, knowledge graph, People Also Ask, AI Overview, local pack, news, shopping, perspectives, forums, short videos, related searches, videos. <b>fast</b> (~40% faster, half price): lite endpoint returning only organic + related searches.",
            "default": "full"
          },
          "gl": {
            "title": "Country",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code (lowercase). Controls which country's Google results are returned. Example: <b>us</b>, <b>gb</b>, <b>de</b>.",
            "default": "us"
          },
          "hl": {
            "title": "Language",
            "type": "string",
            "description": "ISO 639-1 language code. Example: <b>en</b>, <b>es</b>, <b>de</b>.",
            "default": "en"
          },
          "domain": {
            "title": "Google domain",
            "type": "string",
            "description": "Google domain country hint; requests use google.com. Explicit gl takes precedence.",
            "default": "google.com"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile",
              "tablet",
              "iphone",
              "android"
            ],
            "type": "string",
            "description": "Device profile; user_agent overrides the default User-Agent.",
            "default": "desktop"
          },
          "location": {
            "title": "City location",
            "type": "string",
            "description": "Canonical Google location, e.g. New York,New York,United States (or New York, USA). Do not combine with uule or lat/lon."
          },
          "num": {
            "title": "Results per page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of organic results to request per page (1-100).",
            "default": 10
          },
          "start": {
            "title": "Start offset",
            "minimum": 0,
            "type": "integer",
            "description": "Page offset: 0 = page 1, 10 = page 2, 20 = page 3, etc.",
            "default": 0
          },
          "max_pages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many pages to fetch. Each page is a separate API call (costs N credits).",
            "default": 1
          },
          "safe": {
            "title": "Safe search",
            "enum": [
              "off",
              "active"
            ],
            "type": "string",
            "description": "Content filter level.",
            "default": "off"
          },
          "tbs": {
            "title": "Time filter",
            "type": "string",
            "description": "Time range: <b>qdr:h</b> (past hour), <b>qdr:d</b> (24h), <b>qdr:w</b> (week), <b>qdr:m</b> (month), <b>qdr:y</b> (year). Optional."
          },
          "lr": {
            "title": "Language restrict",
            "type": "string",
            "description": "Restrict results to a specific language. Example: <b>lang_en</b>. Optional."
          },
          "nfpr": {
            "title": "Disable autocorrect",
            "type": "boolean",
            "description": "When true, Google will not auto-correct the query (\"Did you mean…?\").",
            "default": false
          },
          "ai_overview": {
            "title": "Chase AI Overview",
            "type": "boolean",
            "description": "When true, chase Google's deferred AI Overview page_token with a follow-up fetch. Adds ~1s when present; no-op otherwise. Forces mode=full.",
            "default": false
          },
          "expand_related_questions": {
            "title": "People Also Ask answers",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "Open the People Also Ask questions and return their answers: <b>N</b> opens the first N questions (Google usually shows four), <b>0</b> or empty opens none. Each answered question in <b>related_questions</b> gets <b>text_blocks</b> and <b>references</b>, adds about a second, and is charged as one more full SERP page; a question whose answer does not come back is free. Forces mode=full."
          },
          "uule": {
            "title": "Uule",
            "type": "string",
            "description": "Encoded Google location."
          },
          "filter": {
            "title": "Filter",
            "type": "number",
            "description": "Omitted-results filter: 0 or 1."
          },
          "output": {
            "title": "Output",
            "type": "string",
            "description": "json or html."
          },
          "user_agent": {
            "title": "User agent",
            "type": "string",
            "description": "Custom User-Agent."
          },
          "cr": {
            "title": "Cr",
            "type": "string",
            "description": "Country restrict."
          },
          "ludocid": {
            "title": "Ludocid",
            "type": "string",
            "description": "Place CID."
          },
          "lsig": {
            "title": "Lsig",
            "type": "string",
            "description": "Map view ID."
          },
          "kgmid": {
            "title": "Kgmid",
            "type": "string",
            "description": "Knowledge Graph entity ID."
          },
          "si": {
            "title": "Si",
            "type": "string",
            "description": "Cached Google parameters."
          },
          "ibp": {
            "title": "Ibp",
            "type": "string",
            "description": "Layout control."
          },
          "uds": {
            "title": "Uds",
            "type": "string",
            "description": "Google filter string."
          },
          "google_domain": {
            "title": "Google domain",
            "type": "string",
            "description": "Alias for domain; Google requests use google.com with country targeting."
          },
          "lat": {
            "title": "Lat",
            "type": "number",
            "description": "Latitude; supply together with lon instead of location or uule."
          },
          "lon": {
            "title": "Lon",
            "type": "number",
            "description": "Longitude; supply together with lat."
          },
          "radius": {
            "title": "Radius",
            "type": "number",
            "description": "Location accuracy in meters; requires lat/lon or a named city with a known center."
          },
          "color_scheme": {
            "title": "Color scheme",
            "type": "string",
            "description": "Google color scheme."
          },
          "tbm": {
            "title": "Tbm",
            "type": "string",
            "description": "Google search type. Use output=html for verticals; dedicated APIs provide parsed vertical results."
          },
          "udm": {
            "title": "Udm",
            "type": "string",
            "description": "Google result filter: 14 web, 18 forums. Other verticals require output=html."
          },
          "no_cache": {
            "title": "No cache",
            "type": "boolean",
            "description": "Bypass result caches and request a fresh Google fetch."
          },
          "as_dt": {
            "title": "As dt",
            "type": "string",
            "description": "Site restriction mode: i includes, e excludes as_sitesearch."
          },
          "as_epq": {
            "title": "As epq",
            "type": "string",
            "description": "Exact phrase."
          },
          "as_eq": {
            "title": "As eq",
            "type": "string",
            "description": "Words to exclude."
          },
          "as_lq": {
            "title": "As lq",
            "type": "string",
            "description": "Find pages linking to this URL; availability depends on Google."
          },
          "as_nlo": {
            "title": "As nlo",
            "type": "string",
            "description": "Numeric range minimum."
          },
          "as_nhi": {
            "title": "As nhi",
            "type": "string",
            "description": "Numeric range maximum."
          },
          "as_oq": {
            "title": "As oq",
            "type": "string",
            "description": "Match any of these words."
          },
          "as_q": {
            "title": "As q",
            "type": "string",
            "description": "Additional query words."
          },
          "as_qdr": {
            "title": "As qdr",
            "type": "string",
            "description": "Time range, such as d, w, m or y1."
          },
          "as_rq": {
            "title": "As rq",
            "type": "string",
            "description": "Related URL; availability depends on Google."
          },
          "as_sitesearch": {
            "title": "As sitesearch",
            "type": "string",
            "description": "Restrict results to a site."
          },
          "oq": {
            "title": "oq",
            "type": "string",
            "description": "Original query sent to Google. Defaults to q; an empty string omits it."
          },
          "sourceid": {
            "title": "sourceid",
            "type": "string",
            "description": "Google source identifier. Defaults to chrome; an empty string omits it."
          },
          "ie": {
            "title": "ie",
            "type": "string",
            "description": "Google input encoding hint. Defaults to UTF-8; an empty string omits it."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}