# Google Autocomplete Keyword Suggestions (`bin_ai_tools/google-autocomplete-keywords`) Actor

Google Autocomplete Keyword Suggestions bounded public-source results with success-only PPE.

- **URL**: https://apify.com/bin_ai_tools/google-autocomplete-keywords.md
- **Developed by:** [Bin Bin](https://apify.com/bin_ai_tools) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.40 / 1,000 autocomplete suggestion results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Autocomplete Keyword Suggestions

Get bounded keyword suggestions from Google's public Autocomplete endpoint for a small set of search prefixes. Optional recursive expansion (depth 1-3) and alphabet append build a bounded keyword tree with query provenance. This Actor does not estimate search volume, keyword difficulty, rankings, or traffic. It is not affiliated with Google.

### Quick start

```json
{
  "keywords": ["running shoes"],
  "country": "US",
  "language": "en",
  "appendAlphabet": false,
  "maxDepth": 0,
  "maxQueries": 20,
  "maxResults": 80
}
```

`keywords` accepts 1–12 prefixes. `maxDepth` is limited to 0–3, `maxQueries` to 1–60 public requests, and `maxResults` to 1–300 unique Dataset rows. `appendAlphabet=true` (or legacy `expandLetters=true`) adds bounded `a`–`z` prefixes. Recursive child queries inherit the same locale and are capped by `maxQueries`; every row records `query`, `depth`, `parentKeyword`, and `position`. Google may throttle or reject public requests; an empty or failed request is reported in `OUTPUT` and does not produce a paid result row.

### Output

Each Dataset row contains `suggestion`, `query`, `sourcePrefix`, `position`, `depth`, `parentKeyword`, `country`, `language`, `searchVolume: null` (this public source does **not** provide search-volume measurements), and `retrievedAt`. The Actor does **not** emit a query-URL field. The `OUTPUT` record is an object containing requested/accepted/invalid/duplicate keyword counts, query/result budgets, processed/failed tasks, delivered/billed counts, billing failures, charge-limit state and warnings.

### Pricing and billing

The official Apify monetization event is `suggestion-result` at **$0.0004 per successfully delivered row**. The Actor pushes a row first and calls the SDK charge event only for that row; a failed upstream request, duplicate suggestion, failed Dataset write, or zero-result request is not charged. There is no automatic Dataset-event charge configured in addition to this event. A charge receipt other than one result stops further paid delivery and is recorded in `OUTPUT`.

Current public build: `0.8.1` is the production `latest` build after this documentation refresh. The preceding bounded Owner verification delivered and charged 10 rows with no billing failures; this confirms the current build contract, not external customer revenue. Use this Actor for repeatable keyword expansion, not for search volume or ranking estimates.

# Actor input Schema

## `keywords` (type: `array`):

One or more public search prefixes used to request Google Autocomplete suggestions.

## `country` (type: `string`):

Two-letter country code used for the Google suggestion locale.

## `language` (type: `string`):

Two-letter language or language-region code used for the Google suggestion locale.

## `expandLetters` (type: `boolean`):

Legacy alias for appendAlphabet; adds bounded alphabetical expansions to each requested keyword.

## `appendAlphabet` (type: `boolean`):

Add bounded a-z suffix queries to each seed keyword.

## `maxDepth` (type: `integer`):

Maximum recursive suggestion depth. 0 returns direct suggestions; 1-3 expands child queries with provenance.

## `maxQueries` (type: `integer`):

Maximum number of public Google suggestion requests made in this run.

## `maxResults` (type: `integer`):

Maximum number of unique suggestion rows emitted by this run.

## Actor input object example

```json
{
  "keywords": [
    "running shoes"
  ],
  "country": "US",
  "language": "en",
  "expandLetters": false,
  "appendAlphabet": false,
  "maxDepth": 0,
  "maxQueries": 20,
  "maxResults": 80
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

Structured batch accounting is stored in the OUTPUT key-value record; nested properties are not accepted by Cloud schema validation.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "running shoes"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bin_ai_tools/google-autocomplete-keywords").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "keywords": ["running shoes"] }

# Run the Actor and wait for it to finish
run = client.actor("bin_ai_tools/google-autocomplete-keywords").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "running shoes"
  ]
}' |
apify call bin_ai_tools/google-autocomplete-keywords --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bin_ai_tools/google-autocomplete-keywords"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/3d44KfQcvCxIFZOuF/builds/cynCP6ks7Jj1vRNyK/openapi.json
