The Google Search Data Service has several steps for setup: Google Developer Console, Custom Search Engine, Creating the Data Service and using a query in the Get Search Results task template.
You must have access to a Google Account to use the Google Search Data Service.
Google Developer Console
Navigate to https://console.cloud.google.com and sign in with your Google Account
Click on Select a project in the upper left corner
Then, in the pop-up window, click on New Project
Set up your New Project
- Project Name: Enter a name for your project
- Project ID: Enter an ID for your project
- Location: Select the appropriate account location
- Select Create
On the main Developer Console Page, select your project from the drop down
Click on APIs & Services in the Quick access section.
Select Enable APIs and Services in the top menu bar
In the API Library, type custom search in the search bar
Select Custom Search API
Click on Enable to enable usage of the custom search engine
Next we will create a credential to use the API
Select Credentials on the left hand navigation pane
Click on Create Credentials
Select API key to create an API key credential
Once the API key is created, copy the API key into a text editor as you will need it later on
Then, click on Edit API key to add restrictions to the key's usage
OPTIONAL: Rename the API key (i.e. Openprise Custom Search API key)
Select IP addresses for application restrictions
Check with your CS Team for the IP addresses to whitelist
Click on Add an item in the Accept request from these server IP addresses section to whitelist
Scroll down to the API restrictions section and select Restrict key
Click on the dropdown to search for the API to use with the API key and type custom search
Check the Custom Search API option
Scroll to the bottom and click Save
Custom Search Engine
Navigate to https://cse.google.com/cse/all
If asked to sign in, sign in with the same account as used earlier
Create a new search engine by clicking the Add button
- Enter a name for the search engine (i.e. Openprise mover project)
- Enter a website to search (i.e. linkedin.com)
- Choose SafeSearch to further limit search results
- Click on I'm not a robot captcha and then click Create
After creation, Click on Customize
Then, find the Search engine ID in the overview section and copy the ID to a text editor
Create Google Search Data Service in Openprise
Navigate to Data - Data Services
Select Add Data Service
Select Google Search in the select Technology section
Click Add Account Information
- Email: enter the email account used when creating the Custom Search Engine
- Search engine ID: enter the search engine ID
- API key: enter the API key
- Click Save
You will now see a new data service created on the on the main data services screen in Openprise
Use the Get Search Results Task Template
Create a job and use the Get Search Results Task Template
Select the Google Custom Search Data Service you created in the data service section
The most important part of using Custom Search is the Query attribute, which represents the search string used
Configure Search String (optional)
Below is an example of using the Concatenate attributes task template to create a search string