Python Program That Generates Google Keyword

If you search anything in google search, google search engine will try to auto suggest and display most searched terms at the bottom. These keywords are very important in terms where you build the SEO, these are the most searched in all over the world.

Below is the python program that will generate most search results if you provide the input.

import requests
import bs4

while True:
    print("\n Enter your text : ")
    text = input()
    url = 'https://google.com/complete/search?output=toolbar&hl=es&q=' + text
    request_result=requests.get( url )
    soup = bs4.BeautifulSoup(request_result.text, "html.parser")
    zc = soup.find_all('suggestion')
    for xc in zc:
        print(xc["data"], end=", ")


Above program uses web scraping technique and requires requests and beautifulsoap installed. To install them install python first then install "pip install requests" and "pip install beautifulsoap"

To run the above script run python getkeyword.py enter and type in your keyword for example food

Run 1

==========================

C:\Users\Desktop> python get.py
seo keywords


seo keywords, seo keywords tool, seo keywords research, seo keywords free, seo keywords tool free, seo keywords example, seo keywords list, seo keywords search, seo keywords for youtube, seo keywords for artists

Run 2

==========================

C:\Users\Desktop> python get.py

food

foodhall, food department, food odisha, food portal odisha, food truck, food wars, food, foodspring, food near me, foodie love,

Let me know how exactly you are using the script in below comments section

Post a Comment

0 Comments