Page 1 of 1
Google Suggest functionality on a web page
Posted: Sun Jan 06, 2008 8:44 pm
by itp
Does anyone know of a Google API or recipe to permit me to add a imput text box to my HTML page that links dynamically to the "Google Suggest" database. I would like user to start typing a search string on my page and see a list of links as she is typing.
I supposed that I would require a javascrpit XMLHttpRequest/ActiveXObject object to generate a get and some PHP to open and get information.
ref:
http://www.google.com/webhp?complete=1&hl=en
Posted: Mon Jan 07, 2008 12:17 am
by s.dot
I'm not sure there is an API to use google's suggest box. But setting up some AJAX listening to the onkeyup or onkeydown events could start you in the right direction. You'd probably need to find a database of common search queries, but I'd imagine those are available in lots of places (for seo people).
Posted: Mon Jan 07, 2008 2:41 am
by Kieran Huggins
Posted: Mon Jan 07, 2008 9:02 pm
by itp
I don't want to create my own terms database or repository of documents. I just want to hook up to Google suggest page, like you can do with Google Maps.
Posted: Tue Jan 08, 2008 3:47 pm
by superdezign
itp wrote:I don't want to create my own terms database or repository of documents. I just want to hook up to Google suggest page, like you can do with Google Maps.
Unless Google.com gives you the tools to do so, then Google probably won't allow you to do it (without retaliation). You could always create your database of search terms specific to search terms that were actually used on your site, so every time someone searches, you save it. It'll keep things more relevant too. An issue you'll face will likely be dealing with spelling errors.