Google autocomplete in my form

I have a form on my website that forwards text box input to www.google.com/search?q=.... Is it possible to get this autocomplete / autocomplete feature provided by Google when searching on google.com. Firefox uses google autocomplete in the search bar next to the url bar, but how can I get this information for my web form?

+5
source share
4 answers

Google Suggest API , which allowed the use of autocomplete for custom keywords. But it looks like Google deleted it. But I found out that you can still access the API. There are URLs for JSON and XML.

Json

http://clients1.google.com/complete/search?hl=en&q=<your query here>&client=hp

XML

http://clients1.google.com/complete/search?hl=en&q=<your query here>&output=toolbar

Without any warranty.

. jQuery UI Autocomplete

+6

New URL:

http://suggestqueries.google.com/complete/search?client=firefox&q=YOURQUERY

client part required; I have not tested other clients.

+1
source

In addition to RickyA's answer, you can filter the sentence using the parameter bs:

http://clients1.google.com/complete/search?hl=en&q=stackoverflow&output=toolbar&ds=

youtube: ds = yt

books: ds = bo

: ds = sh

news: ds = n

images: ds = i

web: ds =

recipes: ds = r

0
source

All Articles