{"id":573,"date":"2008-04-11T07:12:54","date_gmt":"2008-04-11T06:12:54","guid":{"rendered":"http:\/\/www.icantinternet.org\/?p=21"},"modified":"2016-11-23T11:59:53","modified_gmt":"2016-11-23T11:59:53","slug":"how-to-add-googles-image-search-to-your-website","status":"publish","type":"post","link":"https:\/\/beheydt.be\/en\/how-to-add-googles-image-search-to-your-website\/","title":{"rendered":"How to add Google&#8217;s Image Search to your website?"},"content":{"rendered":"<p>I know how to add a Google Search Box to my website, but how can I add the Image Search from Google?<br \/>\nEasy!<br \/>\nLet&#8217;s take a look at a standard search url from Google:<br \/>\n<a href=\"http:\/\/www.google.com\/search?source=ig&amp;hl=en&amp;q=rubarber&amp;btnG=Google+search\" target=\"_NEW\">http:\/\/www.google.com\/search?source=ig&amp;hl=en&amp;q=rubarber&amp;btnG=Google+search<\/a><br \/>\nNow, let&#8217;s strip that one down to right the bare essential:<br \/>\n<a href=\"http:\/\/www.google.com\/search?q=rubarber\" target=\"_NEW\">http:\/\/www.google.com\/search?q=rubarber<\/a><br \/>\nThe extra info in the string tells Google which website you come from (source=ig -&gt; <a href=\"http:\/\/www.igoogle.com\" target=\"_NEW\">iGoogle<\/a>), what language you speak (hl=en), and what the button says (btnG=Google+zoeken)<br \/>\n<!--adsense--><br \/>\nNow&#8230; If you try an image search on Google, and translate to a &#8220;bare essentials url&#8221; as we did above, we get:<br \/>\n<a href=\"http:\/\/images.google.com\/images?q=rubarber\" target=\"_NEW\">http:\/\/images.google.com\/images?q=rubarber<\/a><br \/>\nSo, to get Google&#8217;s Image Search result page, with the results that your website&#8217;s visitor is looking for, you actually only need one (1) thing in a form: a textfield, with the name &#8216;q&#8217;, which contains the keywords for which your visitor wants to search images.<br \/>\nPutting this all together in nice and clean HTML this results into this:<\/p>\n<pre>&lt; form method=\"get\" action=\"http:\/\/images.google.com\/images\" &gt;\r\n&lt; input type=\"text\" name=\"q\" \/ &gt;\r\n&lt; input type=\"submit\" value=\"Search Google Images\" \/ &gt;\r\n&lt; \/form &gt;\r\n<\/pre>\n<p>Or looking like this:<\/p>\n<form action=\"http:\/\/images.google.com\/images\" method=\"get\"><input name=\"q\" type=\"text\" \/><br \/>\n<input type=\"submit\" value=\"Search Google Images\" \/><\/form>\n<p>Now, if you don&#8217;t want the result page from Google&#8217;s images to open instead of your own website, add the optional attribute target=&#8221;_NEW&#8221; to the form tag, making it<\/p>\n<form action=\"http:\/\/images.google.com\/images\" method=\"get\" target=\"_NEW\">This way, your results will be shown in a brand new browserwindow. Your users will be able to look at the found images, and still continue surfing at your website.<br \/>\nGive it a try!<\/form>\n","protected":false},"excerpt":{"rendered":"<p>I know how to add a Google Search Box to my website, but how can I add the Image Search from Google? Easy! Let&#8217;s take a look at a standard search url from Google: http:\/\/www.google.com\/search?source=ig&amp;hl=en&amp;q=rubarber&amp;btnG=Google+search Now, let&#8217;s strip that one down to right the bare essential: http:\/\/www.google.com\/search?q=rubarber The extra info in the string tells Google [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[922],"tags":[322,1071],"class_list":["post-573","post","type-post","status-publish","format-standard","hentry","category-webmaster-en","tag-google","tag-google-image-search"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pbkKxJ-9f","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/posts\/573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/comments?post=573"}],"version-history":[{"count":0,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/posts\/573\/revisions"}],"wp:attachment":[{"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/media?parent=573"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/categories?post=573"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beheydt.be\/en\/wp-json\/wp\/v2\/tags?post=573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}