The Bing Custom Search API enables you to create tailored ad-free search experiences for topics that you care about. You can specify the domains and webpages for Bing to search, as well as pin, boost, or demote specific content to create a custom view of the web and help your users quickly find relevant search results.

Azure Bing Search

Requirements

  • To use Bing Custom Search, you need to create a custom search instance that defines your view or slice of the web. This instance contains the public domains, websites, and webpages that you want to search, along with any ranking adjustments you may want.
  • You must have a Cognitive Services API account with access to the Bing Search APIs. If you don't have an Azure subscription, you can create an account for free. Before continuing, You will need the access key provided after activating your free trial, or a paid subscription key from your Azure dashboard.

Drupal Modules Provided

Azure Bing Search API module

Integrates Azure Bing Search API with Drupal and provide a convienent service, which can be used in your custom modules.

Setup Azure Bing Search API module

  • Create your first Bing Custom Search instance: See instructions
  • Visit settings page at /admin/config/search/azure_bing_search/settings
  • Add Custom Configuration ID - Generated in step 1 above
  • Add Ocp-Apim-Subscription-Key as Subscription Key.
  • Configure any other defaults you need to tweak.

Usage Example

Using Dependency Injection: See this example on Github

Not Using dependency Injection:

$bingCustomSearchService = \Drupal::service('azure_bing_search.bingcustomsearch');

$results = $bingCustomSearchService->searchResults('mykeyword');

Azure Bing Drupal Search module

Integrates Azure Bing Search with Drupal Core Search. It provides a Search Plugin for the Drupal core search to use Bing Search as a results provider.

Bing Custom Search API

The Custom Search API lets you send a search query to Bing and get back web pages from the slice of Web that your Custom Search instance defines. See more here

API References

Quickstart: Create your first Bing Custom Search instance

To use Bing Custom Search, you need to create a custom search instance that defines your view or slice of the web. This instance contains the public domains, websites, and webpages that you want to search, along with any ranking adjustments you may want. See more details on how to create your first Bing Custom Search instance

Project information

Releases