{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Result Intelligence",
    "description": "Collect Google Search results for keywords and turn them into clean datasets with rankings, titles, URLs, domains, ads, People Also Ask, related searches, AI Overview data, and optional domain-level leads.",
    "version": "1.0",
    "x-build-id": "1qFzwQ9nUSDNw4rxh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/qaseemiqbal~google-search-result-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-qaseemiqbal-google-search-result-intelligence",
        "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/qaseemiqbal~google-search-result-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-qaseemiqbal-google-search-result-intelligence",
        "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/qaseemiqbal~google-search-result-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-qaseemiqbal-google-search-result-intelligence",
        "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",
        "properties": {
          "queries": {
            "title": "Search queries",
            "type": "string",
            "description": "One search query per line. Use this for keyword-based SERP collection."
          },
          "searchUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Optional raw Google search URLs. Use this when you need exact URL-level control.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "inputFile": {
            "title": "Input file",
            "type": "string",
            "description": "Optional TXT, CSV, or JSON file uploaded to the default key-value store. Lines or first CSV column can contain queries or Google URLs."
          },
          "costMode": {
            "title": "Cost mode",
            "enum": [
              "economy",
              "balanced",
              "performance"
            ],
            "type": "string",
            "description": "Economy is the cheapest mode: HTTP-first crawling, no retries by default, compact output, no screenshots/HTML evidence, capped request count, and no unavailable AI placeholder rows. Use balanced or performance when completeness matters more than cost.",
            "default": "economy"
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "Two-letter country code used for localized search.",
            "default": "us"
          },
          "googleDomain": {
            "title": "Google domain",
            "type": "string",
            "description": "Google domain to use. If omitted, the Actor derives it from countryCode.",
            "default": "google.com"
          },
          "languageCode": {
            "title": "Language code",
            "type": "string",
            "description": "Language code for the search interface and results.",
            "default": "en"
          },
          "locationName": {
            "title": "Exact location",
            "type": "string",
            "description": "Optional precise location, such as Seattle, Washington, United States. Used as a local search hint when no UULE is supplied."
          },
          "locationUule": {
            "title": "UULE location parameter",
            "type": "string",
            "description": "Optional raw UULE parameter. Takes precedence over locationName."
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Choose desktop or mobile SERP rendering.",
            "default": "desktop"
          },
          "resultsPerPage": {
            "title": "Results per page",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "Number of search results requested per Google results page.",
            "default": 10
          },
          "maxPagesPerQuery": {
            "title": "Maximum pages per query",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many SERP pages to collect per query.",
            "default": 1
          },
          "includeOrganicResults": {
            "title": "Include organic results",
            "type": "boolean",
            "description": "Extract standard organic search results.",
            "default": true
          },
          "includeSitelinks": {
            "title": "Include sitelinks",
            "type": "boolean",
            "description": "Extract and output sitelinks. Disabled by default because it increases parser work and dataset rows.",
            "default": false
          },
          "includePaidResults": {
            "title": "Include paid results",
            "type": "boolean",
            "description": "Extract paid text ads when present.",
            "default": false
          },
          "includeProductAds": {
            "title": "Include product ads",
            "type": "boolean",
            "description": "Extract shopping/product ad units when present.",
            "default": false
          },
          "includePeopleAlsoAsk": {
            "title": "Include People Also Ask",
            "type": "boolean",
            "description": "Extract People Also Ask questions and answers where available.",
            "default": false
          },
          "expandPeopleAlsoAsk": {
            "title": "Expand People Also Ask",
            "type": "boolean",
            "description": "Click or expand PAA items in browser mode. Increases runtime and cost.",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Include related queries",
            "type": "boolean",
            "description": "Extract related search queries.",
            "default": false
          },
          "includeAiOverview": {
            "title": "Include Google AI Overview / AI Mode",
            "type": "boolean",
            "description": "Attempt to extract AI Overview content when available. AI Mode/provider adapters return honest unavailable records unless provider credentials are added in code.",
            "default": false
          },
          "aiProviders": {
            "title": "AI answer providers",
            "type": "array",
            "description": "Optional AI-answer providers for cross-platform comparison. Non-Google providers are emitted as adapter-ready unavailable records until real provider connectors are configured.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "emitUnavailableAiRecords": {
            "title": "Emit unavailable AI records",
            "type": "boolean",
            "description": "Write provider records even when an AI provider adapter is unavailable or an AI block is missing. Keep disabled for the cheapest, smallest datasets.",
            "default": false
          },
          "copilotMode": {
            "title": "Copilot response mode",
            "enum": [
              "chat",
              "reasoning",
              "smart",
              "study"
            ],
            "type": "string",
            "description": "Response style for a future Copilot adapter.",
            "default": "smart"
          },
          "trackedEntities": {
            "title": "Tracked entities",
            "type": "array",
            "description": "Brand, product, competitor, or person names to detect in SERPs and AI answers.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "domainFilters": {
            "title": "Domain filters",
            "type": "object",
            "description": "Optional domain filtering rules.",
            "properties": {
              "includeDomains": {
                "title": "Include domains",
                "type": "array",
                "description": "Only keep result rows from these domains when non-empty.",
                "editor": "stringList"
              },
              "excludeDomains": {
                "title": "Exclude domains",
                "type": "array",
                "description": "Drop result rows from these domains.",
                "editor": "stringList"
              },
              "excludeLargePlatforms": {
                "title": "Exclude large platforms",
                "type": "boolean",
                "description": "Exclude common platforms, directories, social networks, and marketplaces from lead enrichment.",
                "default": true
              }
            },
            "additionalProperties": false
          },
          "leadEnrichment": {
            "title": "Lead enrichment",
            "type": "object",
            "description": "Optional business lead workflow. This implementation emits domain-only lead records unless a real enrichment adapter is connected.",
            "properties": {
              "enabled": {
                "title": "Enable lead enrichment",
                "type": "boolean",
                "description": "Create lead-ready company/domain records for discovered result domains.",
                "default": false
              },
              "maxLeadsPerDomain": {
                "title": "Maximum leads per domain",
                "type": "integer",
                "description": "Maximum enriched contacts per domain when a provider adapter is connected.",
                "default": 1,
                "minimum": 1,
                "maximum": 20
              },
              "verifyEmails": {
                "title": "Verify emails",
                "type": "boolean",
                "description": "Verify email deliverability when enrichment returns email addresses.",
                "default": false
              },
              "jobTitles": {
                "title": "Target job titles",
                "type": "array",
                "description": "Optional job titles to prioritize.",
                "editor": "stringList",
                "default": []
              }
            },
            "additionalProperties": false
          },
          "customDataFunction": {
            "title": "Custom data function",
            "type": "string",
            "description": "Optional JavaScript function executed on each SERP page. Must return a JSON-serializable object."
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "page",
              "rows",
              "both"
            ],
            "type": "string",
            "description": "Choose whether to push page-level records, row-level records, or both.",
            "default": "rows"
          },
          "compactOutput": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Remove nulls, empty arrays, and empty objects before writing dataset items. This reduces storage, export size, and downstream API payloads.",
            "default": true
          },
          "pushSummaryToDataset": {
            "title": "Push summary to dataset",
            "type": "boolean",
            "description": "Also write the run summary as a dataset item. Disabled by default because OUTPUT in the key-value store is enough for most automations.",
            "default": false
          },
          "saveHtml": {
            "title": "Save HTML",
            "type": "boolean",
            "description": "Save raw SERP HTML for debugging and auditability.",
            "default": false
          },
          "saveScreenshots": {
            "title": "Save screenshots",
            "type": "boolean",
            "description": "Save screenshots for visual QA. Requires browser mode.",
            "default": false
          },
          "crawlerType": {
            "title": "Crawler type",
            "enum": [
              "http",
              "browser",
              "auto"
            ],
            "type": "string",
            "description": "Use HTTP parsing first for speed, browser mode for dynamic features, or auto fallback.",
            "default": "http"
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of SERP pages processed in parallel.",
            "default": 1
          },
          "maxRequestsPerRun": {
            "title": "Maximum SERP requests per run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cost guardrail that caps planned SERP page requests. Economy mode caps this to 100 even if a higher value is supplied.",
            "default": 100
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time per request in seconds.",
            "default": 20
          },
          "maxRequestRetries": {
            "title": "Maximum request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry failed SERP requests.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Google SERP or residential proxies are recommended for reliable localized search.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "GOOGLE_SERP"
              ]
            }
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Enable verbose logs for parser/debugging.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}