{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Results Scraper",
    "description": "Scrape Google Search Engine Results Pages (SERPs). Select the country or language and extract organic and paid results, AI Mode, AI overviews, ads, queries, People Also Ask, prices, reviews, like a Google SERP API.",
    "version": "1.0",
    "x-build-id": "lSeqgSCemmh2gI6iF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapeai~apify-google-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapeai-apify-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/scrapeai~apify-google-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapeai-apify-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/scrapeai~apify-google-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapeai-apify-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 term(s)",
            "type": "string",
            "description": "Use regular search words or enter Google Search URLs. You can also apply advanced Google search techniques, such as AI site:twitter.com or javascript OR python."
          },
          "maxPagesPerQuery": {
            "title": "Max pages per search",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of pages to scrape per search query. Each page contains approximately 10 results.",
            "default": 1
          },
          "aiOverview": {
            "title": "Add-on: Scrape full AI Overview",
            "type": "object",
            "description": "Enable extraction of AI Overview. Ensures the full AI Overview is extracted when one is present.",
            "properties": {
              "scrapeFullAiOverview": {
                "title": "Scrape full AI Overview",
                "type": "boolean",
                "description": "Ensures the full AI Overview is extracted when present on search results page.",
                "editor": "checkbox",
                "default": false
              }
            }
          },
          "aiModeSearch": {
            "title": "Add-on: Google AI Mode",
            "type": "object",
            "description": "Scrapes results from Google AI Mode - Google's dedicated AI-powered search interface.",
            "properties": {
              "enableAiMode": {
                "title": "Enable Google AI Mode",
                "type": "boolean",
                "description": "Enables Google AI Mode search response extraction.",
                "editor": "checkbox",
                "default": false
              }
            }
          },
          "geminiSearch": {
            "title": "Add-on: Gemini search",
            "type": "object",
            "description": "Fetches an AI answer from Google Gemini.",
            "properties": {
              "enableGemini": {
                "title": "Enable Gemini search",
                "type": "boolean",
                "description": "Enables Google Gemini AI answer extraction.",
                "editor": "checkbox",
                "default": false
              }
            }
          },
          "perplexitySearch": {
            "title": "Add-on: Perplexity AI search",
            "type": "object",
            "description": "Enable Perplexity to retrieve AI-generated answers using Sonar model.",
            "properties": {
              "enablePerplexity": {
                "title": "Enable Perplexity search",
                "type": "boolean",
                "description": "Enables Perplexity AI answer extraction.",
                "editor": "checkbox",
                "default": false
              },
              "returnImages": {
                "title": "Return images",
                "type": "boolean",
                "description": "Includes generated images from Perplexity AI answers.",
                "editor": "checkbox",
                "default": false
              },
              "returnRelatedQuestions": {
                "title": "Return related questions",
                "type": "boolean",
                "description": "Includes follow-up related questions from Perplexity.",
                "editor": "checkbox",
                "default": false
              }
            }
          },
          "chatGptSearch": {
            "title": "Add-on: ChatGPT search",
            "type": "object",
            "description": "Enable ChatGPT to retrieve AI-generated answers powered by OpenAI.",
            "properties": {
              "enableChatGpt": {
                "title": "Enable ChatGPT search",
                "type": "boolean",
                "description": "Enables ChatGPT answer extraction.",
                "editor": "checkbox",
                "default": false
              }
            }
          },
          "copilotSearch": {
            "title": "Add-on: Microsoft Copilot search",
            "type": "object",
            "description": "Enable Microsoft Copilot to retrieve AI-generated answers.",
            "properties": {
              "enableCopilot": {
                "title": "Enable Copilot search",
                "type": "boolean",
                "description": "Enables Microsoft Copilot search answer extraction.",
                "editor": "checkbox",
                "default": false
              }
            }
          },
          "maximumLeadsEnrichmentRecords": {
            "title": "Add-on: Extract business leads information - Maximum leads per domain",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of lead records to scrape per domain found.",
            "default": 0
          },
          "leadsEnrichmentDepartments": {
            "title": "Leads departments selection",
            "type": "array",
            "description": "Filter to include only specific departments (e.g. marketing, sales).",
            "items": {
              "type": "string"
            }
          },
          "verifyLeadsEnrichmentEmails": {
            "title": "Add-on: Email verification",
            "type": "boolean",
            "description": "Verifies the email address of each lead extracted during business leads enrichment.",
            "default": false
          },
          "linkProspecting": {
            "title": "Add-on: Link prospecting tool",
            "type": "object",
            "description": "Find websites that cover your topic but don't yet mention your brand.",
            "properties": {
              "brandName": {
                "title": "Brand name",
                "type": "string",
                "description": "Brand name to check and filter for link prospecting.",
                "editor": "textfield"
              }
            }
          },
          "websiteContentScraper": {
            "title": "Add-on: Website content scraping",
            "type": "object",
            "description": "Scrapes each organic result page and attaches content to result item.",
            "properties": {
              "enable": {
                "title": "Enable website content scraping",
                "type": "boolean",
                "description": "Enables scraping content from organic search result links.",
                "editor": "checkbox",
                "default": false
              }
            }
          },
          "focusOnPaidAds": {
            "title": "Add-on: Enable paid results (ads) extraction",
            "type": "boolean",
            "description": "Enable extraction of paid results (Google Ads) with ad-specialized retries.",
            "default": false
          },
          "countryCode": {
            "title": "Country",
            "type": "string",
            "description": "Specifies the country used for search and Google Search domain (e.g. us, es, de, uk).",
            "default": "us"
          },
          "searchLanguage": {
            "title": "Search language",
            "type": "string",
            "description": "Restricts search results to pages in a specific language (passed as lr URL parameter).",
            "default": "en"
          },
          "languageCode": {
            "title": "Interface Language",
            "type": "string",
            "description": "Language of the Google Search interface (passed as hl URL parameter).",
            "default": "en"
          },
          "locationUule": {
            "title": "Exact location (Google UULE parameter)",
            "type": "string",
            "description": "The code for exact location for Google search (passed as uule URL parameter)."
          },
          "forceExactMatch": {
            "title": "Force exact match",
            "type": "boolean",
            "description": "Searches for the exact phrase in query by wrapping in quotes.",
            "default": false
          },
          "site": {
            "title": "Site",
            "type": "string",
            "description": "Limits search to a specific site (e.g. site:example.com)."
          },
          "relatedToSite": {
            "title": "Related to site",
            "type": "string",
            "description": "Filters pages related to a specific site (e.g. related:example.com)."
          },
          "wordsInTitle": {
            "title": "Words in title",
            "type": "array",
            "description": "Filters pages with specific words in title using intitle: operator.",
            "items": {
              "type": "string"
            }
          },
          "wordsInText": {
            "title": "Words in text",
            "type": "array",
            "description": "Filters pages with specific words in text using intext: operator.",
            "items": {
              "type": "string"
            }
          },
          "wordsInUrl": {
            "title": "Words in URL",
            "type": "array",
            "description": "Filters pages with specific words in URL using inurl: operator.",
            "items": {
              "type": "string"
            }
          },
          "quickDateRange": {
            "title": "Quick date range",
            "type": "string",
            "description": "Filters results from specific date range (e.g. d10, m6, y1)."
          },
          "beforeDate": {
            "title": "Before date",
            "type": "string",
            "description": "Filters results from before specified date (e.g. 2024-12-31)."
          },
          "afterDate": {
            "title": "After date",
            "type": "string",
            "description": "Filters results from after specified date (e.g. 2024-01-01)."
          },
          "fileTypes": {
            "title": "File types",
            "type": "array",
            "description": "Filters results of specific file types using filetype: operator (e.g. pdf, doc).",
            "items": {
              "type": "string"
            }
          },
          "mobileResults": {
            "title": "Mobile results",
            "type": "boolean",
            "description": "Return results for mobile version of Google search.",
            "default": false
          },
          "includeUnfilteredResults": {
            "title": "Unfiltered results",
            "type": "boolean",
            "description": "Include lower quality results normally filtered out.",
            "default": false
          },
          "saveHtml": {
            "title": "Save HTML to dataset",
            "type": "boolean",
            "description": "Store HTML of search pages in dataset output.",
            "default": false
          },
          "saveHtmlToKeyValueStore": {
            "title": "Save HTML to key-value store",
            "type": "boolean",
            "description": "Store HTML of search pages in Key-Value store.",
            "default": true
          },
          "includeIcons": {
            "title": "Include icon image data (base64)",
            "type": "boolean",
            "description": "Include Base64-encoded icon image data if found.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Residential proxies recommended."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}