YouTube SEO

YouTube keyword research with autocomplete

YouTube's search box suggests what people type most. Those suggestions are free, current keyword data. Here's a short script to collect them, and what to do when you need more than a handful.

3 min readUpdated October 2026By Rimu Labs

The free method: one request per suggestion list

The same suggestion service that powers the search box answers simple HTTP requests. ds=yt asks for YouTube suggestions rather than web search:

import json, string, time, urllib.parse, urllib.request

def suggest(query, country="us", lang="en"):
    url = "https://suggestqueries.google.com/complete/search?" + urllib.parse.urlencode(
        {"client": "firefox", "ds": "yt", "q": query, "gl": country, "hl": lang})
    with urllib.request.urlopen(url, timeout=10) as resp:
        return json.loads(resp.read().decode("utf-8", "replace"))[1]

seed = "how to edit videos"
ideas = set(suggest(seed))
for letter in string.ascii_lowercase:           # the A-Z trick
    ideas.update(suggest(f"{seed} {letter}"))
    time.sleep(1)                                # be gentle
print(len(ideas), sorted(ideas)[:15])

For "how to edit videos" in the US, the first suggestions were:

That last one is the kind of rising topic autocomplete surfaces long before keyword tools do.

Expansions that find more ideas

When the script stops being enough

A single seed with all four expansions is about 80 requests. Ten seeds across three countries is thousands. At that point you'll hit rate limits (HTTP 429), need retries and proxies, and want to merge duplicates and count how often each suggestion appears, because a keyword suggested for many expansions is a strong signal.

Our Keyword Research Actor does that on Apify. It also covers Google, Bing, Google Shopping, News and Images in the same run:

from apify_client import ApifyClient  # pip install apify-client (3.x)

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("rimulabs/keyword-autocomplete-research").call(run_input={
    "keywords": ["how to edit videos"],
    "sources": ["youtube"],
    "expansions": ["alphabet", "questions"],
    "country": "us",
})
for k in client.dataset(run.default_dataset_id).iterate_items():
    print(k["timesSuggested"], k["bestRank"], k["keyword"])

Each keyword comes back with how many times it was suggested and its best position, so you can rank ideas instead of scrolling a flat list:

{ "keyword": "how to edit videos for youtube", "seed": "how to edit videos", "sources": ["youtube"],
  "timesSuggested": 4, "bestRank": 1, "isQuestion": true, "wordCount": 6, "country": "US" }

Cost: $0.50 per 1,000 keywords. A 200-keyword run costs about $0.10.

Rimu Labs builds and maintains the Actor mentioned in this guide. The guide was written with help from our AI assistant and checked against real runs in October 2026. Questions or corrections: support@rimulabs.com.