{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Results Scraper - SERP, Ads & People Also Ask",
    "description": "Google search results scraper (SERP) for one query or a list: organic results with their rank, ads, People Also Ask questions and related searches, page by page. Pick the country, the language and the Google domain, and use operators like site: and OR. $1.00 per 1,000 organic results.",
    "version": "0.1",
    "x-build-id": "kMgfIONzuhZZQ1gNo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dami_studio~google-search-results-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dami_studio-google-search-results-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/dami_studio~google-search-results-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dami_studio-google-search-results-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/dami_studio~google-search-results-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dami_studio-google-search-results-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": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Google query. Supports operators such as site:, intitle:, quotes, OR, and minus terms."
          },
          "queries": {
            "title": "More searches",
            "maxItems": 100,
            "type": "array",
            "description": "Optional. More searches for the same run, one per line, up to 100 in all. Each one is read on its own, with its own pages and its own Maximum results. Search query above, when filled in, runs first.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Google search addresses",
            "maxItems": 100,
            "type": "array",
            "description": "Optional. Paste search addresses from your browser, such as https://www.google.com/search?q=running+shoes&tbs=qdr:w. The search and its date, language, country and city settings are read from each one. Only the All tab works: image, news, video and shopping addresses are refused, and only Google's own addresses are read.",
            "items": {
              "type": "string"
            }
          },
          "googleDomain": {
            "title": "Google domain",
            "type": "string",
            "description": "Google host without protocol, for example google.com, google.ca, or google.co.uk.",
            "default": "google.com"
          },
          "countryCode": {
            "title": "Country code",
            "type": "string",
            "description": "Google country edition passed as gl, for example US, CA, GB, or DE. Pick one or type any two-letter country code. A code Google does not know stops the run before anything is searched.",
            "default": "US"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Google interface language passed as hl, for example en, fr, or de. This is the language of Google's own page; to keep only results written in a language, use Results language. Pick one or type a code such as pt-BR.",
            "default": "en"
          },
          "resultsLanguage": {
            "title": "Results language",
            "enum": [
              "ar",
              "bg",
              "ca",
              "cs",
              "da",
              "de",
              "el",
              "en",
              "es",
              "et",
              "fi",
              "fr",
              "hr",
              "hu",
              "id",
              "is",
              "it",
              "iw",
              "ja",
              "ko",
              "lt",
              "lv",
              "nl",
              "no",
              "pl",
              "pt",
              "ro",
              "ru",
              "sk",
              "sl",
              "sr",
              "sv",
              "tr",
              "zh-CN",
              "zh-TW"
            ],
            "type": "string",
            "description": "Optional. Keep only pages written in this language (Google's own language filter). Empty means any language."
          },
          "resultsCountry": {
            "title": "Sites from one country",
            "type": "string",
            "description": "Optional. Keep only sites Google places in this country, as a two-letter code such as FR. Different from Country code, which sets where the search is made from."
          },
          "location": {
            "title": "City or place",
            "type": "string",
            "description": "Optional. Search as someone in this place, for local results. Use Google's name for it, place, region and country with commas and no spaces after them: Chicago,Illinois,United States. Country code should match the country."
          },
          "timeRange": {
            "title": "Results from the past",
            "enum": [
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Optional. Keep only pages Google dates within the last hour, day, week, month or year. Results whose date Google prints as older are left out and not charged. Empty means any time."
          },
          "dateFrom": {
            "title": "Results from this date",
            "type": "string",
            "description": "Optional. Keep only pages Google dates on or after this day (YYYY-MM-DD). Use instead of Results from the past, not with it."
          },
          "dateTo": {
            "title": "Results up to this date",
            "type": "string",
            "description": "Optional. Keep only pages Google dates on or before this day (YYYY-MM-DD)."
          },
          "exactMatch": {
            "title": "Exact phrase only",
            "type": "boolean",
            "description": "Puts quote marks round each search, so Google matches the words together and in order. Searches that already use quotes, operators or OR are sent as they are.",
            "default": false
          },
          "site": {
            "title": "Only this site",
            "type": "string",
            "description": "Optional. Keep results to one site, such as reddit.com or www.bbc.co.uk/news. Results Google returns from other sites are left out and not charged."
          },
          "wordsInTitle": {
            "title": "Words in the title",
            "type": "string",
            "description": "Optional. Each word must be in the page title (Google's intitle:). Put a phrase in quote marks to keep it together."
          },
          "wordsInText": {
            "title": "Words in the page text",
            "type": "string",
            "description": "Optional. Each word must be in the page text (Google's intext:)."
          },
          "wordsInUrl": {
            "title": "Words in the address",
            "type": "string",
            "description": "Optional. Each word must be in the page address (Google's inurl:)."
          },
          "fileTypes": {
            "title": "File types",
            "type": "array",
            "description": "Optional. Only documents of these types, such as PDF or Excel files. Several types are joined with OR, which can leave fewer results a page.",
            "items": {
              "type": "string",
              "enum": [
                "pdf",
                "doc",
                "docx",
                "xls",
                "xlsx",
                "ppt",
                "pptx",
                "txt",
                "rtf",
                "odt",
                "ods",
                "odp",
                "csv",
                "xml",
                "kml",
                "kmz",
                "ps",
                "swf"
              ],
              "enumTitles": [
                "PDF",
                "Word (doc)",
                "Word (docx)",
                "Excel (xls)",
                "Excel (xlsx)",
                "PowerPoint (ppt)",
                "PowerPoint (pptx)",
                "Text",
                "Rich text",
                "OpenDocument text",
                "OpenDocument sheet",
                "OpenDocument slides",
                "CSV",
                "XML",
                "KML",
                "KMZ",
                "PostScript",
                "Flash"
              ]
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum rows to return for each search, counting organic results, ads and People Also Ask together; related searches take one place between them. Google may provide fewer. This is also the cap on how many results a search can charge for.",
            "default": 10
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Follow Google pagination up to this many pages for each search. Each page is fetched only as needed.",
            "default": 1
          },
          "startPage": {
            "title": "Start at page",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Optional. The first Google page to read, 1 to 10. Every row's nextPage says where to carry on. A run never reads past page 10."
          },
          "includeAds": {
            "title": "Include ads",
            "type": "boolean",
            "description": "Return detectable paid search ads in addition to organic results.",
            "default": true
          },
          "includePeopleAlsoAsk": {
            "title": "Include People Also Ask",
            "type": "boolean",
            "description": "Return visible PAA questions and answer text when present in the HTML.",
            "default": true
          },
          "includeRelatedSearches": {
            "title": "Include related searches",
            "type": "boolean",
            "description": "Return the related-search phrases from the bottom of each page, one row per phrase.",
            "default": true
          },
          "includeSitelinks": {
            "title": "Include sitelinks",
            "type": "boolean",
            "description": "Fill sitelinks on organic rows: the extra links Google prints under a site's own result, each with its title and address. Off, sitelinks stays empty.",
            "default": false
          },
          "includeProducts": {
            "title": "Include product cards",
            "type": "boolean",
            "description": "Return the shopping product cards Google prints, as free rows of type product: name, price, seller and rating, text only. They come on top of Maximum results.",
            "default": false
          },
          "includeAiOverviewSources": {
            "title": "Include AI Overview sources",
            "type": "boolean",
            "description": "Return the sites Google's AI Overview cites, as free rows of type ai_overview_source: the site's name, the page title and its address. The overview's own text is not returned. They come on top of Maximum results.",
            "default": false
          },
          "includePageText": {
            "title": "Include page text",
            "type": "boolean",
            "description": "Optional add-on. Read each organic result's own page once and return its readable text in pageText, up to 20,000 characters. A page that cannot be read leaves pageText empty.",
            "default": false
          },
          "notionConnector": {
            "title": "Notion connector (optional)",
            "type": "string",
            "description": "Optional. Write each row as a page into your Notion when the run finishes. Authorize a Notion connector once in Settings, API & Integrations, MCP connectors, then pick it here. Leave empty to skip; the rows are always saved to the dataset."
          },
          "notionParentId": {
            "title": "Notion target data source ID",
            "type": "string",
            "description": "Optional. The Notion data source ID of the database to write into (only used if a Notion connector is set). Leave empty to create the pages privately in your workspace instead."
          },
          "enableProxyFallback": {
            "title": "Try a page again when it does not come back",
            "type": "boolean",
            "description": "On by default. Switched off, runs can come back with no results.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Apify proxy configuration",
            "type": "object",
            "description": "Optional. Add your own servers under Custom proxies if you want requests to go through them."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}