Search Yesterday’s Index

Monitor a set of queries for new finds added to the Google index yesterday.

[Hack #48] is a simple web form-driven CGI script for building date range Google queries. A simple web-based interface is fine when you want to search for only one or two items at a time. But what of performing multiple searches over time, saving the results to your computer for comparative analysis?

A better fit for this task is a client-side application that you run from the comfort of your own computer’s desktop. This Perl script feeds specified queries to Google via the Google Web API, limiting results to those indexed yesterday. New finds are appended to a comma-delimited text file per query, suitable for import into Excel or your average database application.


This hack requires an additional Perl module, Time::JulianDay (; it just won’t work until you have the module installed.

The Queries

First, you’ll need to prepare a few queries to feed the script. Try these out via the Google search interface itself first to make sure you’re receiving the kind of results you’re expecting. Your queries can be anything that you’d be interested in tracking over time: topics of long-lasting or current interest, searches for new directories of information [Hack #1] coming online, unique quotes from articles, or other sources that you want to monitor for signs of plagiarism.

Use whatever special syntaxes you like except for link: ; as you might remember, ...

Get Google Hacks, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.