{
  "openapi": "3.0.1",
  "info": {
    "title": "Google SERP Scraper — AI Overview, PAA & Rank Tracking",
    "description": "Scrape Google SERPs: organic results, ads, AI Overview with sources, People also ask, local pack, AI Mode, News & Images, plus rank tracking.",
    "version": "1.0",
    "x-build-id": "Mo0jppcNjsN7Xgkoo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cheapapi~google-serp-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cheapapi-google-serp-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/cheapapi~google-serp-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cheapapi-google-serp-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/cheapapi~google-serp-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cheapapi-google-serp-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",
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "What you would type into Google, one per line. Google search operators such as <code>site:</code> or <code>intitle:</code> are supported (priced separately, see the Pricing tab). A search that Google answers with no results is charged a small no-results fee ($0.001 per page unit).",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "AF",
              "AX",
              "AL",
              "DZ",
              "AS",
              "AD",
              "AO",
              "AI",
              "AQ",
              "AG",
              "AR",
              "AM",
              "AW",
              "AU",
              "AT",
              "AZ",
              "BS",
              "BH",
              "BD",
              "BB",
              "BY",
              "BE",
              "BZ",
              "BJ",
              "BM",
              "BT",
              "BO",
              "BA",
              "BW",
              "BV",
              "BR",
              "IO",
              "VG",
              "BN",
              "BG",
              "BF",
              "BI",
              "KH",
              "CM",
              "CA",
              "CV",
              "BQ",
              "KY",
              "CF",
              "TD",
              "CL",
              "CN",
              "CX",
              "CC",
              "CO",
              "KM",
              "CG",
              "CD",
              "CK",
              "CR",
              "CI",
              "HR",
              "CU",
              "CW",
              "CY",
              "CZ",
              "DK",
              "DJ",
              "DM",
              "DO",
              "EC",
              "EG",
              "SV",
              "GQ",
              "ER",
              "EE",
              "SZ",
              "ET",
              "FK",
              "FO",
              "FJ",
              "FI",
              "FR",
              "GF",
              "PF",
              "TF",
              "GA",
              "GM",
              "GE",
              "DE",
              "GH",
              "GI",
              "GR",
              "GL",
              "GD",
              "GP",
              "GU",
              "GT",
              "GG",
              "GN",
              "GW",
              "GY",
              "HT",
              "HM",
              "HN",
              "HK",
              "HU",
              "IS",
              "IN",
              "ID",
              "IR",
              "IQ",
              "IE",
              "IM",
              "IL",
              "IT",
              "JM",
              "JP",
              "JE",
              "JO",
              "KZ",
              "KE",
              "KI",
              "KW",
              "KG",
              "LA",
              "LV",
              "LB",
              "LS",
              "LR",
              "LY",
              "LI",
              "LT",
              "LU",
              "MO",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MH",
              "MQ",
              "MR",
              "MU",
              "YT",
              "MX",
              "FM",
              "MD",
              "MC",
              "MN",
              "ME",
              "MS",
              "MA",
              "MZ",
              "MM",
              "NA",
              "NR",
              "NP",
              "NL",
              "NC",
              "NZ",
              "NI",
              "NE",
              "NG",
              "NU",
              "NF",
              "KP",
              "MK",
              "MP",
              "NO",
              "OM",
              "PK",
              "PW",
              "PS",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PN",
              "PL",
              "PT",
              "PR",
              "QA",
              "RE",
              "RO",
              "RU",
              "RW",
              "WS",
              "SM",
              "ST",
              "SA",
              "SN",
              "RS",
              "SC",
              "SL",
              "SG",
              "SX",
              "SK",
              "SI",
              "SB",
              "SO",
              "ZA",
              "GS",
              "KR",
              "SS",
              "ES",
              "LK",
              "BL",
              "SH",
              "KN",
              "LC",
              "MF",
              "PM",
              "VC",
              "SD",
              "SR",
              "SJ",
              "SE",
              "CH",
              "SY",
              "TW",
              "TJ",
              "TZ",
              "TH",
              "TL",
              "TG",
              "TK",
              "TO",
              "TT",
              "TN",
              "TM",
              "TC",
              "TV",
              "TR",
              "UM",
              "VI",
              "UG",
              "UA",
              "AE",
              "GB",
              "US",
              "UY",
              "UZ",
              "VU",
              "VA",
              "VE",
              "VN",
              "WF",
              "EH",
              "YE",
              "ZM",
              "ZW"
            ],
            "type": "string",
            "description": "Google results as seen by a searcher in this country. For a city or exact point, use the advanced location options.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "enum": [
              "af",
              "sq",
              "am",
              "ar",
              "hy",
              "az",
              "bn",
              "eu",
              "be",
              "bs",
              "pt-BR",
              "bg",
              "my",
              "ca",
              "ceb",
              "zh-CN",
              "zh-TW",
              "hr",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "pt-PT",
              "fil",
              "fi",
              "fr",
              "gl",
              "ka",
              "de",
              "el",
              "gu",
              "ht",
              "ha",
              "he",
              "hi",
              "hu",
              "is",
              "ig",
              "id",
              "ga",
              "it",
              "ja",
              "kn",
              "kk",
              "km",
              "rw",
              "ko",
              "ky",
              "lo",
              "lv",
              "lt",
              "mk",
              "ms",
              "ml",
              "mt",
              "mr",
              "mn",
              "ne",
              "no",
              "ps",
              "fa",
              "pl",
              "pt",
              "pa",
              "ro",
              "ru",
              "sr",
              "si",
              "sk",
              "sl",
              "so",
              "es",
              "es-419",
              "sw",
              "sv",
              "tl",
              "tg",
              "ta",
              "te",
              "th",
              "tr",
              "tk",
              "uk",
              "ur",
              "uz",
              "vi",
              "cy",
              "xh",
              "yo",
              "zu"
            ],
            "type": "string",
            "description": "Interface language of Google.",
            "default": "en"
          },
          "maxPagesPerQuery": {
            "title": "Result pages per search term",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many Google result pages (about 10 organic results each) to collect for every search term. Each page is one billed result page.",
            "default": 1
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "organic",
              "aiMode",
              "news",
              "images"
            ],
            "type": "string",
            "description": "Which Google product to search.",
            "default": "organic"
          },
          "trackDomains": {
            "title": "Track rankings of these domains",
            "type": "array",
            "description": "Optional. Domains or URLs (e.g. <code>nike.com</code>, <code>example.com/blog</code>, <code>*.example.org</code>) whose position you want to know. Each result page gets a <code>rankTracking</code> field with position, URL, and whether the domain is cited in the AI Overview, featured snippet, ads or local pack.",
            "items": {
              "type": "string"
            }
          },
          "outputResultRows": {
            "title": "Also output one row per result",
            "type": "boolean",
            "description": "Adds one dataset row per organic/paid result (or news item, image, AI citation) next to the page rows — handy for spreadsheets and rank history. These rows are free.",
            "default": false
          },
          "location": {
            "title": "City or region",
            "type": "string",
            "description": "Search from a specific place instead of the whole country, written as <code>City,Region,Country</code>, e.g. <code>Austin,Texas,United States</code> or <code>London,England,United Kingdom</code>. Overrides Country."
          },
          "coordinates": {
            "title": "Coordinates",
            "pattern": "^\\s*-?\\d+(\\.\\d+)?\\s*,\\s*-?\\d+(\\.\\d+)?(\\s*,\\s*\\d+(\\.\\d+)?)?\\s*$",
            "type": "string",
            "description": "Search from an exact point, written as <code>latitude,longitude</code> or <code>latitude,longitude,radius-in-meters</code> in decimal degrees, e.g. <code>40.7580,-73.9855</code> (Times Square, New York) or <code>51.5074,-0.1278,1000</code> (central London, 1 km radius). The radius is 200–199999 m and defaults to 200. Overrides City and Country."
          },
          "googleDomain": {
            "title": "Google domain",
            "type": "string",
            "description": "Optional Google domain to search on, written without https:// or www, e.g. <code>google.co.uk</code>, <code>google.de</code> or <code>google.com.br</code>. Leave empty for google.com; results are still localized by Country or City, so you rarely need to change this."
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Collect desktop or mobile results. (News is always desktop.)",
            "default": "desktop"
          },
          "operatingSystem": {
            "title": "Operating system",
            "enum": [
              "auto",
              "windows",
              "macos",
              "android",
              "ios"
            ],
            "type": "string",
            "description": "Operating system of the simulated browser. Must match the device.",
            "default": "auto"
          },
          "screenWidth": {
            "title": "Screen width (px)",
            "minimum": 0,
            "maximum": 9999,
            "type": "integer",
            "description": "Browser width in pixels (240–9999). Default <code>0</code> = automatic: 1920 on desktop, 360 on mobile.",
            "default": 0
          },
          "screenHeight": {
            "title": "Screen height (px)",
            "minimum": 0,
            "maximum": 9999,
            "type": "integer",
            "description": "Browser height in pixels (240–9999). Default <code>0</code> = automatic: 1080 on desktop, 640–812 on mobile.",
            "default": 0
          },
          "pixelRatio": {
            "title": "Pixel ratio",
            "minimum": 0,
            "maximum": 3,
            "type": "number",
            "description": "Device pixel ratio between 0.5 and 3. Default <code>0</code> = automatic: 1 on desktop, 3 on mobile.",
            "default": 0
          },
          "loadAiOverview": {
            "title": "Always load the AI Overview",
            "type": "boolean",
            "description": "Google often loads the AI Overview a moment after the page. Turn this on to wait for it and capture it whenever Google shows one. Without it you still get every AI Overview that is part of the page. Add-on price per page (see Pricing).",
            "default": false
          },
          "expandAiOverview": {
            "title": "Expand the full AI Overview",
            "type": "boolean",
            "description": "Clicks “Show more” so the complete AI Overview text and all cited sources are captured. Free.",
            "default": false
          },
          "peopleAlsoAskDepth": {
            "title": "Expand “People also ask”",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "0 = only the questions visible on the page (free). 1–4 = click the questions this many levels deep to reveal more questions (Google often loads their answers only on click, so answers may be empty). Each extra revealed question is billed (see Pricing); a page that shows the box is billed at least one question per level, because each click is paid even when it reveals nothing new.",
            "default": 0
          },
          "pixelPositions": {
            "title": "Capture pixel positions",
            "type": "boolean",
            "description": "Adds the on-screen position and size (x, y, width, height) of each result — useful for above-the-fold analysis. Add-on price per page.",
            "default": false
          },
          "groupRelatedResults": {
            "title": "Group indented results",
            "type": "boolean",
            "description": "Keep indented results from the same site grouped under their main result (Google's layout). Turn off to list them as separate positions.",
            "default": true
          },
          "resultsPerQuery": {
            "title": "Results per search term",
            "minimum": 0,
            "maximum": 700,
            "type": "integer",
            "description": "Optional exact number of results per search term instead of result pages (organic/news: billed per started 10, images: per started 100). Default <code>0</code> = use “Result pages per search term”. Overrides that option when set.",
            "default": 0
          },
          "googleUrls": {
            "title": "Google search URLs",
            "type": "array",
            "description": "Instead of search terms, paste complete Google search URLs (e.g. with filters like <code>&tbs=qdr:w</code>). Country and language are taken from the URL.",
            "items": {
              "type": "string"
            }
          },
          "extraUrlParameters": {
            "title": "Extra Google URL parameters",
            "type": "string",
            "description": "Raw parameters added to the Google URL, e.g. <code>&tbs=qdr:w</code> (past week) or <code>&filter=0</code>."
          },
          "removeUrlParameters": {
            "title": "Remove URL parameters from result links",
            "type": "array",
            "description": "Up to 10 query parameter names (e.g. <code>srsltid</code>) to strip from result URLs.",
            "items": {
              "type": "string"
            }
          },
          "stopWhenFound": {
            "title": "Stop paging when a tracked domain is found",
            "type": "boolean",
            "description": "With several result pages and tracked domains: stop requesting further pages for a search once a tracked domain appears. Saves money in rank tracking — you only pay for pages delivered.",
            "default": false
          },
          "onlyResultsMatching": {
            "title": "Only return results matching",
            "type": "string",
            "description": "Return only the SERP elements that contain this domain or URL (wildcards <code>*</code> allowed, e.g. <code>*.example.com*</code>). Leave empty to get the full page."
          },
          "matchMode": {
            "title": "Match mode",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Used with “Only return results matching”.",
            "default": "any"
          },
          "matchOnlyInTypes": {
            "title": "Match only in these result types",
            "type": "array",
            "description": "Used with “Only return results matching”. Result types, e.g. organic, paid, featured_snippet, local_pack, people_also_ask, ai_overview, top_stories, video, images, knowledge_graph, shopping.",
            "items": {
              "type": "string"
            }
          },
          "matchIgnoreTypes": {
            "title": "Ignore these result types when matching",
            "type": "array",
            "description": "Used with “Only return results matching”. Same type names as above.",
            "items": {
              "type": "string"
            }
          },
          "processingSpeed": {
            "title": "Processing speed",
            "enum": [
              "auto",
              "standard",
              "fast",
              "instant"
            ],
            "type": "string",
            "description": "How quickly results are collected. Standard (the default) usually takes 1–5 minutes, has no add-on and is best for large runs. Instant returns each search in seconds for +$0.0018 per page; Fast takes about 1 minute for +$0.0008 per page. For Google News, Fast is served — and charged — as Instant. Speed add-ons also apply to the no-results fee of a search that returns nothing.",
            "default": "auto"
          },
          "maxWaitMinutes": {
            "title": "Maximum wait (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Searches not finished after this time are reported in the run summary. They were already sent for processing, so each is charged the small no-results fee for its requested pages (see Pricing) — keep this generous.",
            "default": 60
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}