{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Scraper: SERP API with AI Overview, Ads, PAA",
    "description": "Google search results by query or URL: organic results with position, title, real URL, displayed URL, snippet, date and sitelinks, plus ads, People Also Ask, related searches, AI Overview text and knowledge panel. One row per page or per result. Any country and language. No login.",
    "version": "0.1",
    "x-build-id": "OiiIir3kL6P2TSjOo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~google-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-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/themineworks~google-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-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/themineworks~google-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-google-search-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Queries or Google search URLs",
            "type": "array",
            "description": "One per line. A query is typed as you would in Google, operators included (site:, intitle:, \"quotes\", -word). You can also paste a Google search link such as https://www.google.com/search?q=crm+software&tbs=qdr:m; its own filters, country and language are kept. Up to 1,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "countryCode": {
            "title": "Country (gl)",
            "pattern": "^[A-Za-z]{2}$",
            "type": "string",
            "description": "Two letter country code that Google ranks the results for, for example us, gb, de, in, au. A pasted link's own gl wins.",
            "default": "us"
          },
          "languageCode": {
            "title": "Interface language (hl)",
            "type": "string",
            "description": "Google interface language, for example en, de, fr, es, pt-BR. A pasted link's own hl wins.",
            "default": "en"
          },
          "maxPagesPerQuery": {
            "title": "Pages per query",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many results pages to read for each query, 1 to 20. Google serves 10 organic results a page, so 3 pages is about the top 30. Reading stops early when Google has no next page. You pay per page read.",
            "default": 1
          },
          "resultsPerPage": {
            "title": "Organic results kept per page",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Keep only the top N organic results of each page, 1 to 10. Google itself serves 10 a page and ignores larger num values since September 2025. A lower number makes each page faster (fewer links to resolve); the price per page is the same.",
            "default": 10
          },
          "outputFormat": {
            "title": "Rows",
            "enum": [
              "pages",
              "results"
            ],
            "type": "string",
            "description": "pages: one row per results page, with organic results, ads, questions, related searches, AI Overview and knowledge panel as nested fields. results: one flat row per organic result (best for spreadsheets and rank tracking). Same price per page either way.",
            "default": "pages"
          },
          "resolveUrls": {
            "title": "Resolve result links",
            "type": "boolean",
            "description": "On most pages Google hides each result's link behind a redirect. On: each one is followed once so url holds the real address (adds about 1 to 2 seconds a page, no extra charge). Off: faster; url is filled only where Google shows it, while domain and displayed_url are always filled.",
            "default": true
          },
          "googleDomain": {
            "title": "Google domain",
            "type": "string",
            "description": "Google site to search, for example google.com, google.co.uk, google.de. Country (gl) sets the ranking; the domain rarely changes it.",
            "default": "google.com"
          },
          "location": {
            "title": "Location (city or region)",
            "type": "string",
            "description": "Optional. A Google location name such as Austin,Texas,United States or London,England,United Kingdom, or a ready uule code. Empty: the actor searches as a visitor in the chosen country, so results are not mixed with the proxy's own country."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}