Google GData API: Works for almost all Google services (GMail, Docs, Youtube etc). Includes comprehensive client libraries for most languages and a RubyGem. Took me 5 minutes to authenticate a session with my GMail account and start pulling out data.
Google Search AJAX API: Works for Google Search only. Consists of a pile of Javascript. Pretty much sucks.
Guess which one I need to use.