Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the documentation for the Google Suggest API? [closed]

Is there any official documentation on the Google Suggest API?

All my searches for the Google suggest API show pages with either outdated info or non-working scripts.

For example, at google.com, as soon as you type in "app", Google suggests Apple, Applebees, etc.

like image 444
Mark Avatar asked Feb 24 '11 09:02

Mark


People also ask

What is Suggestqueries Google com?

Someone told me that the suggestqueries.google.com api works based on what users actually type, that is to say if you are using suggestqueries with a partnerid and you send a query that has never been sent before then you won't get anything back no matter what is indexed because nobody has sent that text before, ...

What is the Google API?

Google Cloud APIs are programmatic interfaces to Google Cloud Platform services. They are a key part of Google Cloud Platform, allowing you to easily add the power of everything from computing to networking to storage to machine-learning-based data analysis to your applications.


2 Answers

As you can imagine, it's changed.

The newer URL is now http://clients1.google.com/complete/search?hl=en&output=toolbar&q=YOURSEARCHTERM

Or even more recent: http://suggestqueries.google.com/complete/search?output=toolbar&hl=en&q=YOURSEARCHTERM

like image 70
harvest316 Avatar answered Sep 24 '22 14:09

harvest316


Summary of working examples:

From this question working example:

http://suggestqueries.google.com/complete/search?output=toolbar&hl=en&q=theory



From this question working example:

http://suggestqueries.google.com/complete/search?output=firefox&q=theory




From mhawksey comment above working example:

http://google.com/complete/search?client=chrome&q=theory

Here client=chrome can be changed to other browser client. For example for Firefox it will look like:

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




From mahoor13 comment above working example:

google.com/complete/search?output=toolbar&q=theory




From dhiraj-pandey answer "if you want country specific suggests, you need to add &gl= in the url". That only works with links for toolbar!

So for example working country specific example for India will be:

google.com/complete/search?output=toolbar&q=theory&gl=in




To separate words use %20 or + between them. For example:

http://suggestqueries.google.com/complete/search?output=toolbar&hl=en&q=a%20mykeyword

or

http://suggestqueries.google.com/complete/search?output=toolbar&hl=en&q=a+mykeyword




Also from here it possible to get two suggestions with YQL (first sugestion chuck norris, second steven seagal):

select * from xml where url in ( ‘http://google.com/complete/search?output=toolbar&q=chuck+norris’, ‘http://google.com/complete/search?output=toolbar&q=steven+seagal’ ) 

Using above code gives:

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%20in%20%28%27http%3A%2F%2Fgoogle.com%2Fcomplete%2Fsearch%3Foutput%3Dtoolbar%26q%3Dchuck%2Bnorris%27%2C%27http%3A%2F%2Fgoogle.com%2Fcomplete%2Fsearch%3Foutput%3Dtoolbar%26q%3Dsteven%2Bseagal%27%29&format=xml&diagnostics=false




Some info from google about suggestions: http://www.google.com/support/enterprise/static/gsa/docs/admin/70/gsa_doc_set/xml_reference/query_suggestion.html

like image 28
vasili111 Avatar answered Sep 23 '22 14:09

vasili111