{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Results Scraper — SERP API",
    "description": "Google Search Results Scraper returns organic titles, real destination URLs and snippets through the Apify GOOGLE_SERP proxy. One row per accepted SERP page; failures go to diagnostics. Verified zero-result pages remain billable pages.",
    "version": "0.44",
    "x-build-id": "oGlCRHUiOsY8fsety"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/webdatatools~google-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-webdatatools-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/webdatatools~google-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-webdatatools-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/webdatatools~google-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-webdatatools-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": "Enter the Google search queries to scrape, e.g. apify web scraping. One dataset row is returned per accepted query/page. Verified zero-result pages remain billable; fetch, block, parsing and missing-destination failures are stored separately in diagnostics. Rows are saved as they finish; if the run timeout is near, the Actor stops early and still ends SUCCEEDED with the pages done so far.",
            "default": [
              "apify web scraping"
            ],
            "items": {
              "type": "string"
            }
          },
          "countryCode": {
            "title": "Country code (gl)",
            "type": "string",
            "description": "Enter the 2-letter country code Google should localise results for, e.g. us, gb, de. Sent as the gl parameter.",
            "default": "us"
          },
          "languageCode": {
            "title": "Language code (hl)",
            "type": "string",
            "description": "Enter the 2-letter interface language code, e.g. en, es, fr. Sent as the hl parameter and affects snippet language.",
            "default": "en"
          },
          "resultsPerPage": {
            "title": "Results per page",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "Sent to Google as num, e.g. 10. Google currently ignores it and returns about 10 organic results per page (a 9 Oct 2026 test with 100 gave 9), so use Max pages per query to get more results.",
            "default": 10
          },
          "maxPagesPerQuery": {
            "title": "Max pages per query",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Enter how many result pages to fetch per query, e.g. 1. Each extra page is the next ~10 results (start=10, 20, …) and a separate billed SERP page. Total pages = queries x this value. Google response and redirect waits vary; allow sufficient run timeout and inspect OUTPUT for partial results before retrying. Effective concurrency is capped at 3.",
            "default": 1
          },
          "dateRange": {
            "title": "Date range",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Optional. Only results from the past hour, day, week, month or year (Google's Tools > Any time filter, sent as tbs=qdr:)."
          },
          "site": {
            "title": "Only this site",
            "type": "string",
            "description": "Optional. Restrict every query to one domain or TLD, e.g. reddit.com or gov — adds site: to each query."
          },
          "fileType": {
            "title": "File type",
            "type": "string",
            "description": "Optional. Only documents of this type, e.g. pdf, docx, xlsx — adds filetype: to each query."
          },
          "exactPhrase": {
            "title": "Exact phrase",
            "type": "string",
            "description": "Optional. A phrase every result must contain word for word — added to each query in quotes."
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Choose desktop or mobile to control which User-Agent is sent — Google sometimes shows slightly different snippets/layout per device.",
            "default": "desktop"
          },
          "includePeopleAlsoAsk": {
            "title": "Include People Also Ask",
            "type": "boolean",
            "description": "Leave on to parse the People Also Ask box. The basic-HTML Google page this Actor fetches (for real result URLs) rarely contains it, so peopleAlsoAsk is usually empty; it is filled whenever Google does render the box. Does not change the price.",
            "default": true
          },
          "includeRelatedSearches": {
            "title": "Include related searches",
            "type": "boolean",
            "description": "Leave on to extract related-search suggestions from Google's basic and modern widgets in the fetched HTML. Labels are deduplicated in page order; navigation and pagination are excluded. Google may omit suggestions. No extra source request or separate result charge.",
            "default": true
          },
          "safeSearch": {
            "title": "SafeSearch",
            "type": "boolean",
            "description": "Turn this on to request Google's SafeSearch filtering (adds safe=active to the request).",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "SERP pages to fetch in parallel, e.g. 3. Effective concurrency is capped at 3; older inputs up to 10 remain accepted. After two rejected pages, queued pages are skipped while in-flight pages finish. Inspect OUTPUT for partial results before retrying.",
            "default": 3
          },
          "debugHtml": {
            "title": "Save raw page HTML (debug)",
            "type": "boolean",
            "description": "Turn on only when reporting a parsing problem: saves every fetched Google page as PAGE_<n>.html in the run's key-value store. Does not change the price or the results.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}