Google Custom Search allows you to run web search queries with Google based on a custom search query. You can run up to 100 per day. Note that as a prerequisite you need to have created a Google Custom Search Engine with “Search the entire web” chosen.
https://programmablesearchengine.google.com/controlpanel/create
Provider Website: https://developers.google.com/custom-search/v1/
Provider Enrichment Docs: https://developers.google.com/custom-search/v1/introduction
Endpoint: curl 'https://customsearch.googleapis.com/customsearch/v1?q=QUERY&key=APIKEY&cx=SEARCHENGINEID'
Token / Registration Required: Yes
How To Enrich A Spreadsheet With Google Search:
For this example, I will be doing a web search to find sites that list vendors for different industries. My data is a list of industries pulled from NAICS, with the industry name and NAICS code in one column.
Step 1. In Gigasheet, head to the Enrichments function and select Custom Enrichment. First we paste in the HTTP request from the Google Documentation and add in my API key with the “key=” parameter and the search engine ID of my Google Custom Search engine with the “cx=” parameter.
Step 2. On the next screen we’ll modify the query and insert the column variable from our Gigasheet sheet. In this case, I want to search for “top vendors for x”. So first I use https://www.urlencoder.org/ to encode that to “top%20vendors%20for%20x”.
Now copy and paste the "top%2020%20vendors%20for%20x".
Then I highlight “x” and replace it with the input column “line” by choosing the column and clicking +Insert Column Reference.
Then click Next.
Step 3. In this screen we see a preview of the results. Gigasheet makes requests for the first three rows and shows the Google Search API response. At this point select the fields you want to be inserted into your sheet. I’ll choose “items/0/link”, “items/0/snippet”, and “items/0/title” for the link, snippet, and title of the first search result. If you wanted additional search results, you could choose the fields from “items/1” and so on.
Step 4. Finally, confirm the number of requests is to your liking, and when ready click Run to kickoff the custom enrichment process. It’s ok to leave or close the sheet; the custom enrichment will keep running and you’ll receive an email once the job has been completed. You can monitor the progress of your enrichment, or cancel the job at the top of the sheet.
Step 5. Once completed, Gigasheet will send a completion message and refresh the page. The result will show generation of new columns based on Google Custom Search. We’ve added links, titles, and snippets for the top search result for each industry.