{
  "openapi": "3.0.1",
  "info": {
    "title": "Google SERP Scraper",
    "description": "Scrape Google search results (organic, ads, People Also Ask, AI Overview, local pack and more) for any keyword, location, language and device. Powered by the DataForSEO SERP API.",
    "version": "0.1",
    "x-build-id": "eNDCnH6Y5YoCKETN5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataforseo~google-serp-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataforseo-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/dataforseo~google-serp-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dataforseo-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/dataforseo~google-serp-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dataforseo-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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search queries",
            "pattern": "\\S",
            "type": "string",
            "description": "The search terms to look up on Google — one per line. Each query can be up to 700 characters.\n\nYou can use Google search operators (for example `site:example.com pricing` or `intitle:review`). Queries that contain an operator cost more per results page."
          },
          "depth": {
            "title": "Results per query",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "How many organic results to fetch for each query. Must be between 10 and 100, in steps of 10.\n\n**This affects cost.** You are charged per results page (10 results = 1 page).",
            "default": 10
          },
          "location": {
            "title": "Location",
            "enum": [
              "United States",
              "United Kingdom",
              "Canada",
              "Australia",
              "Ireland",
              "New Zealand",
              "Germany",
              "France",
              "Spain",
              "Italy",
              "Netherlands",
              "Belgium",
              "Switzerland",
              "Austria",
              "Portugal",
              "Sweden",
              "Norway",
              "Denmark",
              "Finland",
              "Poland",
              "Ukraine",
              "Czechia",
              "Romania",
              "Hungary",
              "Greece",
              "Turkey",
              "India",
              "Singapore",
              "Indonesia",
              "Malaysia",
              "Philippines",
              "Thailand",
              "Vietnam",
              "Japan",
              "South Korea",
              "China",
              "Brazil",
              "Mexico",
              "Argentina",
              "United Arab Emirates",
              "Saudi Arabia",
              "Israel",
              "South Africa",
              "Nigeria",
              "Egypt"
            ],
            "type": "string",
            "description": "The country to search from. This sets which local version of Google is queried, so results match what a searcher in that country would see.\n\nNeed a specific region or city (for example `London,England,United Kingdom`)? Pick any country here and override it via the API — the Actor accepts any location supported by the data source and tells you clearly if a location can't be matched.",
            "default": "United States"
          },
          "language": {
            "title": "Language",
            "enum": [
              "English",
              "Spanish",
              "Portuguese",
              "Portuguese (Brazil)",
              "French",
              "German",
              "Italian",
              "Dutch",
              "Polish",
              "Ukrainian",
              "Russian",
              "Czech",
              "Slovak",
              "Romanian",
              "Hungarian",
              "Bulgarian",
              "Croatian",
              "Serbian",
              "Greek",
              "Turkish",
              "Swedish",
              "Norwegian",
              "Danish",
              "Finnish",
              "Hebrew",
              "Arabic",
              "Hindi",
              "Indonesian",
              "Thai",
              "Vietnamese",
              "Japanese",
              "Korean",
              "Chinese (Simplified)",
              "Chinese (Traditional)"
            ],
            "type": "string",
            "description": "The interface language of the Google search. This influences the wording of results and features like AI Overview.",
            "default": "English"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile"
            ],
            "type": "string",
            "description": "Whether to return results as seen on a desktop or a mobile device. Mobile results can differ in ranking and in which SERP features appear.",
            "default": "desktop"
          },
          "peopleAlsoAskDepth": {
            "title": "People Also Ask — expansion depth",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "How deep to expand the \"People Also Ask\" box. `0` returns the box as shown on the page without opening the nested questions. Values from 1 to 4.\n\n**This affects cost.**",
            "default": 0
          },
          "includeAiOverview": {
            "title": "Include AI Overview  (paid add-on)",
            "type": "boolean",
            "description": "Google's AI Overview is included in your results for free whenever Google shows one. **Turn this paid add-on on to additionally fetch AI Overviews that Google loads asynchronously.**",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}