Keyword Autocomplete Scraper
Keyword ideas from Google, YouTube and Amazon autocomplete in one run: A-Z, question and preposition expansion, any country and language, deduped JSON with rank and relevance.
Use when you need keyword ideas people actually type: SEO long-tail and question keywords, YouTube title/tag ideas, or Amazon listing and PPC search terms.
Use when you need keyword ideas people actually type: SEO long-tail and question keywords, YouTube title/tag ideas, or Amazon listing and PPC search terms. Reads the public Google Suggest, YouTube suggest and Amazon search-box completion feeds for one seed (country + language aware) and returns deduped suggestions with source, rank position, relevance (Google/YouTube) and the exact query sent. expand=alphabet adds seed+a..z (one source per call), questions adds how/what/why/... prefixes, prepositions adds for/with/vs/..., numbers adds 0-9. Errors and empty results are not charged. For bulk runs (many seeds, all expansions) use the Apify Actor https://apify.com/scrapemole/keyword-autocomplete-scraper.
GET https://scrapemole-api-mainnet.scrapemole.workers.dev/v1/keyword-autocomplete
| Name | Required | Description |
|---|---|---|
q | yes | Seed keyword. |
sources | no | Comma-separated: google, youtube, amazon. Default: google |
expand | no | Expansion: none, alphabet (seed a..z, one source per call), questions, prepositions or numbers. Max 40 autocomplete requests per call. One of: none alphabet questions prepositions numbersDefault: none |
country | no | Two-letter country (also picks the Amazon marketplace: US, GB, DE, FR, IT, ES, NL, SE, PL, CA, MX, BR, AU, JP, IN). Default: US |
lang | no | Language for Google and YouTube suggestions (en, de, pt-BR). Default: en |
// npm i @x402/fetch @x402/evm viem import { wrapFetchWithPaymentFromConfig, decodePaymentResponseHeader } from '@x402/fetch'; import { ExactEvmScheme } from '@x402/evm'; import { privateKeyToAccount } from 'viem/accounts'; // Your agent's own wallet, holding a little USDC on Base or Solana. No ScrapeMole account or API key. const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY); const pay = wrapFetchWithPaymentFromConfig(fetch, { schemes: [{ network: 'eip155:8453', client: new ExactEvmScheme(account) }], }); // On 402 the wrapper signs the USDC authorization and retries once. const res = await pay('https://scrapemole-api-mainnet.scrapemole.workers.dev/v1/keyword-autocomplete?q=espresso%20machine&sources=google,youtube,amazon'); console.log(res.status, await res.json()); // Settled only on 200; the receipt (tx hash) is in the PAYMENT-RESPONSE header. if (res.ok) console.log(decodePaymentResponseHeader(res.headers.get('payment-response')));
# 1. Unpaid: returns 402 with price $0.003 and the payTo address curl -i "https://scrapemole-api-mainnet.scrapemole.workers.dev/v1/keyword-autocomplete?q=espresso%20machine&sources=google,youtube,amazon" # 2. Paid: repeat the request with a PAYMENT-SIGNATURE header (a signed USDC # authorization for the quoted amount). An x402 client does this for you: # see the JavaScript tab.
No crypto wallet? The same data comes from our Apify Actor Keyword Autocomplete Scraper: batch runs, pay per result with an Apify account, export CSV/JSON, or connect n8n, Make and Zapier.
Run on Apify ↗Also available as the MCP tool keyword_autocomplete on https://scrapemole-api-mainnet.scrapemole.workers.dev/mcp (x402 MCP transport, same price).
A real response from this endpoint (arrays and long strings trimmed here).
{
"seed": "espresso machine",
"sources": [
"google",
"youtube",
"… 1 more"
],
"expand": "none",
"country": "US",
"lang": "en",
"queries": 3,
"failedQueries": 0,
"count": 39,
"bySource": {
"google": 15,
"youtube": 15,
"amazon": 9
},
"suggestions": [
{
"source": "google",
"suggestion": "espresso machine for home",
"position": 1,
"relevance": 601,
"query": "espresso machine",
"expansion": "seed"
},
{
"source": "youtube",
"suggestion": "espresso machine review",
"position": 1,
"relevance": 1100,
"query": "espresso machine",
"expansion": "seed"
},
"… 1 more"
]
}Failed calls and bad inputs are never charged. Every failure returns JSON like {"error": {"code": "NOT_FOUND", "message": "…", "charged": false}}, so an agent knows whether to fix the input or retry.
| Status / errorCode | Meaning |
|---|---|
400 INVALID_INPUT | Missing or malformed parameter. Fix the input. |
404 NOT_FOUND | The video, channel, product or term doesn't exist or isn't public. |
404 NO_DATA | It exists, but has nothing to return (for example no captions). |
503 BLOCKED | The source rate-limited us even after retries. Try again later. |
502 / 504 | Upstream error or timeout. Try again. |
402 | No or invalid payment. Pay the quoted amount and retry. |