Generate A Bing Search Api Key

Posted on
Generate A Bing Search Api Key Average ratng: 5,0/5 1523 votes

Api Key Billing Information. Ebay Search API. Generate ssh private key windows. X Google Search Events Jobs Product Reverse Image Scholar Scholar Cite Maps Baidu Search Bing Search Yahoo!

  • When you use the Bing Maps APIs with a valid Bing Maps Key, usage transactions are logged. You can view detailed reports of your Bing Maps usage in the Bing Maps Dev Center. For more information, see Understanding Bing Maps Transactions.
  • This is the reason why I decided to rewrite all of these VBA functions while guiding you on how to get a free Google API Key that is now required. August 2018 Update: Due to the new Google’s pricing in effect for the entire Maps Platform (started on July 16, 2018), I decided to re-write this guide, to follow along with their updated policy.
  • Bing Answer Search API taps into advancements in AI to provide comprehensive answers—faster. With the help of machine learning, Bing understands and interprets user queries, returning relevant results from Bing’s industry-leading web index and knowledge graph. This API does the heavy lifting so that users can get answers faster.
8 Feb 2018MIT
Basic code scenarios using Bing Search API endpoints to search the Web

Introduction

Bing Search API is a set of REST interfaces that find web pages, news, images, videos, entities, related searches, spelling corrections, and more in response to queries from any programming language that can generate a web request. Applications that need information from the web use the Bing Search APIs to get results in JSON format adaptable to their requirements.

Bing Search APIs include specialized endpoints for the following types:

  • Bing Web Search API - Includes Web pages and all the other types mentioned below, such as images, videos, news, related searches, spelling corrections, etc.
  • Bing News Search API - Provides news items relevant to user’s query. It also provides news for specific categories, such as health, sports, etc., and news trending at any point in time.
  • Bing Video Search API - Returns relevant videos. It also provides endpoints for similar videos and trending videos.
  • Bing Image Search API - Similar to video search API, this API has 3 endpoints: image search, similar images, and trending images.
  • Bing Entity Search API - Summary information about people, places, organizations, products, and other concepts
  • Bing Custom Search API - Supports customized search to get results from specific sources on the web: domains, subsites, or webpages.
  • Bing Autosuggest API - Provides query completion capability for partial strings.
  • Bing Spell Check API - Provides spelling and Grammar correction for short strings or large paragraphs

To experiment with the Bing Search API, you'll need an API access key, which is available at Azure: Try Cognitive Services.

Basic Programmatic Search

For simplicity, the following code sample uses the Bing Web Search API. The other endpoints use similar procedures. The Bing Web Search API is useful for finding web resources such as sites, images, videos, news, and entities for a given query. You can write code in any language that can send a GET request to the following endpoint:

Every request to the Bing Web Search API must include a header that contains the Ocp-Apim-Subscription-Key, which is your private access key. Access Keys are available for exploring these APIs.

With an access key, the basic code scenario in Java might look like this:

See the Java project source code for details of this excerpt.

Generate A Bing Search Api Key Yahoo

Parsing results is discussed in the final section of this article.

The following code snippet shows the request code sequence in C#.

See the C# project source code for details of this excerpt.

Parsing results is discussed in the final section of this article.

Endpoints for Other Bing APIs

This section summarizes endpoints for various Bing Search APIs.

Bing Web Search API

As discussed in the previous example, the web search endpoint returns webpages, news, images, videos, entities, and related searches along with spelling corrections. The web search API endpoint follows:

Bing News Search API

The Bing News Search API supports three endpoints.

The following endpoint returns news articles for a given query:

The second endpoint, following, returns news articles for a given category such as health, business, sports, etc.

Generate A Bing Search Api Key

Finally, the third endpoint returns news topics that are currently trending on social networks:

Bing Video Search API

The Bing Video Search API has three endpoints. The following endpoint returns videos for a given query:

The second video endpoint, following, can be used to get videos similar to the one identified by Your_Video_Id. The “Modules” parameter is used to get the videos related to the video mentioned in the “id” parameter.

Generate A Bing Search Api Key Code

The final video endpoint returns videos that are trending at the moment. Results are separated into different categories, for example, based on noteworthy people or events.

Bing Image Search API

Bing Image Search API has three endpoints, which are similar in functionality to the Bing Video Search endpoints The following endpoint returns images relevant to a given query.

Generate A Bing Search Api Key Download

The second endpoint provides insights about a given image, such as similar images or the source of a given image. The “Modules” parameter can be used to derive various insights. The following request searches for images similar to that at a given image URL.

The final image endpoint returns trending images.

Bing Custom Search

Bing Custom Search returns results based on sources specified by the user. For information about defining sources, see Bing Custom Search. As with other endpoints, the query is defined by the URL parameter: ?q=” ”.

Bing Autosuggest

Bing Autosuggest takes a partial query and returns suggestions for other queries based on the user’s past queries or tending queries. The results can be used to autocomplete phrases or terms.

Bing Spell Check

Bing Spell Check takes a text and checks spelling and grammar. The response returned by the following endpoint includes the original text and token suggestions that correct it.

JSON Search Results

Google Search Api

The Bing Search API returns results as JSON objects to be parsed as text. You can use the following code to parse the JSON responses for console display:

Java sample for JSON parsing:

C# sample for JSON parsing:

For more examples, see the following github repo: cognitive-services-REST-api-samples.

History

  • 20th December, 2017: First draft
  • Added link to access key page