You're going to have security issues using JavaScript to query another domain that isn't the one that served the HTML.
If you can write your own service, your best bet (for scraping) would be to send a query to this page: http://www.google.com/ie. It provides clean HTML that can be parsed with a regular expression. This page is also nice in that you can pass in a 'num' parameter and get more than just 10 results at a time. (if you're looking for perfect results, when doing this you aren't going to get exactly the same results as going 10 at a time).
With a service like this running on your server, your JavaScript code won't have any problems, until Google notices too many queries coming from your server's IP address and decides to blacklist you. ;)
I'd also suggest using Google's AJAX Search API, if you can live with it being limited to 64 total results.