DEV Community

Discussion on: Create custom Google search engine for your domain(s) and fetch results as JSON

 
makwelos profile image
Siya

Awesome, thank you so much Jochem.
I got it:)

Thread Thread
 
cazp83 profile image
César Augusto Zapata • Edited

Hi Jochem!

Great tut! I was wondering if It's possible to add the autocomplete feature on this form input

Thread Thread
 
jochemstoel profile image
Jochem Stoel

To use Google Suggest, you need a server. Cross Domain XMLHttpRequests are not allowed. I have actually created an NPM module for Google Suggest that does exactly that. It fetches suggestions from Google Search.
All you need to do is create a server that pipes the response to the client and then use some jQuery auto-complete plugin to render them visually.

Thread Thread
 
cazp83 profile image
César Augusto Zapata

Hi Jochem, thanks for the advise, very useful. I'll look into this.

Thread Thread
 
jochemstoel profile image
Jochem Stoel

Did you figure it out? Does it need an article?

Thread Thread
 
cazp83 profile image
César Augusto Zapata

Thanks for the follow up Jochem, however I'm more interested in receiving suggestions based on the sites listed in my search engine rather than the entire web. Recently I found this function (google.search.CustomSearchControl.attachAutoCompletion) so I'm going to try implement it in my project, thanks again.