{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Search Scraper: $1.50/1k SERP pages",
    "description": "Scrape Google search at $1.50 per 1,000 SERP pages, 40% cheaper than the leading Apify alternative. Returns organic results, paid ads, People Also Ask with pre-rendered answers, related queries, featured snippet, AI Overview body + sources. Built in Go.",
    "version": "1.0",
    "x-build-id": "0lpE11Y1dNyfIuEJn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/santamaria-automations~google-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-santamaria-automations-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/santamaria-automations~google-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-santamaria-automations-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/santamaria-automations~google-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-santamaria-automations-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": "array",
            "description": "Keywords or phrases to search on Google (one per line). Each runs as a separate search. Results across queries are returned in a single dataset.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Google Search URLs",
            "type": "array",
            "description": "Optional: paste Google search URLs directly (e.g. https://www.google.com/search?q=python+tutorial&gl=us). All filters in the URL are preserved.",
            "items": {
              "type": "string"
            }
          },
          "countryCode": {
            "title": "Country Code",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code to localise the search (e.g. 'us', 'gb', 'de', 'au'). Determines which regional results Google returns.",
            "default": "us"
          },
          "languageCode": {
            "title": "Language Code",
            "type": "string",
            "description": "Language code for the SERP UI and results (e.g. 'en', 'de', 'fr', 'es'). Defaults to English.",
            "default": "en"
          },
          "resultsPerPage": {
            "title": "Results Per Page",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "Number of results to request per page (10 to 100). Default 10 gives the richest output (Google includes pre-rendered PAA answers, AI Overview source descriptions, and more on the smaller-num SERPs). Set to 100 if you want more results per request and don't mind a slimmer feature set.",
            "default": 10
          },
          "maxPagesPerQuery": {
            "title": "Max Pages Per Query",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many SERP pages to fetch per query. Increase to get more results (10 pages × 100 results = ~1,000 results per query).",
            "default": 1
          },
          "mobileResults": {
            "title": "Mobile Results",
            "type": "boolean",
            "description": "Use Google's mobile interface instead of desktop. Mobile SERPs sometimes show different result sets and ad placements.",
            "default": false
          },
          "forceExactMatch": {
            "title": "Force Exact Match",
            "type": "boolean",
            "description": "Wrap each query in quotes (\"...\") so Google only returns results containing the exact phrase. Equivalent to Google's verbatim mode.",
            "default": false
          },
          "includePeopleAlsoAsk": {
            "title": "Include People Also Ask",
            "type": "boolean",
            "description": "Extract the 'People Also Ask' questions shown on the first SERP page. Returned in the peopleAlsoAsk array of each page record.",
            "default": true
          },
          "includeRelatedSearches": {
            "title": "Include Related Searches",
            "type": "boolean",
            "description": "Extract related search suggestions from the bottom of the first SERP page. Returned in the relatedQueries array of each page record.",
            "default": true
          },
          "saveHtmlToKeyValueStore": {
            "title": "Save Raw HTML",
            "type": "boolean",
            "description": "Save the raw HTML of each SERP page to the default Key-Value Store. The output record will include a kvsHtmlUrl pointing at the saved file. Useful for debugging or extracting custom fields not parsed by the actor.",
            "default": false
          },
          "extractAds": {
            "title": "Extract Paid Results (Ads) Add-on",
            "type": "boolean",
            "description": "Enable comprehensive paid-results extraction. Google rotates ads aggressively, so the actor retries each query with rotated proxy sessions up to two more times and merges any new ads found. Adds one billable ads-extraction-attempt event per SERP page ($1.50 per 1,000 pages). Recommended only on queries where ads matter (commerce, comparison, lead-gen).",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}