Here are steps to get google search results in google sheets or excel. You can also purchase this google sheet with the complete set up from the link below for $10 from here.
- Create a google sheet in your google drive.
- Create a google custom search from here.
- Enable search the entire web.
- Copy your google custom search engine id.
- Get your google custom search api key from here
- Formulate your api key in this format.
key is your API key, cx is your google custom search id.
- 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://aozata.com/importjson-gs/
- Enter the cx, key, search query (q), API URL in different cells.
- Use the concatenate function to join all these 4 variables to get your final API URL. For example
- Use the ImportJSON function to import the google search results. for example to get the title of the search results
- Here are the search results in google sheets and also a link to the sheet where you can see the search in work.