This guide will show you how to set up the Google API and Custom search engine (CSE) for usage with the google module. All of this is free if you don't exceed 100 queries a day for the CSE API.
In order to use any of the google APIs, you will need to set a Cloud project up.
-
Navigate to the Google Cloud console homepage
The Project is set up now, a notification will pop up saying it is creating. Wait for it to finish creating the project and hit Select project
If the notification doesn't appear for whatever reason you can also click on Select project
in the top left corner and click on your new project.
Now we will need to enable the two relevant APIs - CSE v1 and Youtube data v3.
-
Hit search and look up
Custom search
, go to theCustom search API
menu
-
Once here, you can hit
Enable
Both APIs used by Turingbot are now enabled, we can move on to creating an API key.
-
Click
Create credentials
and selectAPI Key
from the popup menu
-
A screen with your API key will now show up, please copy it into a safe place as you won't be able to see it again.
-
As a safety precaution, you can click on the newly created API key entry and restrict it to only use the
Custom search engine
andYoutube Data
APIs.
Now that we have the relevant APIs enabled and have a valid API key prepared, we can create a custom search engine to use.
-
Click
Get started
, then click onAdd
-
For use with TuringBot select the
Search the entire web
option, enableImage search
.SafeSearch
is optional but preferred. Once done, hitCreate
-
Once you hit
Create
you will get a short Javascript snippet with its implementation, you can copy the ID from the first line aftercx=
or you can hitCustomize
and copy theSearch engine ID
from there.
You now have all the necessary credentials to use the Google module.