Establishing a Connection
The objects available within our connector are accessible from the "cdata.googlesearch" module. To use the module's objects directly:
- Import the module as follows:
import cdata.googlesearch as mod
- To establish a connection string, call the connect() method from the connector object using an appropriate connection string, such as:
mod.connect("ApiKey=abc123; CustomSearchID=def456;")
Connecting to Google Search
Provide the following connection properties before adding the authentication properties.
- CustomSearchId: Obtain this value by signing into Google Custom Search Engine and creating a new search engine.
- APIKey: You must enable the Custom Search API in the Google API Console.
For more information on obtaining values for these properties, refer to Connecting to Google Search.