You can use the Google AJAX APIs in your desktop application, the API exposes a raw RESTful interface that returns JSON encoded results that are easily processed by most languages and run-times,however, a few special considerations that you want to take into account (e.g., the userip parameter which identifies the IP address of the client for which the query is being made). You also want to make sure to review the TOS in detail to make certain that your application won't be in violation of clauses such as the prohibition of robots, spiders, and other applications which make automated queries, etc. You can find a number of relevant resources, including code snippets for various languages that you might be considering using, at the links below.
TOS:
http://code.google.com/apis/ajaxsearch/terms.html[
^]
Documentation:
http://code.google.com/apis/ajaxsearch/documentation/index.html#fonje[
^]
http://code.google.com/apis/ajaxsearch/documentation/reference.html[
^]