How to set up Google Search
To implement your Google Search please go to Settings - Integration. Click "Add" below Search Engines.
You can add several search engines inside your website template admin panel. This allows your search widget to find results in multiple websites if you find it necessary.
You can see that there are four fields:
Search Engine Name
Search Engine ID
To get the first three fields, please visit this link. Here you can create your first Custom Search Engine.
In the Edit search engine, tab click the "Add" button.
You will be prompted to New search engine tab.
In the Sites to search field add your website. You can add as many sites you want to search. This allows your search widget to find results in multiple websites if you find it necessary.
The name of the search engine allows you to name your search engine. This is the first value that needs to be pasted into the Search Engine Name field inside the admin panel.
Once you are done, click the "Create" button.
Congratulations! You have just created your Custom Search Engine. Now please click "Control Panel" to modify your search engine.
Now in a new window, you should copy the Search Engine ID value and paste it inside your website admin panel.
Next, you should scroll down to section Programmatic Access and decide which of the two API's you would like to use.
Custom Search JSON API provides 100 search queries per day for free. If you require more search queries, you can sign up for billing in the API Console. Additional requests cost $5 per 1000 queries, up to 10k queries per day.
Custom Search Site Restricted JSON API requests cost $5 per 1000 queries and there is no daily query limit. You can sign up for billing in the API Console.
Once you decided, click the "Get Started" button.
To test the Custom Search JSON API free edition, click the "Get a Key" button.
In a new window create or add an existing project.
If you are creating a new project, you should specify its name and click next.
After that, you can see a new window with your API key which you can copy to your website admin panel.
!Important! Please be informed that both API generate different keys so if you choose Custom Search API - use a key that you generated for it. If you use restricted Search API - use a key that you generated for restricted API.
This is what you should receive as a result. Note! This information was changed during the testings.
How does it work?
First, you should place the "Google Search" widget on the page you want your visitors to perform a search. You can find this widget in the "More" section.
The Google Search Results widget can be found in the same section.
Note: Results will be displayed in the Google Search Results widget that must be configured on the Results Page.
In the "Google Search" widget please specify the page where Google Search Results widget will be located.
The Google Search Results widget will pull up a search query with a link to that page.
When you are setting up Google Search Results widget, please note that you will need to set up following two settings in order for it to work properly (all other settings can be left with default values and you can change them if you want):
Search Engine feature allows you to select the engine that you created in the first section of this guide. Without it, the widget won't give any results.
Cache Lifetime (hours) feature saves search results in browser cache on your website up to 24 hours. This allows you to save search requests to Google as with some API's they can be paid.
Adding Billing Account
As of 08.13.2018 you are not charged by Google for the creation of a billing account and you are awarded a $300 bonus for 12 months you can use for Google services but as this service is provided by Google these terms are subject to change by Google.
First, you should visit this link to create a billing account. Click the "Add billing" button to proceed further.
You will be redirected to the consent page where you can agree with the Terms of Service from Google. Once it is done you can click on Agree and Continue button.
The next page will request your personal information. There you can select whether you want to register a business or individual user and fill in your personal information.
At the bottom of this page, you also need to specify your billing information(debit/credit card or bank account) to assign it to your account. Once all fields are filled in, you need to click on the Start My Free Trial button.
It will take some time to create an account but once it is done you will see a popup that confirms that your Billing account is created.
Please select your project from the dropdown button.
Then visit the "Billing" tab.
Click on "Link a billing account".