{
  "openapi": "3.0.1",
  "info": {
    "title": "Google SERP Scraper — Full Page + AI Overviews",
    "description": "Get every Google SERP block in one structured record per query: organic results, ads, AI Overviews with cited sources, People Also Ask, Featured Snippet, Knowledge Panel, Local Pack, videos and images. 40 countries, desktop or mobile, with no API key or proxy setup needed.",
    "version": "0.2",
    "x-build-id": "f39WQbAOLrIlcDiLL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~google-serp-all-in-one-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-google-serp-all-in-one-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-serp-all-in-one-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-google-serp-all-in-one-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-serp-all-in-one-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-google-serp-all-in-one-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",
          "countryCode"
        ],
        "properties": {
          "queries": {
            "title": "Search queries",
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "description": "Free-text search queries to run on Google (e.g. 'best running shoes 2026', 'apify google scraper'). Each query produces ONE dataset record containing all extracted SERP features. Defaults to 3 demo queries. NOT raw Google URLs — for URL-based scraping use the scrape-google-serp actor. Free Apify plan runs return up to 25 results per run.",
            "items": {
              "type": "string"
            }
          },
          "countryCode": {
            "title": "Country (gl)",
            "enum": [
              "us",
              "gb",
              "ca",
              "au",
              "de",
              "fr",
              "es",
              "it",
              "nl",
              "br",
              "mx",
              "ar",
              "in",
              "jp",
              "kr",
              "sg",
              "ae",
              "sa",
              "za",
              "ng",
              "pl",
              "se",
              "no",
              "dk",
              "fi",
              "ie",
              "be",
              "ch",
              "at",
              "pt",
              "gr",
              "tr",
              "ph",
              "id",
              "my",
              "th",
              "vn",
              "il",
              "cl",
              "co",
              "pe"
            ],
            "type": "string",
            "description": "Two-letter ISO country code that controls Google's 'gl' parameter — affects results, ads, Local Pack businesses, and Knowledge Panel localization (e.g. 'us' for United States, 'gb' for United Kingdom). Defaults to 'us'. Must be lowercase 2-letter ISO 3166-1 alpha-2.",
            "default": "us"
          },
          "languageCode": {
            "title": "Language (hl)",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "nl",
              "ru",
              "ja",
              "ko",
              "zh",
              "ar",
              "hi",
              "tr",
              "pl",
              "sv",
              "no",
              "da",
              "fi"
            ],
            "type": "string",
            "description": "Two-letter ISO language code for Google's 'hl' parameter — controls interface and result language (e.g. 'en', 'es', 'de'). Defaults to 'en'. Different from countryCode: you can run an English search in Germany.",
            "default": "en"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Device mode for Google — 'desktop' returns desktop SERP layout (more features, denser ads), 'mobile' returns mobile SERP (different ranking, fewer ads, more PAA depth). Defaults to 'desktop'.",
            "default": "desktop"
          },
          "extractFeatures": {
            "title": "Features to extract",
            "uniqueItems": true,
            "type": "array",
            "description": "Pick which SERP feature blocks to include in each record. Defaults to ALL. Trimming this does not change pricing — every page is charged the same regardless of which features are returned. Use to keep dataset rows small for AI agents with tight token budgets.",
            "items": {
              "type": "string",
              "enum": [
                "organic",
                "ads",
                "aiOverview",
                "peopleAlsoAsk",
                "featuredSnippet",
                "knowledgePanel",
                "localPack",
                "relatedSearches",
                "videos",
                "images",
                "shoppingResults",
                "topStories"
              ]
            },
            "default": [
              "organic",
              "ads",
              "aiOverview",
              "peopleAlsoAsk",
              "featuredSnippet",
              "knowledgePanel",
              "localPack",
              "relatedSearches",
              "videos",
              "images"
            ]
          },
          "maxOrganicResults": {
            "title": "Max organic results per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum organic result links to return per query (up to 100). Defaults to 10. Google may return fewer links than requested. Each query is billed as one SERP page event regardless of this value.",
            "default": 10
          },
          "maxRetries": {
            "title": "Max retries per query",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum retry attempts per failed query before falling back to managed search or marking as failed. Defaults to 3. Higher values increase proxy cost on stubborn captchas.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy configuration. Defaults to Apify Residential (RESIDENTIAL group) which is required for Google SERP — datacenter IPs trigger immediate captcha. Country auto-aligned with countryCode.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}