{
  "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.0",
    "x-build-id": "84K1jvOVT6QUNTzVT"
  },
  "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, 2 credits): every SERP block — organic, ads, knowledge graph, People Also Ask, AI Overview, local pack, news, related searches, videos. <b>fast</b> (1 credit, ~40% faster): 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 to hit. Example: <b>google.com</b>, <b>google.co.uk</b>, <b>google.de</b>.",
            "default": "google.com"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Browser profile: <b>desktop</b> (default) or <b>mobile</b>.",
            "default": "desktop"
          },
          "location": {
            "title": "City location",
            "type": "string",
            "description": "City-level geo-targeting. Example: <b>New York, NY</b>. Optional."
          },
          "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",
              "medium",
              "high"
            ],
            "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
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}