Google Desktop HTTP/XML Gateway

If you find the Google Desktop useful, you might be glad to know that you can access results programmatically via an HTTP/XML gateway, documented at the following location:

http://desktop.google.com/dev/queryapi.html#httpxml

[Note]Note

 There is also a ­COM-­based interface in Windows, located at http://desktop.google.com/?dev/?queryapi.html#registering. The XML gateway works on Mac OS X in Google Desktop Mac 1.0.3+. The API is currently unsupported for the Linux version of Google Desktop.

On Windows, you get the query URL from the registry key using this:

HKEY_CURRENT_USER\Software\Google\Google Desktop\API\search_url

The query URL will be of the following form:

http://127.0.0.1:4664/search&s={SECRETKEY}?q=

You can get XML out by tacking on &format=xml. A sample query is as follows:

http://127.0.0.1:4664/search&s={SECRETKEY}?q=bach

This query returns the following (excerpted here):

         <results count="447">
         _
           <result>
             <category>web</category>
             <doc_id>247278</doc_id>
             <event_id>277975</event_id>
         _
             <title>
               Eventful - Mountain View Events - Mashup Camp IV at Computer History Museum
             </title>
             <url>http://eventful.com/events/E0-001-002642665-0</url>
             <flags>259</flags>
             <time>128263024673430000</time>
         _
             <snippet>
             Add to Reddit Add to calendar Eventful calendar Add to Calendar: <b>Bach</b>
         in San Francisco metro area Berkeley, California, USA My Events Add to
             </snippet>
         _
             <thumbnail>
               /thumbnail?id=6%5F76xk4cxwsgMBAAAA&s=KLp8LKWLzFxwQ25pvDi42EHVfTk
             </thumbnail>
         _
             <icon>
               /icon?id=http%3A%2F%2Feventful%2Ecom%2F&s=YtdjKx9s9jRBxC11CW7vm377nN0
             </icon>
         _
             <cache_url>
               http://127.0.0.1:4664/redir?url=http%3A%2F%2F127%2E0%2E0%2E1%3A4664%2Fcache%3Â
         Fevent%5Fid%3D277975%26schema%5Fid%3D2%26q%3Dbach%26s%3DuSIdPgul9xWiUyUybC6Ko3XA2cIÂ
         &src=1&schema=2&s=uADtUWTU45Sf6jKTCjeexK0wxjY
             </cache_url>
           </result>