Google "exposes" the JSONP auto-complete API:
$.ajax({ url: "http://suggestqueries.google.com/complete/search", dataType: "jsonp", data: { client: "chrome", q: "Query" } }).done(function(data){ console.log(data); });
data is automatic complete data. http://jsfiddle.net/DerekL/MWvjx/
Full working demo: http://jsfiddle.net/DerekL/8FTCG/

It looks like you can even use it as a mini calculator. :)
This API returns information, not just text. It also contains the type of each element, a title (if it is a link) and a relevance index.
PS: Sorry if you are not familiar with jQuery . But when it comes to XHR and AJAX, jQuery is like substantial. It's like a lifeguard!
source share