Google Search History as RSS #
Update on 4/24/2006: The feeds have now been officially announced (i.e. they are exposed via auto-discovery on the page). HTTP Basic Authentication (over SSL) is now also supported (in addition to the cookie).
Google recently released some Dashboard Widgets, among them one for accessing your search history. Until now, it had only been accessible at its homepage, so I wondered how the widget got that data out. Thankfully the widget code was not obfuscated, and I was able to see snippets like the following:
Widget.feed = "http://www.google.com/searchhistory/find?zx=" + randomString() + "&num=50&output=rss&client=google-mcsmhwidget"; ... var url = Widget.feed; url += "&start=" + Widget.resultsStart; url += "&q=" + encodeURIComponent(query);
Sure enough, URLs such as this one bring up a search through my search history as an RSS feed. The query part of the URL can be left blank to show all items. I'm guessing that by judicious use of the start
and num
parameters, one could even get at ones entire search history. Presumably the attention fanboys will like this.
The key in the above URL seems to be the output=rss
parameter. Since bookmarks are in the same UI as search history, perhaps they can be viewed as RSS too? Yes, they can (though with some XML errors that the team is aware of as of 3/31/2006 it's well-formed XML ). The Trends page however doesn't work as RSS.
Note that these feeds are not really useful for most aggregators, since they require you to logged in to your Google Account and be authenticated by a cookie. The one exception might be Firefox Live Bookmarks. By creating one pointed to your searches or bookmarks feeds and putting it your toolbar, you have one-click access to your search history or bookmarks. However, the real use of the feeds is as a pseudo-API, as they are used in the Dashboard Widget.
This might seem like a convenient "leak," but it's something I decided to blog about for myself, without any prompting from the search history team (though they did get a heads-up about this post). The feed URLs and format may change at any time, though they probably won't deviate too much unless there's a good reason.
9 Comments
Anyway, at the moment, what I'm more concerned with is Google Search RSS or JSON. That way, one will be able to search Google and display the results without actually having to display the results page. If Google can implement this, I know a lot of people will appreciate this, and run amock to add this to their page ... I know I will! :)
Do you know anything about any plans to have this?
Bizarre. Anyway have any ideas?
Post a Comment