{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Autocomplete Keyword Expansion Scraper",
    "description": "Expand seed keywords into long-tail suggestions using Google's autocomplete, with question-word, preposition, comparison, and A-to-Z expansion modes across any country and language.",
    "version": "1.0",
    "x-build-id": "9hAh7UqGFMaiIDlEq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~google-autocomplete-keyword-expansion-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-google-autocomplete-keyword-expansion-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/dataspryva~google-autocomplete-keyword-expansion-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-google-autocomplete-keyword-expansion-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/dataspryva~google-autocomplete-keyword-expansion-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-google-autocomplete-keyword-expansion-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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Seed keywords",
            "type": "array",
            "description": "One or more seeds. 1-3 word seeds return the most suggestions. Each seed is expanded according to `mode`.",
            "default": [
              "python tutorial"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Expansion mode",
            "enum": [
              "all",
              "exact",
              "alphabet",
              "questions",
              "modifiers",
              "prepositions",
              "comparisons",
              "related"
            ],
            "type": "string",
            "description": "How each seed is expanded. `all` runs every strategy; `exact` queries only the seed; `alphabet` adds a-z and 0-9 before and after; `questions` uses locale question words; `modifiers` adds prepositions and buyer-intent words; `related` adds trailing-space, wildcard, local, review and price variants.",
            "default": "all"
          },
          "country": {
            "title": "Country (gl)",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "NZ",
              "IE",
              "DE",
              "FR",
              "ES",
              "IT",
              "NL",
              "BE",
              "AT",
              "CH",
              "PT",
              "GR",
              "CZ",
              "PL",
              "SE",
              "NO",
              "DK",
              "FI",
              "HU",
              "RO",
              "BG",
              "HR",
              "SK",
              "SI",
              "EE",
              "LV",
              "LT",
              "LU",
              "MT",
              "CY",
              "IS",
              "LI",
              "MC",
              "AD",
              "SM",
              "JP",
              "KR",
              "CN",
              "TW",
              "HK",
              "MO",
              "IN",
              "PK",
              "BD",
              "LK",
              "NP",
              "AF",
              "ID",
              "TH",
              "VN",
              "PH",
              "MY",
              "SG",
              "BN",
              "MM",
              "KH",
              "LA",
              "TL",
              "BR",
              "MX",
              "AR",
              "CL",
              "CO",
              "PE",
              "VE",
              "EC",
              "BO",
              "PY",
              "UY",
              "GT",
              "CR",
              "PA",
              "DO",
              "PR",
              "CU",
              "SV",
              "HN",
              "NI",
              "JM",
              "TT",
              "BB",
              "RU",
              "TR",
              "UA",
              "BY",
              "KZ",
              "UZ",
              "AZ",
              "AM",
              "GE",
              "MD",
              "RS",
              "BA",
              "MK",
              "AL",
              "ME",
              "XK",
              "ZA",
              "NG",
              "EG",
              "MA",
              "DZ",
              "TN",
              "KE",
              "GH",
              "ET",
              "UG",
              "TZ",
              "RW",
              "ZW",
              "SN",
              "CI",
              "CM",
              "MZ",
              "AO",
              "ZM",
              "AE",
              "SA",
              "IL",
              "QA",
              "KW",
              "BH",
              "OM",
              "JO",
              "LB",
              "SY",
              "IQ",
              "IR",
              "YE",
              "PS",
              "ALL"
            ],
            "type": "string",
            "description": "Google market used for the `gl` parameter. Changes ranking and local phrasing. 134 markets were verified against the live endpoint; the legacy `ALL` value maps to US.",
            "default": "US"
          },
          "language": {
            "title": "Language (hl)",
            "enum": [
              "en",
              "es",
              "fr",
              "de",
              "it",
              "pt",
              "nl",
              "pl",
              "sv",
              "no",
              "da",
              "fi",
              "cs",
              "el",
              "hu",
              "ro",
              "bg",
              "hr",
              "sk",
              "sl",
              "et",
              "lv",
              "lt",
              "ga",
              "is",
              "mt",
              "ru",
              "uk",
              "be",
              "sr",
              "bs",
              "mk",
              "sq",
              "ar",
              "tr",
              "he",
              "fa",
              "ur",
              "ku",
              "ja",
              "ko",
              "zh-CN",
              "zh-TW",
              "hi",
              "bn",
              "ta",
              "te",
              "ml",
              "mr",
              "gu",
              "kn",
              "pa",
              "ne",
              "si",
              "my",
              "id",
              "th",
              "vi",
              "ms",
              "tl",
              "km",
              "lo",
              "sw",
              "am",
              "ha",
              "yo",
              "ig",
              "zu",
              "xh",
              "af",
              "az",
              "kk",
              "uz",
              "ky",
              "tg",
              "mn",
              "ka",
              "hy"
            ],
            "type": "string",
            "description": "Language used for the `hl` parameter and for the locale-aware question and modifier words. 19 languages have native expansion vocabularies; the rest fall back to English modifiers.",
            "default": "en"
          },
          "source": {
            "title": "Google surface",
            "enum": [
              "web",
              "youtube",
              "shopping",
              "all"
            ],
            "type": "string",
            "description": "Which Google autocomplete surface to query: web, YouTube or Shopping. `all` runs all three and multiplies the request count.",
            "default": "web"
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard cap on dataset records across all seeds and sources. Flat mode counts suggestions; tree mode counts one record per seed/source.",
            "default": 5000
          },
          "maxSuggestionsPerSeed": {
            "title": "Max suggestions per seed",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on suggestions collected for one seed, applied after all expansion queries have run. Defaults to 2,000 when omitted (legacy maxItemsPerKeyword is honoured)."
          },
          "minLength": {
            "title": "Min characters",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Drop suggestions shorter than this many characters."
          },
          "maxLength": {
            "title": "Max characters",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Drop suggestions longer than this many characters."
          },
          "containsKeyword": {
            "title": "Must contain",
            "type": "string",
            "description": "Keep only suggestions containing this substring (case-insensitive). Prefix with `!` to exclude matches instead."
          },
          "outputFormat": {
            "title": "Output shape",
            "enum": [
              "flat",
              "tree"
            ],
            "type": "string",
            "description": "`flat` emits one row per suggestion. `tree` emits one row per seed and source with a nested suggestions array (the legacy shape).",
            "default": "flat"
          },
          "expansionDepth": {
            "title": "Recursion depth",
            "enum": [
              "0",
              "1",
              "2"
            ],
            "type": "string",
            "description": "Re-query the first 15 discovered suggestions to go one or two levels deeper. Off for the cheapest run.",
            "default": "0"
          },
          "dedupeAcrossSeeds": {
            "title": "Dedupe across seeds",
            "type": "boolean",
            "description": "Emit a phrase only once per run. Off keeps every seed complete; on removes overlaps between seeds.",
            "default": false
          },
          "includeIntent": {
            "title": "Add intent tags",
            "type": "boolean",
            "description": "Add a deterministic intent tag (question, comparison, local, transactional, commercial, informational) where a language vocabulary matches.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}