get google search results in sheets

Here are steps to get google search results in google sheets or excel. You can also purchase this google sheet with the complete setup from the link below from here.

 

get google search results in sheets

 

  1. Create a google sheet in your google drive.google search results in google sheets or excel
  2. Create a google custom search from here.
  3. Enable search the entire web.google search results in google sheets or excel
  4. Copy your google custom search engine id.google search results in google sheets or excel
  5. Get your google custom search api key from heregoogle search results in google sheets or excel
  6. Formulate your api key in this format.
    https://www.googleapis.com/customsearch/v1?key={YOUR_API_KEY}&cx={CUSTOM_SEARCH_ENGINE_ID}&q={KEYWORD}

    key is your API key, cx is your google custom search id.

  7. In your google sheets, go to tools-> script editor-> paste the following code->save the file as ImportJSON.gs. The ImportJSON.gs can be downloaded from here https://www.aozata.com/importjson-gs/
  8. Enter the cx, key, search query (q), API URL in different cells.
  9. Use the concatenate function to join all these 4 variables to get your final API URL. For example
    =concatenate(D4,D2,"&cx=",D1,"&q=",D3)

     

  10. Use the ImportJSON function to import the google search results. for example to get the title of the search results
    =ImportJSON($D$5,"/items/title","noHeaders")

     

  11. Here are the search results in google sheets and also a link to the sheet where you can see the search in work.

You can also buy this sheet from our website for $9 per month.

Get Google search results in Sheets – Download

 

 

By Muthali Ganesh

I am an engineer wih a masters in business administration from Chennai, India. I love discovering and sharing hacks.