# Google Autocomplete Scraper: Keyword Ideas & Questions (`ocius-data/google-autocomplete-keyword-ideas`) Actor

Google Autocomplete API: keyword ideas, questions and long-tail suggestions from Google, YouTube and Shopping in any country. AI agents ready via MCP.

- **URL**: https://apify.com/ocius-data/google-autocomplete-keyword-ideas.md
- **Developed by:** [Ocius Data](https://apify.com/ocius-data) (community)
- **Categories:** SEO tools, Agents
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.02 / 1,000 keyword ideas

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Ideas: Search, YouTube, Shopping

**What the leading autocomplete scrapers do not give you:** keyword ideas already grouped into **topic clusters**, with a rule-based **intent hint** on every row and a ready-to-read INSIGHTS record and status message at the end of every run (clusters, questions, and the ideas returned by the most queries).

Get **long-tail keyword ideas from Google Autocomplete** for any keyword, country and language. Choose **Google Search, YouTube or Google Shopping** suggestions, then expand each keyword with **A-Z letters, 0-9 numbers, question words and prepositions** ("alphabet soup"), and go one level deeper with **depth 2**. Each idea comes with Google's own **relevance score**, its **position**, the **modifier** that surfaced it and a link to the live search results. Every idea is **unique**: duplicates across modifiers and keywords are removed before you pay.

The default input (one keyword, A-Z expansion) returns about 370 ideas in under 10 seconds, so it works well as a tool for AI agents and in automated workflows.

### What this keyword idea tool does

- **Three sources in one run.** Google Search, YouTube and Google Shopping autocomplete. YouTube ideas show what people want to watch; Shopping ideas show product and brand demand.
- **Alphabet soup expansion.** `keyword a` to `keyword z`, `keyword 0` to `keyword 9`, question words before the keyword (who, what, when, where, why, how, which, can, is, are, does) and prepositions after it (for, with, without, near, vs, to, like).
- **Localized questions and prepositions.** English, Spanish, Portuguese, French, German and Italian each use their own words, for example `como`, `que`, `para`, `sin` in Spanish. Add your own with **Custom modifiers**, such as `price`, `near me` or `best {keyword} for`.
- **Depth 2.** Each depth-1 idea is sent back to Google to find longer, more specific phrases, until the per-keyword limit you set.
- **Any country and language.** Two-letter country codes (`US`, `GB`, `CO`, `ES`, `MX`, `DE`...) and language codes (`en`, `es`, `pt`, `en-GB`...). Several countries in one run, each with its own suggestions.
- **15 ideas per request with Google's relevance score.** The Actor uses the richer suggest format (15 suggestions and a relevance score) and falls back automatically to the basic format (10 suggestions) if Google changes it.
- **Pay only for unique ideas.** The seed itself, repeated phrases and failed requests are never charged.
- **Reliable by design.** Every request is retried with exponential backoff and a fresh IP. If Google keeps blocking, the Actor switches from datacenter to residential proxies. Progress survives platform restarts without duplicates or double charges.

### Use cases

- **SEO keyword research.** Build long-tail keyword lists and topic clusters for a niche in minutes.
- **Content planning.** Use `isQuestion` to pull the questions people ask and turn them into FAQ sections, blog posts and video scripts.
- **YouTube SEO.** Find the titles and topics people search for on YouTube.
- **E-commerce and PPC.** Use Shopping ideas to find product modifiers, brands and buying intent for product pages and ad campaigns.
- **International SEO.** Compare what people search in Colombia, Spain and Mexico for the same keyword.
- **AI agents and automations.** Give an agent a seed keyword and get a structured, deduplicated keyword list back in seconds.

### How to use it

1. Enter one or more **keywords**.
2. Choose the **sources**: Google Search (default), YouTube and/or Google Shopping.
3. Choose the **expansion modifiers**: letters (default), numbers, questions, prepositions. Leave the list empty to get only the suggestions for the keyword itself.
4. Set the **countries** and the **language**.
5. Optional: set **depth** to 2 and a **maximum number of ideas per keyword**.

Suggestions for the keyword only (fastest, cheapest):

```json
{
  "keywords": ["air conditioner", "heat pump"],
  "modifiers": []
}
```

Full alphabet soup with questions, three sources, three Spanish-speaking countries:

```json
{
  "keywords": ["aire acondicionado"],
  "sources": ["web", "youtube", "shopping"],
  "modifiers": ["letters", "questions", "prepositions"],
  "countries": ["CO", "ES", "MX"],
  "language": "es"
}
```

Deep long-tail research (depth 2), capped at 1,500 ideas:

```json
{
  "keywords": ["heat pump"],
  "modifiers": ["letters", "questions"],
  "depth": 2,
  "maxSuggestionsPerKeyword": 1500
}
```

#### How many requests and ideas to expect

| Setting | Requests per keyword, country and source | Typical unique ideas |
|---|---|---|
| No modifiers | 1 | 10-15 |
| Letters | 27 | 250-400 |
| Letters + numbers + questions + prepositions | about 55 | 500-750 |
| Depth 2 | depth-1 requests + 1 per depth-1 idea, until the limit | up to your limit |

Measured in November 2026 with English and Spanish keywords. Niche keywords return fewer ideas.

### Output

One row per unique idea. Download as JSON, CSV, Excel or HTML, or read it through the API. The **Keyword ideas** view shows the main fields, now with `theme` and `intentHint`; **All fields** shows everything. Every column has a label and a format. The Output tab also links each view, a one-click CSV download and the INSIGHTS and RUN_SUMMARY records.

#### What you see when the run ends

The status message summarizes the run with numbers from that run, for example: `Saved 382 unique keyword ideas. 73 topic clusters (largest: "not", 12 ideas); strongest idea: "air conditioner capacitor", returned by 3 queries. See the INSIGHTS record.` (default input, 3 November 2026)

#### Typical job cost and speed

Prices come from the live pricing of this Actor (USD 0.000025 per unique idea on the Free and Bronze plans) and platform compute is included in them. A measured run of the default input (`air conditioner`, United States, 3 November 2026) saved 382 ideas, charged 382 `keyword-idea` events (about USD 0.01) and finished in about 8 to 15 seconds. 10,000 ideas cost about USD 0.25.

```json
{
  "seed": "air conditioner",
  "suggestion": "air conditioner troubleshooting",
  "source": "web",
  "modifier": "t",
  "modifierType": "letter",
  "depth": 1,
  "position": 10,
  "relevance": 555,
  "suggestionType": "QUERY",
  "query": "air conditioner t",
  "parentKeyword": null,
  "wordCount": 3,
  "isQuestion": false,
  "country": "US",
  "language": "en",
  "searchUrl": "https://www.google.com/search?q=air%20conditioner%20troubleshooting&gl=us&hl=en",
  "scrapedAt": "2026-11-01T23:45:07.865Z"
}
```

#### Field dictionary

| Field | Type | Meaning | When it is null |
|---|---|---|---|
| `seed` | string | The keyword from your input that produced the idea. | Never |
| `suggestion` | string | The keyword idea, exactly as Google suggests it. | Never |
| `source` | string | `web` (Google Search), `youtube` or `shopping`. | Never |
| `modifier` | string | The letter, number, word or custom text added to the keyword, for example `a`, `7`, `how`, `for`. | Suggestions for the keyword itself and depth-2 ideas |
| `modifierType` | string | `letter`, `number`, `question`, `preposition` or `custom`. | Same as `modifier` |
| `depth` | integer | `1` for suggestions of the keyword and its modifiers, `2` for suggestions of a depth-1 idea. | Never |
| `position` | integer | Position in Google's list for that request, from 1 (top). | Never |
| `relevance` | integer | Google's relevance score for the suggestion; higher means Google ranks it higher. Compare it within a request, not across requests. | When Google returned the basic format |
| `suggestionType` | string | Google's type for the suggestion, usually `QUERY`. | When Google returned the basic format |
| `query` | string | The exact text sent to Google, for example `how air conditioner`. | Never |
| `parentKeyword` | string | For depth-2 ideas, the depth-1 idea that was expanded. | Depth 1 |
| `wordCount` | integer | Number of words in the suggestion; 4 or more usually means long-tail. | Never |
| `isQuestion` | boolean | `true` when the idea starts with a question word in English or in the selected language. | Never |
| `country`, `language` | string | The country and language used. | Never |
| `searchUrl` | string | Link to the live results for the idea in Google Search, YouTube or Google Shopping. | Never |
| `scrapedAt` | ISO 8601 | When the data was collected (UTC). | Never |
| `addedWords` | string | The words the idea adds to the seed, for example `repair near me`. | When the idea only reorders the seed words |
| `theme` | string | The first meaningful word the idea adds to the seed. Ideas that share a theme form a topic cluster in the INSIGHTS record. | When the idea adds no meaningful word |
| `intentHint` | string | Rule-based hint: `informational` (questions), `local` (near me), `commercial` (best, price, buy, review, vs), `navigational` (login, app, download) or `other`. English, Spanish, Portuguese, French and German words are recognized. | Never |
| `charCount` | integer | Number of characters in the idea. | Never |
| `warnings` | array | Data-quality flags: `NO_RELEVANCE_SCORE` (Google sent the basic format), `SAME_WORDS_AS_SEED`. | Empty when nothing is missing |

The new fields are computed from the suggestion itself; they add no requests and no cost.

#### Key-value store records

| Record | Contents |
|---|---|
| `INSIGHTS` | `keywordIdeas`, `questions` and `clusters` totals, and one entry per keyword, country and source in `seeds`: `keywordIdeas`, `questions` (up to 25) and `questionsCount`, `longTailIdeas` (4 or more words), `intentMix`, `clustersCount` and `clusters` (theme, ideas, up to 5 examples; themes with 2 or more ideas), `topByRelevance` and `mostSurfaced` (the ideas returned by the most queries in the run, a strength signal, not search volume). Built from every row in the dataset. |
| `RUN_SUMMARY` | `status`, `counts` (keywords per status), `keywordIdeasSaved`, `eventsCharged`, `reconciliation` (rows against charged events), `requests` (total, failed, retries, format fallbacks), `fieldCompleteness`, `invalidRowsSkipped`, `proxyStrategies`, `chargeLimitReached`, `stoppedBecauseBlocked`, `resumedAfterRestart`, `durationSeconds`, the input and `units` (one entry per keyword, country and source: status, reason, queries and ideas saved). |
| `STATE` | Progress used to resume after a platform restart. |
| `INPUT` | The input of the run. |

**Deduplication.** An idea is unique per country, language and source, ignoring upper and lower case. If two keywords or two modifiers return the same phrase, it is saved once, under the first keyword and modifier that found it. The same phrase in YouTube and in Google Search is saved once for each source, because it is a different signal. The seed keyword itself and the exact text sent to Google are not saved as ideas.

### Pricing and cost calculator

**Apify Store discounts:** USD 0.000023 per idea on Silver and above.

This Actor uses pay-per-event pricing. You pay only for unique keyword ideas saved to the dataset. The only other charge is Apify's standard start event (`apify-actor-start`), USD 0.00005 per run at the default memory. Duplicates, the seed keyword itself, failed requests and requests with no suggestions are never charged. Your maximum cost per run is respected: the Actor checks the remaining budget before saving each batch and stops when it is reached; keywords it could not finish are marked `NOT_PROCESSED`.

| Event | Price | When it is charged |
|---|---|---|
| `keyword-idea` | USD 0.000025 (USD 0.025 per 1,000) | Each unique keyword idea saved. |

**Free plan:** the USD 5 of monthly usage included in the Apify Free plan covers about 200,000 unique keyword ideas (USD 0.000025 each), or more than 500 runs of the default input.

| Scenario | Ideas | Approximate cost |
|---|---|---|
| 1 keyword, suggestions only | about 15 | USD 0.0004 |
| 1 keyword, A-Z (default input) | about 370 | USD 0.009 |
| 10 keywords, A-Z + questions + prepositions | about 6,000 | USD 0.15 |
| 1 keyword, depth 2, capped at 1,500 | 1,500 | USD 0.04 |
| 1 keyword, A-Z, Search + YouTube + Shopping, 3 countries | about 2,500 | USD 0.06 |

Formula: `unique ideas × 0.000025`. Maximum per run: `keywords × countries × sources × maxSuggestionsPerKeyword × 0.000025`. Platform usage (compute) is included in the price.

### Integrations: schedules, API, webhooks, Google Sheets, Zapier, Make and AI agents

- **Schedules.** In Apify Console, open **Schedules** and run the Actor every week with your keyword list to track how suggestions change.

- **API.** Run the Actor and get the rows in one call:

  ```bash
  curl -X POST "https://api.apify.com/v2/acts/ocius-data~google-autocomplete-keyword-ideas/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"keywords":["heat pump"],"modifiers":["letters","questions"],"countries":["US"]}'
  ```

  Python, with the official `apify-client` package:

  ```python
  from apify_client import ApifyClient

  client = ApifyClient("YOUR_API_TOKEN")
  run = client.actor("ocius-data/google-autocomplete-keyword-ideas").call(
      run_input={"keywords": ["heat pump"], "sources": ["web", "youtube"], "modifiers": ["letters", "questions"]}
  )
  ideas = [row["suggestion"] for row in client.dataset(run["defaultDatasetId"]).iterate_items()]
  ```

- **Webhooks.** In the Actor's **Integrations** tab, add a webhook for `ACTOR.RUN.SUCCEEDED`. The rows are at `/v2/datasets/{defaultDatasetId}/items`.

- **Google Sheets.** Use the Google Sheets integration to append each run to a sheet and build a living keyword list.

- **Zapier, Make and n8n.** Use the official Apify app: start a run from your workflow, or trigger on "Actor run finished" and read the dataset items.

- **MCP and AI agents.** The input is flat and the default run finishes in seconds, so the Actor works well through the Apify MCP server (`mcp.apify.com`). Ask Claude, ChatGPT, Cursor or another MCP client to run `ocius-data/google-autocomplete-keyword-ideas` for a keyword.

#### Related Actors from the same developer

Build a full keyword research pipeline:

1. **Google Autocomplete Keyword Ideas** (this Actor): find the long-tail ideas.
2. **[Keyword Search Volume, CPC & Competition](https://apify.com/ocius-data/keyword-metrics)**: add monthly search volume, cost per click and competition to each idea.
3. **[Google Trends Scraper](https://apify.com/ocius-data/google-trends-reliable)**: check seasonality and rising interest for the best ideas, and compare unlimited terms on one scale.
4. **[Bulk Domain Authority & Backlinks Checker](https://apify.com/ocius-data/domain-authority)**: measure the authority of the sites that rank for them, to judge how hard each keyword is.

### Statuses and errors

Every keyword ends with one status per country and source in the `RUN_SUMMARY` record (Storage, key-value store), with the number of requests, ideas saved and the reason. The dataset contains only keyword ideas, never status or error rows.

| Status | Meaning | Charged | What to do |
|---|---|---|---|
| `OK` | Ideas returned (or all of them were duplicates of another keyword). | Only for unique ideas | Nothing |
| `PARTIAL` | Some requests failed after all retries; the ideas from the others were saved. | Only for ideas saved | Run again for the missing modifiers, or lower Max parallel requests. |
| `NO_RESULTS` | Google returned no suggestions for this keyword in this country and source. | No | Try a shorter or more common keyword, or another language. |
| `BLOCKED` | Google kept blocking after all retries and proxy escalation. | No | Run again later or select residential proxies. |
| `ERROR` | The requests failed for another reason, described in the summary. | No | Check the reason; open an issue if it persists. |
| `NOT_PROCESSED` | Your maximum cost per run was reached first. | No | Raise the cost limit or split the list. |

Invalid input (unknown country or language code, unknown source or modifier, depth other than 1 or 2) stops the run within seconds with a message that explains how to fix it, and nothing is charged. The run is marked as **failed** when more than 20% of keywords or more than 20% of Google requests fail, so incomplete results never look like a success. The summary also reconciles the number of ideas saved with the number of events charged.

### Known limits

- Google returns up to 15 suggestions per request. More ideas come from more modifiers or depth 2, not from one request.
- Google Images and Google News autocomplete return practically the same suggestions as Google Search (checked November 2026), so they are not offered as separate sources; you would pay twice for the same ideas.
- Autocomplete has no search volume. Use the related Keyword Search Volume Actor to add it.
- Suggestions can change by the hour and can include city names near the IP address that sent the request. The country code (`gl`) and language (`hl`) drive the results; the proxy location has a smaller effect.
- Google filters some suggestions (for example adult or sensitive terms), so they never appear.

### FAQ

**Is this a Google Autocomplete API?** Yes. It returns the same predictions you see while typing in Google, YouTube or Google Shopping, through a documented API with pay-per-use pricing.

**What is "alphabet soup" keyword research?** Typing the keyword followed by each letter (`keyword a`, `keyword b`...) so Google reveals suggestions it would not show for the keyword alone. This Actor does it for letters, numbers, questions, prepositions and your own modifiers.

**How do I get only questions?** Select the `questions` modifier and filter rows where `isQuestion` is `true`.

**How do I research another language?** Set `language` (for example `es`) and the `countries` where your audience lives (for example `CO`, `MX`, `ES`).

**Why did I get fewer ideas than the limit?** Google had no more distinct suggestions for that keyword with the selected modifiers. Add modifiers or use depth 2.

**Is it legal?** The Actor collects public, aggregated search predictions. No personal data is involved.

**Do you offer volume pricing?** For more than one million ideas per month, open an issue on the Actor page.

### Changelog

- **0.1.9** (November 2026) Topic clusters, questions and strongest ideas in a new `INSIGHTS` record and in the final status message; new fields `addedWords`, `theme`, `intentHint`, `charCount` and `warnings`; labels and formats on every column; field descriptions in the dataset schema; one link per view, a CSV link and the INSIGHTS record in the Output tab.
- **0.1.5** (2 November 2026) Fixed a false reconciliation error in RUN_SUMMARY (the platform charge counter is now re-read until it catches up). After a restart, ideas already charged are never charged again, even if the platform counter is still behind.
- **0.1** (November 2026) First version: Google Search, YouTube and Google Shopping autocomplete; letters, numbers, localized questions and prepositions, custom modifiers; depth 2; multiple countries; relevance score; deduplication; pay per unique idea; per-keyword statuses and run summary; restart-safe saving and charging.

### Tutorials and examples

**Ready-to-import templates:** [Google Sheets](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/tree/main/integrations/google-sheets), [Make](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/blob/main/integrations/make.md), [Zapier](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/blob/main/integrations/zapier.md) and a [webhook receiver](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/blob/main/integrations/webhook/receiver.mjs).

- Tutorial: [Google Autocomplete API in Python: long-tail keyword ideas and questions to CSV](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/blob/main/tutorials/google-autocomplete-keyword-ideas-python.md)
- Example code: [Python: keyword ideas to CSV](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples/blob/main/python/autocomplete_keyword_ideas.py)
- All examples: [apify-data-apis-examples on GitHub](https://github.com/christianbarbosapayan-commits/apify-data-apis-examples)

### Rate this Actor

If this Actor saved you time, please consider leaving a rating or a short review on its Apify Store page. It helps other users find it and shows us what to improve. If something does not work as expected, please open an issue first so we can fix it.

### Support

Open an issue on the Actor page. Issues are reviewed every day and fixes are released quickly.

# Changelog

This Actor's version history is a separate document: https://apify.com/ocius-data/google-autocomplete-keyword-ideas/changelog.md

# Actor input Schema

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

Seed keywords. For each one the Actor returns the searches Google suggests as people type it, plus the suggestions for every modifier you select. Duplicates are removed. Example: \["air conditioner", "heat pump"].

## `sources` (type: `array`):

Where the suggestions come from: Google Search, YouTube or Google Shopping. Each source is a separate set of ideas; the same phrase found in two sources is saved once per source.

## `modifiers` (type: `array`):

Each modifier sends one extra request per keyword, for example "air conditioner a" or "how air conditioner", and returns up to 15 more ideas. Leave empty to get only the suggestions for the keyword itself. Question words and prepositions are localized for English, Spanish, Portuguese, French, German and Italian.

## `customModifiers` (type: `array`):

Optional. Your own words added after each keyword, for example "price" or "near me". Use {keyword} to place the keyword yourself, for example "best {keyword} for". One request per modifier and keyword.

## `depth` (type: `integer`):

1: suggestions for the keyword and its modifiers. 2: also asks Google for the suggestions of each depth-1 idea, which finds longer long-tail phrases. Depth 2 sends many more requests and stops at Max ideas per keyword.

## `countries` (type: `array`):

Two-letter ISO country codes, such as US, GB, CO, ES, MX or DE. Each country returns its own suggestions and is charged separately.

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

Language of the suggestions, such as en, es, pt, fr, de or en-GB. Use the language your audience types in.

## `maxSuggestionsPerKeyword` (type: `integer`):

Maximum unique ideas saved for each keyword in each country and source. Keeps the cost predictable: cost is at most keywords x countries x sources x this number x the price per idea.

## `maxConcurrency` (type: `integer`):

How many requests are sent to Google at the same time. Lower it if you see blocks.

## `maxRetries` (type: `integer`):

How many times a failed request is retried with a new session and IP address before it counts as failed.

## `proxyConfiguration` (type: `object`):

By default the Actor uses Apify datacenter proxies and switches automatically to residential proxies if Google blocks requests.

## Actor input object example

```json
{
  "keywords": [
    "air conditioner"
  ],
  "sources": [
    "web"
  ],
  "modifiers": [
    "letters"
  ],
  "customModifiers": [],
  "depth": 1,
  "countries": [
    "US"
  ],
  "language": "en",
  "maxSuggestionsPerKeyword": 500,
  "maxConcurrency": 5,
  "maxRetries": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One row per unique suggestion: seed, suggestion, source, modifier, depth, position, relevance, country, language and scrapedAt.

## `viewOverview` (type: `string`):

Dataset rows with the "Keyword ideas" columns (?view=overview).

## `viewFull` (type: `string`):

Dataset rows with the "All fields" columns (?view=full).

## `resultsCsv` (type: `string`):

All rows as a CSV file with the "Keyword ideas" columns, ready for Excel or Google Sheets.

## `insights` (type: `string`):

Per seed keyword: keyword ideas grouped into topic clusters with examples, the questions found, long-tail ideas, intent mix, the ideas with the highest Google relevance and the ideas returned by the most queries.

## `runSummary` (type: `string`):

Status per keyword, country and source (OK, PARTIAL, NO_RESULTS, BLOCKED, ERROR, NOT_PROCESSED), request counts, events charged and the rows-versus-charges reconciliation.

# 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": [
        "air conditioner"
    ],
    "countries": [
        "US"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ocius-data/google-autocomplete-keyword-ideas").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": ["air conditioner"],
    "countries": ["US"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("ocius-data/google-autocomplete-keyword-ideas").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": [
    "air conditioner"
  ],
  "countries": [
    "US"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call ocius-data/google-autocomplete-keyword-ideas --silent --output-dataset

```

## MCP server setup

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

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/cvbMmBhSESEJWTSwR/builds/dOFykBQYv6oYvYtRT/openapi.json
