Add Google Autocomplete to other Search Engines

google autocomplete

When you type a few characters in the search box of your favorite web browser - be it Firefox, Internet Explorer or the Omnibox of Google Chrome - Google tries to predict your search query and offers search suggestions in a drop-down. These predictions are often very accurate and thus you rarely have to type the full search query in the browser.

The problem is that this useful “autocomplete” feature isn’t available in most of the other search engines that are installed in your browser. Just look at Twitter, Amazon, or even YouTube search in your browser – none of them offer autocomplete like Google.

That said, it is actually very easy to integrate Google search suggestions in any other search engine with the help of OpenSearch. To get started, just go to ctrlq.org/search and install any of your favorite search engines by clicking on their name. These are compatible with Firefox, Google Chrome and Internet Explorer.

Next go to your browser’s search box, or the address bar depending on what browser you are using, change the default search engine to the one that you just installed and type something. You should see get search suggestions in a drop-down just like Google Search.

The idea is simple. If you have set YouTube+ as your default search engine in the browser, the autocomplete suggestions would still get served from Google but when you press enter, the actual search will happen on YouTube. See video demo:

Play ;

You can also add autocomplete to your site’s search engine - see example.

The OpenSearch code is available below and you just need to change a few parameters in the template to use it with your own Google custom search engine.

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription
  xmlns="http://a9.com/-/spec/opensearch/1.1/"
  xmlns:moz="http://www.mozilla.org/2006/browser/search/"
>
  <ShortName>Digital Inspiration</ShortName>
  <Description>Search Digital Inspiration</Description>
  <InputEncoding>UTF-8</InputEncoding>
  <image width="16" height="16" type="image/x-icon">http://www.labnol.org/favicon.ico</image>
  <Url
    type="application/x-suggestions+json"
    method="GET"
    template="http://suggestqueries.google.com/complete/search?output=firefox&amp;q={searchTerms}"
  />
  <Url type="text/html" method="GET" template="http://www.labnol.org/?s={searchTerms}" />
  <SearchForm>http://www.labnol.org/</SearchForm>
</OpenSearchDescription>

Amit Agarwal is a web geek, solo entrepreneur and loves making things on the Internet. Google recently awarded him the Google Developer Expert and Google Cloud Champion title for his work on Google Workspace and Google Apps Script.

Awards & Recognition

Google Developer Expert

Google Developer Expert

Google awarded us the Developer Expert title recogizing our work in Workspace

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional title for 5 years in a row

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator award for technical expertise

Want to stay up to date?
Sign up for our email newsletter.

We will never send any spam emails. Promise 🫶🏻