0

In a browser like Firefox or Chrome. When I open it up, it shows a homepage with Google search. The search box can show suggestion for every typing and when I press enter it does redirect to google.com with my search query.

I just want to integrate a search box like that. Is there any easy way to do it without building the suggestion myself?

Someone said my question duplicated, however my question is different. I need a search box with full suggestion for every typing and I want to search all websites, not the content in my website as Custom Search Engine does.

joe
  • 137
  • 1
  • 6
  • Have you googled it? Read this doc https://support.google.com/customsearch/answer/4513903?hl=en – mahan Oct 17 '19 at 06:45
  • 1
    Possible duplicate of [How can I add a Google search box to my website?](https://stackoverflow.com/questions/13822927/how-can-i-add-a-google-search-box-to-my-website) – puja singhal Oct 17 '19 at 06:45
  • @mahan already googled, they all point to CSE (Custom Search Engine) which only allow you to search for a target website that you are the owner – joe Oct 17 '19 at 06:46
  • @pujasinghal it does not have the search suggestion for every typing, which I want the most. And I want to search all websites, not search content only in my website – joe Oct 17 '19 at 06:48

2 Answers2

0

You can embade google in an iframe.

html,
body,
iframe {
  width: 100%;
  height: 100%;
}
<iframe src="https://www.google.com/search?igu=1"></iframe>
mahan
  • 12,366
  • 5
  • 48
  • 83
0

Without the suggestions it's simply:

 <form action="http://www.google.com/search">
   <input name="q"><input type="submit">
 </form>
RoToRa
  • 37,635
  • 12
  • 69
  • 105