In a recent personal task, I needed to extract most searched keywords in US on a daily or monthly basis. While doing some research, I found out that Google actually publishes something called Google Hot Trends on daily basis (on this site). What I wanted was exactly this but I wanted it in the text file so that an automation I had done in browser can read this file and take action.
I thought the best way to extract these keywords would be to write a small C# utility that extracts keywords for a given day. Here is the source code I wrote to do just that.
If you put above code in any console based application (and add couple of using references on top like System.Net and System.IO), it will create a text file in the current directory called “SearchKeywords.csv” which will look something similar following. Basically it goes and fetches last 15 days most searched keywords and writes them into the file.
It also dumps on the command prompt, what it gets from HotTrends website.
Sometimes, its interesting to see what people are looking for (I love to go and find out why many people are searching for that, there’s a one or the other reason behind that!)