Connecting to Google Search
To establish a connection to Google Search provide a CustomSearchId and APIKey.
Creating a Custom Search Engine
To start searching websites through the cmdlet, follow the steps below:
- Sign into the Google Custom Search Engine site.
- Click New Search Engine and add a site to focus the search on.
- Click Edit Seach Engine, select your search engine in the menu, and then click Setup.
- In the Details section, click Search Engine Id to retrieve the search engine Id used as the CustomSearchId in the connection string.
- In the Sites to Search section, you can additionally select the Search the Entire Web but Emphasize Included Sites option in the menu.
Getting the API Key
To authenticate requests to the Custom Search API, follow the steps below:
- Log into the Google API console and select a project.
- In the side bar under APIs & Services, click Library and then select the Custom Search API. Click Enable.
- In the side bar, click APIs & Services -> Credentials.
- Click Create Credentials -> API Key.
- Select the API Key to restrict the key to your platform.