Using the Google AJAX search api
How can I call a search from my own text box? And parse the results in javascript?
The Google Search API is really well documented. This looks like something you'd be after, maybe?
Go here for the API, Developer's documentation and samples.
There is also a nice blog here.