Google Search will deny your request if you are doing it outside of their API and Terms of Service.
$ wget http://www.google.com/search?q=vamsi
Resolving www.google.com (www.google.com)... 74.125.225.212, 74.125.225.210, 74.125.225.211, ...
Connecting to www.google.com (www.google.com)|74.125.225.212|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2014-02-01 23:21:08 ERROR 403: Forbidden.
They may be looking at your User-Agent
header. If you add one that resembles a browser, it may work, though you are circumventing the Terms of Service and seeking unsupported behavior. (Sorry, I too tried this once.)
See also Why does Google Search return HTTP Error 403?
FYI, this is a common restriction of major search engines (Google, Bing, Yahoo). There are some that you can query programatically; you will have to use those.