Skip to main content

How to find long-tail keywords for free with Google, YouTube and Amazon autocomplete (Python)

Expand seed keywords A to Z and into questions across Google, YouTube, Bing and Amazon autocomplete, deduplicated into one CSV with apify-client.

Updated 7 min readMarkdown

By Ryu Moon

Long-tail keywords are the three-to-six-word searches real people type: "coffee grinder for espresso", "how to clean a burr grinder", "coffee grinder under 50". Each one has less competition than the head term, and together they are where most new pages, videos and product listings actually get found.

The cheapest place to find them is the search box itself. Google, YouTube, Bing and Amazon all suggest completions as you type, and those suggestions come from what people search. "How to find long tail keywords free", "google autocomplete keyword tool" and "youtube autocomplete keyword scraper" are all common searches for exactly this reason.

This guide shows how to collect autocomplete suggestions in bulk from Python (or JavaScript), expand a seed keyword A to Z and into questions, and end up with a clean, deduplicated CSV. It uses Google Autocomplete Scraper – YouTube, Bing, Amazon, an Apify Actor I publish.

Why not just type into Google?

You can, and for one keyword it works. The trouble starts when you want more than a handful:

  • Each box shows only about 10 suggestions. To see the long tail you have to type "coffee grinder a", "coffee grinder b" and so on, and then "how coffee grinder", "why coffee grinder"…
  • Google and YouTube give different suggestions, and Amazon suggestions show buying intent that Google often hides.
  • Results change by country and language. "Grinder" ideas for the UK are not the same as for the US.
  • Copying it all into a spreadsheet and removing duplicates by hand takes longer than the research itself.

One note on naming: if you search for "Google autocomplete API pricing" you will mostly find the Google Maps Places Autocomplete API. That is for address and place lookups and is a different product. It does not give you search keyword suggestions.

What the Actor does

You give it one or more seed keywords. For each seed it can query:

  • Google and YouTube autocomplete (with your country and language)
  • Bing autocomplete
  • Amazon autocomplete, on 13 marketplaces (US, GB, DE, FR, IT, ES, NL, CA, MX, BR, IN, JP and AU; other countries skip Amazon)

And it can expand each seed in several ways:

Option What it sends Good for
expandAlphabet seed a … seed z Far more long-tail ideas
expandDigits seed 0 … seed 9 Years, sizes, model numbers
expandQuestions how seed, what seed, why seed, can seed … FAQ sections, blog and video ideas
customPrefixes e.g. best seed, cheap seed Buyer-intent modifiers
customSuffixes e.g. seed for beginners, seed vs Comparisons and niches

Question words follow the language setting for English, German, French, Spanish, Italian, Portuguese and Dutch.

With mergeSources on (the default) you get one row per unique suggestion, with every engine that returned it and its position in each:

{
  "seedKeyword": "coffee grinder",
  "suggestion": "coffee grinder for espresso",
  "sources": ["google", "youtube", "bing"],
  "positions": { "google": 2, "youtube": 4, "bing": 15 },
  "bestPosition": 2,
  "query": "coffee grinder",
  "expansion": "seed",
  "wordCount": 4,
  "isQuestion": false,
  "country": "US",
  "language": "en",
  "timesSuggested": 3,
  "scrapedAt": "2026-11-02T09:10:15.183Z"
}

That sources list is handy: a phrase that shows up on Google, YouTube and Amazon is a strong sign of real demand.

Step 1: Get an Apify API token

Sign up at apify.com, open Settings → API & Integrations in the Console and copy your personal API token. Keep it out of your code:

export APIFY_TOKEN="your-token-here"
pip install apify-client pandas

Step 2: Expand a seed keyword in Python

This example takes two seeds, expands them A to Z and into questions on Google, YouTube and Amazon for the US, and saves a CSV sorted so the most widely suggested phrases come first.

import os
import pandas as pd
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])

run_input = {
    "keywords": ["coffee grinder", "pour over coffee"],
    "sources": ["google", "youtube", "amazon"],
    "country": "US",
    "language": "en",
    "expandAlphabet": True,
    "expandQuestions": True,
    "mergeSources": True,
    "excludeSeedKeyword": True,
    "maxSuggestionsPerKeyword": 400,  # caps cost per seed
}

run = client.actor("ryumoon-data/keyword-autocomplete-expander").call(run_input=run_input)

items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
df = pd.DataFrame(items)

df["engines"] = df["sources"].apply(len)
df["sources"] = df["sources"].apply(", ".join)
df = df.sort_values(["seedKeyword", "engines", "bestPosition"], ascending=[True, False, True])

cols = ["seedKeyword", "suggestion", "sources", "engines", "bestPosition",
        "expansion", "wordCount", "isQuestion"]
df[cols].to_csv("long_tail_keywords.csv", index=False)
print(f"Saved {len(df)} suggestions")
print(df[cols].head(15).to_string(index=False))

maxSuggestionsPerKeyword is the simplest way to control spend: each seed stops at that many rows.

Step 3: Pull out questions and buyer phrases

Once you have the table, a few filters turn it into a content plan:

questions = df[df["isQuestion"]]
questions[["seedKeyword", "suggestion", "sources"]].to_csv("questions.csv", index=False)

long_tail = df[df["wordCount"] >= 4]
amazon_only = df[df["sources"] == "amazon"]
multi_engine = df[df["engines"] >= 2]

print(len(questions), "questions")
print(len(long_tail), "phrases with 4+ words")
print(len(amazon_only), "Amazon-only phrases (buying intent)")
print(len(multi_engine), "phrases suggested by 2+ engines")

A simple way to use this:

  • Questions become FAQ sections, blog post headings or YouTube video titles.
  • Amazon-only phrases are good for product titles, Etsy tags and KDP keyword slots, because they reflect what shoppers type.
  • Multi-engine phrases are your safest bets for a main page or video topic.

Same thing in JavaScript

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor('ryumoon-data/keyword-autocomplete-expander').call({
    keywords: ['standing desk'],
    sources: ['google', 'bing', 'amazon'],
    country: 'GB',
    language: 'en',
    expandQuestions: true,
    customPrefixes: ['best', 'cheap'],
    customSuffixes: ['for small spaces', 'vs'],
    maxSuggestionsPerKeyword: 300,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const row of items.slice(0, 20)) {
    console.log(`${row.suggestion}  [${row.sources.join(', ')}]`);
}

Run it with npm install apify-client and Node 18 or newer (save it as an .mjs file for top-level await).

Other countries and languages

Set country and language together, for example "country": "DE", "language": "de" for German suggestions from Google, YouTube, Bing and Amazon.de. Question expansion then uses German question words (wie, was, warum …). For Amazon, the country must be one of the 13 marketplaces listed above, or Amazon is skipped with a warning in the log.

How many requests a run makes

Each expansion is one request per engine. One seed with A–Z and English question expansion is 1 + 26 + 14 = 41 queries, so 164 requests across all four engines. Requests run in parallel (maxConcurrency, default 4) and are retried with back-off on rate limits or server errors (maxRequestRetries, default 3). If a request still fails, it is skipped and listed in the SUMMARY record of the run's key-value store, together with the number of suggestions saved per seed.

A proxy is off by default. For very large runs, turn on Apify Proxy in proxyConfiguration if an engine starts rate-limiting.

What it costs

Prices from the live Apify Store listing on 13 Nov 2026 (pay per event):

  • Keyword suggestion (one unique row saved): $0.0005, so $0.50 per 1,000 suggestions
  • Actor start: $0.0001 per GB of memory used by the run

You pay for suggestions saved, not for requests sent, and duplicates merged across engines count once. With maxSuggestionsPerKeyword: 400, the Python example above can never cost more than 800 suggestions, which is $0.40 plus the start fee. You can also set Apify's "Maximum cost per run", and the Actor stops when it is reached. New Apify accounts get a monthly free usage credit, which is enough to try this many times.

Tips and limits

  • Autocomplete shows what people search, not how often. It has no search volumes. Use it to find phrases, then check the promising ones in a volume tool or with Google Trends Scraper to compare interest.
  • Suggestions change over time and by location, so save the scrapedAt date with your research and rerun it every month or season.
  • Start with one seed and no expansion to see the output, then turn on A–Z and questions.
  • Digit expansion rows are labelled "expansion": "alphabet" in the output, the same as A–Z rows.

Wrapping up

Autocomplete is the quickest free signal of what people really type, and pulling it from four engines at once gives you a long-tail list you would never get by hand. Try Google Autocomplete Scraper – YouTube, Bing, Amazon with one seed keyword first, keep the engines that suit your platform, and schedule it once the output looks right.

No comments yet. Be the first to comment.