{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search SERP Scraper",
    "description": "Scrape Google Search pages for keywords or google.com/search URLs: position, title, URL, displayed URL, site name and snippet per organic result, by country and language. Optional ads, People Also Ask, related searches and AI Overview flag are saved to a separate serp-pages dataset.",
    "version": "0.0",
    "x-build-id": "4OvgZCl9EJ81uWxHF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axiomworks~google-search-results-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axiomworks-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/axiomworks~google-search-results-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axiomworks-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/axiomworks~google-search-results-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axiomworks-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",
        "required": [
          "queries"
        ],
        "properties": {
          "queries": {
            "title": "Search terms or Google search URLs",
            "type": "array",
            "description": "Search phrases, e.g. [\"web scraping api\"], or full Google /search URLs, e.g. [\"https://www.google.com/search?q=apify&gl=gb&hl=en\"]. URL q, gl, hl, start and supported tbs parameters override search settings. Required; provide at least one non-empty string.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum dataset rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Limit total dataset rows across all queries, including enabled serpPage rows. Integer 1-10000, default 100; e.g. 7. The run can return fewer when searches have fewer results.",
            "default": 100
          },
          "maxPagesPerQuery": {
            "title": "Maximum pages per search",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Fetch 1-10 pages per query, default 1; e.g. 2. Each page contains up to 10 organic results, often fewer. A URL with start=10 begins at page 2; this limit counts pages from that starting point.",
            "default": 1
          },
          "countryCode": {
            "title": "Search country code",
            "type": "string",
            "description": "Set the Google gl country parameter with a two-letter country code, e.g. \"us\", \"de\" or \"gb\". Default \"us\". A search URL gl parameter overrides this value.",
            "default": "us"
          },
          "languageCode": {
            "title": "Search language code",
            "type": "string",
            "description": "Set the Google hl interface language, e.g. \"en\", \"de\" or \"pt-br\". Accepts two or three letters with an optional language suffix. Default \"en\". A search URL hl parameter overrides this value.",
            "default": "en"
          },
          "timePeriod": {
            "title": "Result age filter",
            "enum": [
              "any",
              "hour",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Choose \"any\", \"hour\", \"day\", \"week\", \"month\" or \"year\"; e.g. \"week\" limits results to the past week. Default \"any\" disables the filter. A search URL tbs=qdr: parameter overrides this setting.",
            "default": "any"
          },
          "resolveUrls": {
            "title": "Resolve Google redirect links",
            "type": "boolean",
            "description": "Set true to resolve Google redirect links to target URLs using lightweight requests, e.g. true (default). Set false to retain redirect links. If resolution fails, url retains the Google link; destination websites are not visited.",
            "default": true
          },
          "includeSerpFeatures": {
            "title": "Include SERP page rows",
            "type": "boolean",
            "description": "Set true to add recordType \"serpPage\" rows to the default dataset with paidResults, peopleAlsoAsk, relatedQueries, resultsTotal and hasAiOverview; e.g. true. Default false. These rows count toward maxItems and use the serp-page event.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel result pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Process 1-10 result pages concurrently, default 3; e.g. 1 for a slower run when Google blocks requests. This controls page processing, not the number of results.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Search request proxy settings",
            "type": "object",
            "description": "Choose Apify Proxy or custom proxy URLs, e.g. {\"useApifyProxy\":true,\"apifyProxyGroups\":[\"RESIDENTIAL\"]} (default). With Apify Proxy, HTTP search uses GOOGLE_SERP first; browser fallback uses these settings. Residential browser proxies are recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}