{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Keyword Suggestions Scraper",
    "description": "Collect public Google Suggest autocomplete suggestions with seed context and optional source-backed web, video, question, and related-search results from Google Search pages.",
    "version": "2.0",
    "x-build-id": "eFH9h179PF3CD0cgj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/googleapi~google-keyword-suggestions-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-googleapi-google-keyword-suggestions-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/googleapi~google-keyword-suggestions-scraper/runs": {
      "post": {
        "operationId": "runs-sync-googleapi-google-keyword-suggestions-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/googleapi~google-keyword-suggestions-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-googleapi-google-keyword-suggestions-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": {
          "renderJavaScript": {
            "title": "Render Search pages when necessary",
            "type": "boolean",
            "description": "When optional Search enrichment is enabled, render a JavaScript or unrecognized result page once in ordinary Chrome using the same requested proxy. Boundaries stop extraction. Browser rendering requires at least 1024 MB; disable for HTTP-only runs.",
            "default": true
          },
          "keywords": {
            "title": "Seed keywords",
            "maxItems": 100,
            "type": "array",
            "description": "One or more seed phrases. Use this field or a compatibility alias.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            },
            "default": [
              "python tutorial"
            ]
          },
          "queries": {
            "title": "Seed keywords alias",
            "maxItems": 100,
            "type": "array",
            "description": "Compatibility alias for the keywords array.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            }
          },
          "query": {
            "title": "Single keyword alias",
            "maxLength": 300,
            "type": "string",
            "description": "Compatibility alias for one seed phrase."
          },
          "searchQuery": {
            "title": "Search keyword alias",
            "maxLength": 300,
            "type": "string",
            "description": "Compatibility alias for one seed phrase."
          },
          "mode": {
            "title": "Expansion mode",
            "enum": [
              "exact",
              "all",
              "questions",
              "prepositions",
              "comparisons",
              "alphabet"
            ],
            "type": "string",
            "description": "Generates additional public Suggest requests from each seed.",
            "default": "all"
          },
          "country": {
            "title": "Google country",
            "pattern": "^(ALL|[A-Za-z]{2})$",
            "type": "string",
            "description": "Two-letter Google gl country code, or ALL to omit gl.",
            "default": "US"
          },
          "language": {
            "title": "Google language",
            "pattern": "^[A-Za-z][A-Za-z-]{1,19}$",
            "type": "string",
            "description": "Google hl language code used for the Suggest response.",
            "default": "en"
          },
          "maxItemsPerKeyword": {
            "title": "Maximum suggestions per seed",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum unique suggestions retained for each seed after deduplication and filters.",
            "default": 200
          },
          "minLength": {
            "title": "Minimum suggestion length",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Drop suggestions shorter than this many characters."
          },
          "maxLength": {
            "title": "Maximum suggestion length",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Drop suggestions longer than this many characters."
          },
          "containsKeyword": {
            "title": "Suggestion text filter",
            "maxLength": 200,
            "type": "string",
            "description": "Keep suggestions containing this text; prefix with ! to exclude matches."
          },
          "includeSearchResults": {
            "title": "Enrich with Google Search results",
            "type": "boolean",
            "description": "Fetch one public Google Search results page for each eligible suggestion. Disabled by default because this adds external requests and runtime cost.",
            "default": false
          },
          "maxSearchResultRequests": {
            "title": "Maximum Google Search result pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Global cap on distinct Google Search pages fetched for suggestion enrichment. Duplicate suggestions reuse the same fetched result data.",
            "default": 10
          },
          "maxSearchResultsPerType": {
            "title": "Maximum results per result type",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum retained organic results, videos, People also ask questions, and related searches from each Google Search page.",
            "default": 10
          },
          "maxSearchResponseBytes": {
            "title": "Google Search page size limit",
            "minimum": 100000,
            "maximum": 10000000,
            "type": "integer",
            "description": "Maximum bytes read from each optional Google Search results page.",
            "default": 4000000
          },
          "outputFormat": {
            "title": "Output shape",
            "enum": [
              "flat",
              "tree"
            ],
            "type": "string",
            "description": "Flat emits one dataset row per suggestion; tree emits one row per seed with source suggestion objects nested.",
            "default": "flat"
          },
          "maxItems": {
            "title": "Maximum dataset rows",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Global cap across all seeds. In flat mode each suggestion is a row; in tree mode each seed is a row.",
            "default": 25
          },
          "page": {
            "title": "Starting expansion request",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "One-based offset into the generated expansion-query list for each seed. Google Suggest itself does not expose numbered result pages.",
            "default": 1
          },
          "maxPages": {
            "title": "Maximum expansion requests per seed",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Maximum generated Suggest requests to make for each seed from the selected starting expansion request. Bound by the expansion mode.",
            "default": 40
          },
          "requestDelayMs": {
            "title": "Delay between requests",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Polite delay in milliseconds between public Suggest requests and optional Google Search page requests.",
            "default": 200
          },
          "timeoutMs": {
            "title": "Request timeout",
            "minimum": 5000,
            "maximum": 120000,
            "type": "integer",
            "description": "Abort a public Suggest or optional Google Search request after this many milliseconds.",
            "default": 30000
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Bounded retries for transient Suggest or Google Search request failures. Access boundaries are not retried.",
            "default": 2
          },
          "maxResponseBytes": {
            "title": "Maximum response bytes",
            "minimum": 100000,
            "maximum": 10000000,
            "type": "integer",
            "description": "Upper bound for each response body.",
            "default": 1000000
          },
          "searchProxyConfiguration": {
            "title": "Optional Search-only proxy",
            "type": "object",
            "description": "Default off: Search shares the main proxy. Explicitly enable this separate route for Search only; GOOGLE_SERP uses the documented HTTP-only, no-session protocol. Autocomplete stays on the main route. No automatic route switching or direct fallback.",
            "default": {
              "useApifyProxy": false
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Applies to Suggest and optional Search HTTP requests. Use account-enabled groups or custom URLs. Residential routing requires account access. No silent direct fallback; omit or explicitly disable for direct access. JavaScript interstitials remain access boundaries."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}