Establishing a Connection
The objects available within our connector are accessible from the "cdata.bing" module. To use the module's objects directly:
- Import the module as follows:
import cdata.bing 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;")
Connecting to Microsoft Bing
To connect to Microsoft Bing, set the APIKey. To obtain the API key, sign into Microsoft Cognitive Services and register for the Bing Search APIs.After you register, a list of endpoints and two keys are generated; you may use either one for the APIKey. You can use the APIVersion property to specify the API version you are connecting to. The possible values are 'V5' and 'V7'. The default value is 'V7'.