The default Magento search is not up to your expectations? You are not alone. Fortunately, You can use Google custom search for free to add good search functionality to your Magento store.
The only issue is that Google custom search has ads. If you are looking for an ad-free Magento search experience, you could opt for Expertrec custom search engine (plans begin at 9 USD per month).
Quick answer: To add Google custom search to Magento, go to https://cse.google.com/cse/create/new, enter your Magento website URL, click create, then click “get code” and copy it. Replace the Magento search box code in form.mini.phtml with the Google code. Google custom search is free but shows ads; Expertrec plans begin at 9 USD per month.
| Option | Cost | Ads |
|---|---|---|
| Google custom search | Free | Shows ads |
| Expertrec custom search | Plans begin at 9 USD per month | Ad-free |
steps to create a Magento google custom search engine –
-
-
Create the engine at cse.google.com
- Enter your Magento website URL and click on create-

-
Get the embed code
Click on “get code”.

- Copy the code-

-
Replace the Magento search box code
Replace the Magento search box code with Google custom search box code. For this step, you might need the help of your developer. The template for Magento search box can be found at app/design/frontend/base/default/template/catalogsearch/form.mini.phtml. We will change this so it will call the google search code. Change this from:
Original Magento form.mini.phtml
<form id="search_mini_form" action="" method="get"> <div class="form-search"> <label for="search"> __('Search:') ?> </label> <input id="search" class="input-text" name="" type="text" value=""> <button class="button" title=""> <span> <span> __('Search') ?> </span> </span> </button> <script type="text/javascript"> </script> </div> </form>to the code that you copied from Google custom search control panel
- That’s it! you have added google custom search to your Magento store. Here are some screenshots of the search user interface which you can further change from your control panel. Here is a demo link built on the data of cosjj ( a Magento store).

-









