Is it possible to use an XML file to force Google's Custom Search to suggest only the terms in the XML?


After an extensive search...it doesn't seem possible to exclude terms found in your site and search queries from appearing in Google's Custom Search Engine autocomplete.

You might however look at providing a front-end to the search form using something like jQuery Autocomplete, and disabling the autocomplete option in Custom Search. Then you can populate the autocomplete list with your own specific autocomplete terms.

  • Thank you Dan. I searched extensively myself and was surprised that this 'feature' wasn't part of Google CSE. I guess my only concern would be how to redirect the search to Google, it should be doable I believe? – Marin Aug 24 '13 at 20:48
  • You're welcome! Yes, it should be doable - search for "Google Custom Search jQuery autocomplete" or similar. This is a bit on the older-side, but I've seen it referenced in recent posts so it might be helpful. You can also post a question in the Google Group for Custom Search for feedback/experience on how to do it. If you find a good resource or approach, update the question to let others know. Good luck! – dan Aug 24 '13 at 22:52
  • 1
    ACtually I got it done right after you told me ! Thanks for pushing me in the right direction as google's documentation unfortunately was not clear enough. I ended up not using google custom search but another search functionality webSearch.setSiteRestriction() which when coupled with jQuery autoComplete worked out great. – Marin Aug 25 '13 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.