{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Results Scraper - SERP API",
    "description": "Scrape Google search results by keyword or URL: organic results with real URLs and ranks, places, top stories, knowledge panel, related searches, News and Videos tabs. Optional AI Overview, People also ask and ads. Any country, language or city. From $0.40 per 1,000 pages.",
    "version": "0.1",
    "x-build-id": "aB0lo299tKxwaKIeZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/eiv~google-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-eiv-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/eiv~google-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-eiv-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/eiv~google-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-eiv-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",
        "properties": {
          "queries": {
            "title": "Search queries",
            "type": "string",
            "description": "One per line: what you would type into Google, or a Google search URL. Operators work (site:, -word, \"exact phrase\", OR, intitle:). A pasted URL keeps its filters (tbs, tbm, hl, gl) and its page (start=20 begins on page 3)."
          },
          "searchType": {
            "title": "Results tab",
            "enum": [
              "web",
              "news",
              "videos"
            ],
            "type": "string",
            "description": "Which Google tab to scrape: Web results, News (headlines with publisher and date) or Videos.",
            "default": "web"
          },
          "maxPagesPerQuery": {
            "title": "Pages per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Results pages per query, about 10 organic results each (Google no longer serves more per page). You pay per page, so this is your cost cap per query. Most searches end before page 30.",
            "default": 1
          },
          "countryCode": {
            "title": "Country",
            "enum": [
              "",
              "af",
              "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",
              "bn",
              "bg",
              "bf",
              "bi",
              "kh",
              "cm",
              "ca",
              "cv",
              "ky",
              "cf",
              "td",
              "cl",
              "cn",
              "cx",
              "cc",
              "co",
              "km",
              "cd",
              "cg",
              "ck",
              "cr",
              "ci",
              "hr",
              "cu",
              "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",
              "gn",
              "gw",
              "gy",
              "ht",
              "hm",
              "hn",
              "hk",
              "hu",
              "is",
              "in",
              "id",
              "ir",
              "iq",
              "ie",
              "il",
              "it",
              "jm",
              "jp",
              "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",
              "an",
              "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",
              "sh",
              "kn",
              "lc",
              "pm",
              "vc",
              "ws",
              "sm",
              "st",
              "sa",
              "sn",
              "rs",
              "sc",
              "sl",
              "sg",
              "sk",
              "si",
              "sb",
              "so",
              "za",
              "gs",
              "kr",
              "es",
              "lk",
              "sd",
              "sr",
              "sj",
              "se",
              "ch",
              "sy",
              "tw",
              "tj",
              "tz",
              "th",
              "tl",
              "tg",
              "tk",
              "to",
              "tt",
              "tn",
              "tr",
              "tm",
              "tc",
              "tv",
              "ug",
              "ua",
              "ae",
              "gb",
              "us",
              "um",
              "uy",
              "uz",
              "vu",
              "va",
              "ve",
              "vn",
              "vg",
              "vi",
              "wf",
              "eh",
              "ye",
              "zm",
              "zw"
            ],
            "type": "string",
            "description": "Country whose Google results you want (Google's gl parameter). Default: United States.",
            "default": ""
          },
          "languageCode": {
            "title": "Interface language",
            "enum": [
              "",
              "af",
              "sq",
              "am",
              "ar",
              "hy",
              "az",
              "eu",
              "be",
              "bn",
              "bh",
              "bs",
              "bg",
              "my",
              "ca",
              "zh-CN",
              "zh-TW",
              "hr",
              "cs",
              "da",
              "nl",
              "en",
              "eo",
              "et",
              "fo",
              "fi",
              "fr",
              "fy",
              "gl",
              "ka",
              "de",
              "el",
              "gu",
              "iw",
              "hi",
              "hu",
              "is",
              "id",
              "ia",
              "ga",
              "it",
              "ja",
              "jw",
              "kn",
              "km",
              "ko",
              "lo",
              "la",
              "lv",
              "lt",
              "mk",
              "ms",
              "ml",
              "mt",
              "mr",
              "mn",
              "ne",
              "no",
              "nn",
              "oc",
              "fa",
              "pl",
              "pt-BR",
              "pt-PT",
              "pa",
              "ro",
              "ru",
              "sm",
              "gd",
              "sr",
              "si",
              "sk",
              "sl",
              "so",
              "es",
              "su",
              "sw",
              "sv",
              "tl",
              "ta",
              "te",
              "th",
              "ti",
              "tr",
              "uk",
              "ur",
              "uz",
              "vi",
              "cy",
              "xh",
              "zu"
            ],
            "type": "string",
            "description": "Language of Google's interface and snippets (hl). Default: the country's main language.",
            "default": ""
          },
          "location": {
            "title": "City or region",
            "type": "string",
            "description": "Search as if from this place: Google's canonical name, e.g. Austin,Texas,United States or London,England,United Kingdom (an encoded uule works too). Moves local results and the Places pack there. Google applies a city only on its full page, so this turns on Full results (add-on price)."
          },
          "searchLanguage": {
            "title": "Only pages in language",
            "enum": [
              "",
              "ar",
              "bg",
              "ca",
              "zh-CN",
              "zh-TW",
              "hr",
              "cs",
              "da",
              "nl",
              "en",
              "et",
              "fi",
              "fr",
              "de",
              "el",
              "iw",
              "hu",
              "is",
              "id",
              "it",
              "ja",
              "ko",
              "lv",
              "lt",
              "no",
              "pl",
              "pt",
              "ro",
              "ru",
              "sr",
              "sk",
              "sl",
              "es",
              "sv",
              "th",
              "tr",
              "uk"
            ],
            "type": "string",
            "description": "Only return pages written in this language (lr). Leave empty in most cases: it can make Google return fewer results.",
            "default": ""
          },
          "restrictToCountry": {
            "title": "Only pages from the country",
            "type": "boolean",
            "description": "Only return pages Google attributes to the selected country (cr). Off by default.",
            "default": false
          },
          "quickDateRange": {
            "title": "Date range",
            "pattern": "^([hdwmy]\\d*)?$",
            "type": "string",
            "description": "Only results from the last period: h (hour), d (day), w (week), m (month), y (year), optionally with a number: d7 = past 7 days, m6 = past 6 months. Leave empty for any time."
          },
          "afterDate": {
            "title": "From date",
            "type": "string",
            "description": "Only results Google dates on or after this day (custom date range). Absolute (2026-01-31) or relative (3 months). Ignored when Date range is set."
          },
          "beforeDate": {
            "title": "To date",
            "type": "string",
            "description": "Only results Google dates on or before this day. Absolute or relative. Ignored when Date range is set."
          },
          "site": {
            "title": "Only this site",
            "type": "string",
            "description": "Restrict every query to one domain, e.g. reddit.com (adds site:). Skipped for queries that already contain site:."
          },
          "forceExactMatch": {
            "title": "Exact phrase",
            "type": "boolean",
            "description": "Wrap each query in quotes so Google matches the exact phrase.",
            "default": false
          },
          "wordsInTitle": {
            "title": "Words in title",
            "type": "array",
            "description": "Every result title must contain each of these words (adds intitle:).",
            "items": {
              "type": "string"
            }
          },
          "wordsInText": {
            "title": "Words in text",
            "type": "array",
            "description": "Every result must contain each of these words in its text (adds intext:).",
            "items": {
              "type": "string"
            }
          },
          "wordsInUrl": {
            "title": "Words in URL",
            "type": "array",
            "description": "Every result URL must contain each of these words (adds inurl:). Google applies this loosely.",
            "items": {
              "type": "string"
            }
          },
          "excludeWords": {
            "title": "Exclude words",
            "type": "array",
            "description": "Leave out results that contain any of these words (adds -word).",
            "items": {
              "type": "string"
            }
          },
          "fileTypes": {
            "title": "File types",
            "type": "array",
            "description": "Only documents of these types (adds filetype:pdf OR filetype:docx).",
            "items": {
              "type": "string",
              "enum": [
                "pdf",
                "doc",
                "docx",
                "xls",
                "xlsx",
                "ppt",
                "pptx",
                "txt",
                "csv",
                "rtf",
                "odt",
                "ods",
                "odp",
                "epub",
                "ps",
                "tex",
                "xml",
                "svg",
                "kml",
                "kmz",
                "html",
                "htm",
                "md",
                "json",
                "yml",
                "yaml",
                "sql",
                "log",
                "ipynb",
                "wml",
                "wap",
                "xps",
                "rdf",
                "swf"
              ]
            }
          },
          "relatedToSite": {
            "title": "Related to site",
            "type": "string",
            "description": "Adds related:<domain>. Google retired this operator, so it rarely changes the results; kept for compatibility. Ignored when Only this site is set."
          },
          "safeSearch": {
            "title": "SafeSearch",
            "type": "boolean",
            "description": "Filter explicit results (safe=active).",
            "default": false
          },
          "includeUnfilteredResults": {
            "title": "Include omitted results",
            "type": "boolean",
            "description": "Include results Google hides as very similar to others (filter=0).",
            "default": false
          },
          "disableAutocorrect": {
            "title": "No spelling correction",
            "type": "boolean",
            "description": "Search exactly what you typed instead of Google's corrected spelling (nfpr=1).",
            "default": false
          },
          "fullResults": {
            "title": "Full results: AI Overview, People also ask, ads",
            "type": "boolean",
            "description": "Also return AI Overview, People also ask, text and shopping ads, video carousels and the featured snippet. Uses Google's full page through Apify's Google SERP proxy: charged as the Full results page add-on on top of the page price, and about 5-15 s per page instead of about 1 s.",
            "default": false
          },
          "saveHtml": {
            "title": "Save HTML in rows",
            "type": "boolean",
            "description": "Put each page's raw HTML in the html field. Makes rows much larger.",
            "default": false
          },
          "saveHtmlToKeyValueStore": {
            "title": "Save HTML to key-value store",
            "type": "boolean",
            "description": "Save each page's HTML in the run's key-value store and link it in htmlSnapshotUrl.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many queries run at the same time.",
            "default": 5
          },
          "locationUule": {
            "title": "Location (uule)",
            "type": "string",
            "description": "Same as City or region, under apify/google-search-scraper's field name."
          },
          "mobileResults": {
            "title": "Mobile results",
            "type": "boolean",
            "description": "Accepted for compatibility with apify/google-search-scraper and ignored: Google's pages come back in the desktop layout."
          },
          "focusOnPaidAds": {
            "title": "Focus on ads",
            "type": "boolean",
            "description": "Same as Full results, under apify/google-search-scraper's field name."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}