Saturday, August 28, 2021

 

Bing Search API   

 

Introduction: This article is a continuation of the series of articles starting with the description of SignalR service. We followed up with a discussion of Azure Gateway service, Azure Private Link, and Azure Private Endpoint and the benefit of diverting traffic to the Azure Backbone network. Then we started reviewing a more public internet-facing service such as the Bing API

 

Description:   

Azure Bing API is developer-friendly and provides a robust way of searching custom and scoped content with the same standard as the public internet. A customized search instance can be created using the Bing custom search portal. Bing Search API maintains an index for the internet using web crawlers.  The Bing Search API is also an Azure Resource available via the Azure Marketplace. We reviewed the use Bing API together with Cognitive service text analytics for brand management in this article.  It featured the use of natural language processing with this sample.But there are other kinds of analysis also possible. Bing provides comprehensive Bing statistics which can be enabled on the Bing Azure Resource via the Azure Portal. Predefined dashboards show the results from the analytics which we followed up on in another article. This one focuses on the requirements from using the public facing Bing web search engine API.

 

The use and display requirements apply to any implementation involving content, relationships, metadata and other signals emitted by the Bing Web Search APIs. All the apis for each of the entities are subject to these requirements. The term content is used to include answers which are the search query results returned in response to a request to a Bing Web Search API. The response is more than just the answer and carries some envelope information. Each answer may have several search results and their attributes and the term content refers directly to an answer. One of the primary requirements is that any content may only be used in internet based search experiences. This experience follows up on user initiated search query and is pertinent only to that query. It helps the user find and navigate to the response’s data answer. The user is empowered to select from the many search results returned. There must always be an indication that the content came from a web search query. Finally, there is a requirement for disclosure such that no laws are broken.

 

Aside from the requirements, the restrictions include the following: 1) prevent copy, store or cache the data from responses except as required for continuity across calls 2) prevent the data from usage for machine learning purposes because the data should be fetched directly from the source instead of relying on the search results which may vary, 3) prevent the content from being modified or tampered with, 4) prevent removal of attributables to the origin of the search result, 5) prevent reordering of the search results, 6) prevent the display of content that was not part of the response, 7) prevent the display of advertising that did not already come with the response, and 8) prevent additional ads to be shown on the page where the content is rendered.

 

Compliance requires a few additional criteria such as the privacy statement and the trademark usage guidelines must always be included as links and featured prominently. This implies that those links will be attributed to Microsoft but does not imply that any particular portion of the response is displayed from the Bing Custom Search API.

 

Conclusion: These are the ways in which the Bing Search Web API can be used, and it is available as just another cloud resource along with the benefits that come with a cloud service.   

 

 

 

 

Friday, August 27, 2021

 Bing Search API 

 

Introduction: This article is a continuation of the series of articles starting with the description of SignalRservice. We followed up with a discussion of Azure Gateway service, Azure Private Link, and Azure Private Endpoint and the benefit of diverting traffic to the Azure Backbone network. Then we started reviewing a more public internet-facing service such as the Bing API.  

 

Description:  

Azure Bing API is developer-friendly and provides a robust way of searching custom and scoped content with the same standard as the public internet. A customized search instance can be created using the Bing custom search portal. Bing Search API maintains an index for the internet using web crawlers. The Bing Search API is also an Azure Resource available via the Azure Marketplace. We reviewed the use Bing API together with Cognitive service text analytics for brand management in this article. 

But there are other kinds of analysis also possible. Bing provides comprehensive Bing statistics which can be enabled on the Bing Azure Resource via the Azure Portal. Predefined dashboards show the results from the analytics. 

 

The analytics include call volume, top query strings, geographic distribution, and more.  A pricing tier different from the F0 pricing tier is required to collect the statistics. It increases the subscription rate as well.  The data is updated every 24 hours and retained for 13 months with history that can be accessed from the analytics dashboard. The MSA account authorized to view the dashboard is the same one as the Bing statistics. 

The charts and graphs displayed on the analytics dashboard allow filtering and drill down. Data can be filtered based on resources, markets, endpoints and reporting periods. The ResourceID must be unique since it denotes the Azure subscription.  There can be many IDs when there are many Bing Search API tiersThe markets are where the results come from. All the resources and the markets are included by default. If the caller does not supply a market or if it is unknown, the en-WW market is selected by default. All the endpoints from the Bing search API are included by default. The time frame to select for the charts and graphs includes the option to select all data from the maximum retention period, a custom date range less than the maximum, past month, past week and the past 24 hours. 

 

The call volume shows the number of calls made during the reporting period. It may differ from the billing report because only the successful calls are included for billing purposes.  

 

The top queries and the number of occurrences of each query are displayed and the number can be configured. The paths for which the top queries are not available include /images/trending, /images/details, and similar for videos, news and suggestions. 

 

The response code distribution alone is quite helpful to seeing traffic patterns as well as for troubleshooting client errors. The server-side errors are usually rare and most of the errors are mistyped URLs resulting in Http status code 404 but a variety of other codes are also likely. Their distribution is one of the most helpful charts on the dashboard. 

 

The call origin distribution enumerates the type of browsers sending the requests. Calls from outside the browser are grouped under the libraries. The origin is determined using the request’s User-Agent header value. 

 

The safe search distribution provides the distribution based on the corresponding query parameter value with values for offmoderate or strict. 

Distributions based on other query parameters such as responseFilter and responseServer are also rendered because the cost for categorizing the requests based on these query parameters are similar and they provide incredible value. 

 

Conclusion: These are the ways in which the Bing Search Web API can be used, and it is available as just another cloud resource along with the benefits that come with a cloud service.  

 

 

 

Thursday, August 26, 2021

Bing Search API  

Introduction: This article is a continuation of the series of articles starting with the description of SignalR service. We followed up with a discussion of Azure Gateway service, Azure Private Link, and Azure Private Endpoint and the benefit of diverting traffic to the Azure Backbone network. Then we started reviewing a more public internet-facing service such as the Bing API 

Description 

Azure Bing API is developer-friendly and provides a robust way of searching custom and scoped content with the same standard as the public internet. A customized search instance can be created using the Bing custom search portal. Bing Search API maintains an index for the internet using web crawlers.  The Bing Search API is an Azure Resource available via the Azure Marketplace. After logging in to the Azure portal, one can select either the Bing API resource or the Bing Custom Search resource.  

In this article, we continue with the discussion on advanced features of Bing API. Bing supports deep learning models. Bing uses the Fire Tokenizer which is fast and enables sub-second response time even with the execution of complex data models. The tokenization is compatible with BERT algorithm. BERT just helps with transfer learning where knowledge gained from earlier training is used with novel cases not encountered during training. Transfer learning is a machine learning technique where a model trained on one task is re-purposed on a second related task. It only works in deep learning where the model features learned from the first task are general and the features are suitable to both the base and the target tasks. This form of transfer is also called inductive transfer and the scope for the allowed hypothesis is narrowed down in a beneficial way because the model is fit on a different but related task. When the data is sparse or expensive, this focus becomes especially efficient. Bert is quite popular for Natural language processing, but Bing’s Fire tokenizers allows customizations to models. The original BERT tokenization can handle say 0.4MB/second but this tokenizer can handle up to 15 MB/second. Some of the well-known tokenization algorithms include Moore Machine that finds token boundaries and piece boundaries for Word piece and Mealy machine maps a token into ID and an ID into token such that the ids go from 0 to Number of Tokens - 1

With a subscription key, the Bing Web Search API allows searching billions of documents for content that is relevant to the user’s search string with a simple HTTP GET method. The headers allow continuity across api-calls and allow the responses to be more refined based on the history of searches. Language is can also be specified in the header.   

One specific example of text analytics with Bing Search APIs is its application to track sentiments. Major brands recognize the importance of public sentiment. It has a dual purpose. How the search results show up a brand shows how the world perceives it.  And customers are recognized by brand based on their reputation.  Building trust and maintaining positive control over the brand’s reputation can be achieved with tools such as reputation management from the Bing Search toolkit.  A brand can choose to have these insights gained from the Bing news data provider which is quite large and representative for drawing analysis. News search can be pointed outward to track a competitor’s latest release or announcements. It can also be pointed at the brand name to populate an internal dashboard with new or trending news content regarding that brand. The Bing News Search API allows extracting headlines and excerpts from articles and return them in the response. Articles, social media mentions and opinion columns can be analyzed to detect their sentiments. The Text Analytics API available from Cognitive services can work with this datastream to emit a score between 0 and 100% to show negative or positive sentiments.  Tracking the sentiments help manage the perception.

Other kind of analysis are also possible. Quantitative Analytics on usages for the Bing Search API is provided by ‘enabling the Bing Statistics’ on the Bing Azure Resource via the Azure Portal. Predefined dashboards show analytics.  

Conclusion: These are the ways in which the Bing Search Web API can be used, and it is available as just another cloud resource along with the benefits that come with a cloud service.