Getting Started With Microsoft Azure Cognitive Services - Bing Search API

This article is in continuation of my articles related to Cognitive Services. I came across some complicated articles on Cognitive Services, but as I've been working on this service for the last six months, I thought of writing simple, step by step articles on the same.

If you have landed directly on this article, I also recommend that you read the following.

As defined, Cognitive Services provides the best suite for having interactive, automated models of application. It helps to build powerful intelligence into applications to enable natural and contextual interactions.

The Bing Search API, as stated by Microsoft, makes your apps, web-pages, and other experiences smarter and more engaging. It provides the following APIs.

  • Bing Web Search API
    Get enhanced search details from billions of web documents

  • Bing Image Search API
    Search for images and get comprehensive results

  • Bing Video Search API
    Search for videos and get comprehensive results

  • Bing News Search API
    Search for news and get comprehensive results

This Bing Search APIs are just one call away — and available ad-free. We will learn more about Bing Search API in later articles. To start with, let's create Cognitive account to use Bing Search API, using Azure Portal.

Here, let's assume that you have Azure Portal account. If not, create your free Azure account.

Once done with account creation, Click '+’ => Category, Intelligence + analytics => Services, Cognitive Services APIs.



Fill in below details

  • Account Name
    Unique name for cognitive Bing Search API account.

  • Subscription
    Free; or in case of any subscription you have, must be selected here.

  • API Type
    Cognitive Service provides a set of awesome APIs. For this article, we will go with Bing Search API.

  • Pricing Tier
    As per API selected, pricing option will be listed. Select anyone among the listed options.

  • Resource Group
    Can select existing Resource group or create new.



  • Account Name
    BingSearchwithKasam

  • Subscription
    Have selected my subscription.

  • Resource Group
    Created new resource group for grouping Cognitive related services, named CodeCognitivewithKasam

  • API Type
    Cognitive services provide a set of awesome APIs. For this article, selected Bing Search API.



Pricing Tier

For Bing Search API selected, the below pricing options are listed. Let's select S1 Standard as pricing tier. You can go with other options, which are available in the free trial account.



Once done with choosing a pricing tier, Click on "Legal Terms" option. A blade with detailed terms will be displayed.

Read it carefully and then click, I Agree



Once you agree with legal terms, click => Create



After successful creation, the below box could be seen in Dashboard (if you have opted to pin it, while creating it).



Click on Resource groups => CodeCognitivewithKasam (resource group selected) => Overview. Bing Search API cognitive account created will be listed. Click on the account name.

Overview => Will list all details associated with Bing Search API Cognitive account.

Endpoint is base URL of RESTful Bing Search API provided by Microsoft. Will look into it with deep details in coming articles.



Click on Keys under Resource Management. This will list the key details (Key 1, Key 2), which we will be using in our application to leverage Bing Search API services.

We can also regenerate this Key by clicking Regenerate Key option available, as shown below.



Click on Quick Start for a quick introduction of Cognitive Services, along with API documentation to use Cognitive Bing Search APIs



Summary

How easy it is to get started with Cognitive Services. By now, we saw how effortlessly we can create Cognitive Services Bing search APIs account, using Microsoft Azure Portal. We can use the Keys being generated, to allow our app to communicate with super cool Bing Search APIs. In later articles, we will use Keys and look at how this could be used in our application. I would recommend you to try this and be ready with Keys.

Happy Azure coding!