Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

migrated from programmers.stackexchange.com Aug 22 '13 at 0:00

This question came from our site for professional programmers interested in conceptual questions about software development.

up vote 2 down vote accepted

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.

share|improve this answer
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
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
Great - thanks for the update! – dan Aug 25 '13 at 17:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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