{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Autocomplete Suggestions API",
    "description": "Get Google autocomplete suggestions with relevance scores and types for keyword batches: A-Z, question, number and custom expansion, many countries and languages, depth 2. One clean JSON record per lookup for SEO and AI agents.",
    "version": "0.2",
    "x-build-id": "vGJt2bL1MwFi0weVR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~google-autocomplete-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-google-autocomplete-api",
        "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/khadinakbar~google-autocomplete-api/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-google-autocomplete-api",
        "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/khadinakbar~google-autocomplete-api/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-google-autocomplete-api",
        "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": "Seed queries",
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "description": "One to 50 starting phrases sent to Google autocomplete, such as `project management software` or `best running shoes`. The Actor trims and de-duplicates repeated phrases, then optionally expands them. Each phrase and each variant is one lookup.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          "language": {
            "title": "Suggestion language",
            "minLength": 2,
            "maxLength": 16,
            "type": "string",
            "description": "Language hint sent to Google, for example `en`, `es`, or `pt-BR`. Defaults to `en`. Use `languages` instead to query several languages in one run.",
            "default": "en"
          },
          "country": {
            "title": "Suggestion country",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "Two-letter country hint sent to Google, for example `US`, `GB`, or `PK`. Defaults to `US`. Use `countries` instead to query several countries in one run.",
            "default": "US"
          },
          "languages": {
            "title": "Languages (optional)",
            "type": "array",
            "description": "Optional list of up to 5 language codes, for example `en`, `de`, `fr`. Overrides `language`. Every language is combined with every country, and each combination is a separate lookup counted against `maxLookups`.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 16
            }
          },
          "countries": {
            "title": "Countries (optional)",
            "type": "array",
            "description": "Optional list of up to 5 two-letter country codes, for example `US`, `GB`, `DE`. Overrides `country`. Every country is combined with every language, and each combination is a separate lookup counted against `maxLookups`.",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          "expansionMode": {
            "title": "A-Z expansion mode",
            "enum": [
              "none",
              "suffix",
              "prefix",
              "both"
            ],
            "type": "string",
            "description": "Choose `none` for only the seed phrase, `suffix` for `seed a` through `seed z`, `prefix` for `a seed` through `z seed`, or `both`. Expansion discovers longer phrases but each variant is one lookup, so keep `maxLookups` small while exploring.",
            "default": "none"
          },
          "alphabet": {
            "title": "Expansion characters",
            "minLength": 1,
            "maxLength": 36,
            "type": "string",
            "description": "Unique single characters used only when prefix/suffix expansion is on, for example `abcdefghijklmnopqrstuvwxyz` or `abc123`. At most 36 unique letters or digits.",
            "default": "abcdefghijklmnopqrstuvwxyz"
          },
          "expansionPatterns": {
            "title": "Extra expansion patterns",
            "type": "array",
            "description": "Optional extra query variants for each seed: `questions` adds who/what/when/where/why/how/can/is/are/does/should/which in front, `prepositions` adds for/with/without/near/to/vs/like/versus after, `numbers` adds 0-9 after. Each variant is one lookup counted against `maxLookups`.",
            "items": {
              "type": "string",
              "enum": [
                "questions",
                "prepositions",
                "numbers"
              ]
            }
          },
          "customPatterns": {
            "title": "Custom patterns (optional)",
            "type": "array",
            "description": "Optional own patterns, up to 30. Use `{seed}` where the seed goes, for example `best {seed}` or `{seed} for kids`. A pattern without `{seed}` is added after the seed. Each pattern is one lookup per seed.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            }
          },
          "maxDepth": {
            "title": "Expansion depth",
            "minimum": 1,
            "maximum": 2,
            "type": "integer",
            "description": "`1` looks up only the seeds and their expansions. `2` also looks up each suggestion Google returned for a seed (highest relevance first) until `maxLookups` is reached. Depth 2 never goes beyond `maxLookups`.",
            "default": 1
          },
          "maxSuggestionsPerLookup": {
            "title": "Max suggestions per lookup",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Keeps only the first N suggestions of each lookup, in Google order. Google returns up to 15. Does not change the price: a lookup is one event.",
            "default": 15
          },
          "minRelevance": {
            "title": "Minimum relevance score",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Drops suggestions whose Google relevance score is below this value (scores are about 500 to 1300, higher is stronger). `0` keeps everything. A lookup whose suggestions are all removed by your filters is not saved and not charged.",
            "default": 0
          },
          "dedupeSuggestions": {
            "title": "Remove repeated suggestions",
            "type": "boolean",
            "description": "Keeps each suggestion only once per language and country across the whole run. A lookup left with no new suggestion is not saved and not charged.",
            "default": false
          },
          "onlyWithSeedWords": {
            "title": "Only suggestions containing seed words",
            "type": "boolean",
            "description": "Drops suggestions that do not contain every word of the seed. Google sometimes fills the list with loosely related phrases.",
            "default": false
          },
          "maxLookups": {
            "title": "Maximum autocomplete lookups",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard maximum number of lookups in this run, including seeds, expansions, every language and country combination, and depth 2. Defaults to 100, caps at 500. Each lookup saved is one billed event, so this is your cost ceiling.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}