Officially, you need to use the Google Custom Search API, which allows limited number of searches for free, and has fees above that.
See
https://developers.google.com/custom-search/json-api/v1/overview[
^] for more information.
Doing it through a http call would require scraping the results, can only be done if your images are reachable by URL, and is far too complicated to put in a 'basic code snippet'. Not to mention that it's a violation of Google's Terms of Service and will get your IP blocked soon.