Getting Started With Microsoft Azure Cognitive Services - Bing Autosuggest API

In this article, you will learn getting started with Microsoft Azure Cognitive Services - Bing Autosuggest 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 you to read the articles mentioned below.

As defined, Cognitive Services provide the best suite to have interactive, automated models of the Application. It helps to build powerful intelligence into the Applications to enable natural and contextual interactions.

Bing Autosuggest API, as described by Microsoft, gives the app intelligent Autosuggest options, so the users can type less and get to what they want faster. It helps the users to complete the queries faster by adding the intelligent type-ahead capabilities to apps or Websites. Also, it empowers the users to type less and do more with the automated and complete search suggestions.

As seen in the image, mentioned below, when entering C sharp, API suggests all the possible completions.

API

API's JSON result will look as

API

We will learn more about Bing Autosuggest API in later articles. To start with, let's create Cognitive account to use Bing Autosuggest API, using Azure portal.

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

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



Fill the details, mentioned below.

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

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

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

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

  • Resource Group
    It can select the existing Resource group or create a new one.

    API

  • Account Name
    Bingautosuggestwithkasam

  • Subscription
    I have selected my subscription.

  • Resource Group
    I have created a new resource group to group Cognitive related Services, named CodeCognitivewithKasam.

  • API Type
    Cognitive Services provides a set of awesome APIs. For this article, I selected Bing Autosuggest API.

    API

Pricing Tier

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

API

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

Read it carefully and subsequently click, I Agree => Create.

API

After successful creation, the box shown below can be seen in the dashboard (if opted to pin it, while creating).

API

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

Overview => It will list all the details associated with Bing Autosuggest API Cognitive account.

Endpoint is the base URL of RESTful Bing Autosuggest API, provided by Microsoft. 

API

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 Autosuggest API Services.

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

API

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

API

Summary

How easy it is to get started with Cognitive Services. By now, we saw how effortlessly we can create Cognitive Services Bing Autosuggest API account, using Microsoft Azure portal.

We can use the keys being generated to allow our app to communicate with this super cool Bing.

In later articles, we will use the keys and look at how this can be used in our Application. I would recommend you try this and be ready with the keys.

Happy Azure coding.