The Web Search (AJAX) API is on the verge of discontinuation. While the underlying service still works, an error has been introduced into the Javascript wrapper which precludes the Hello, World example from working. Given that this error has been known for a couple of weeks with no action from Google, I suspect we can expect that it will not be fixed. It is NOT advisable to utilize it in any way, shape, or form at this time. You might check out the Custom Search API, but it has a little steeper learning curve and only offers 100 complimentary requests per day. You can make more queries, but you have to enable billing at a rate of USD$5/1000 requests.
jg