When it comes to web development, you can create everything yourself or you can tap into existing APIs. The benefit of using APIs is that someone else has taken the time to create and code resources you can use. There are thousands of APIs available across a spectrum of areas, however, in this slideshow, we have focused on twelve APIs to help you get the most out of Microsoft Bing. Each provides you with access to key areas related to Bing and the Bing search. Check out the following slides to see what available APIs you can start using today!
Bing is known as a search engine, so the first API to make the list is the Bing Custom Search API. This is an ad-free, commercial-grade search API. It enables you to provide search results on your page from Bing. You have control over the results and can tap into additional features such as query suggestions, Bing ranking, and usage insights. This includes the ability to filter to only the areas of the web you care about (including just your own sites). You also have the ability to use the API and services in an ad-free manner.
While the Bing Custom Search offers all things to all apps, as a web developer, you are likely more interested in the Bing Web Search API. This API allows you to search through webpages, images, videos, and news. Using the API, you can retrieve information from the web and filter or sort the results based on a number of criteria. This includes the ability to filter on type as well as on how old the information is (“freshness”).
Sometimes it is nice to skip the text and focus on the pictures! With the Bing Image Search API, you can access the web and return results including thumbnails, image URLs, image licensing, layout, image metadata and more. As part of the searches performed with the API, you can also filter on things such as SafeSearch criteria. For example, if your site is kid-friendly, you can set your image searches to be strict for SafeSearch.
As with many of the Bing APIs, you can also get statistics from your searches. This includes getting information on images that are trending.
The Bing Ads API allows you access to the Microsoft Advertising pay-per-click (PPC) advertising platform. Using this platform, you can display ads based on the keywords a user has placed in their search query. Simply put, the Bing Ads API provides an interface to Microsoft Advertising. Using this API and the Ad Extensions provided by Microsoft, you can provide custom ad presentations with targeted relevance.
Helping your users is almost always a good thing. As such, providing suggestions when they are searching can get the user to the result they want faster. Additionally, with this API you can also help them get them to the result you want them to get to. The Bing Autosuggest API allows you to add intelligent type-ahead capabilities to the searching on your sites.
If you work with maps, geocoding, reverse-geocoding, routing or even static imagery, then the Bing Maps REST Services API could be of value to you. Using this API, you can do things such as geocode a mailing address, add pushpins to a map image, create travel routes, and much more. Other features you can access with the Bing Maps API include getting traffic information and determining a time zone based on a location.
For developers building applications using .NET, there is also a portable class library available to make the mapping features even easier to apply to your apps and sites.
One of the benefits of search-type APIs is that they can be used to pull additional, related information onto your web sites. The Bing News Search API is one that can be used to add links for related news to your pages. The API will provide things such as the provider’s information, the article URL, the date the news piece was added, related news items and categories, as well as a related image if available. The news can be categorized by major topics including politics, sports, Hollywood updates, world news, and more. Additionally, like other Bing APIs, you can filter by items such as the market, SafeSearch and freshness.
The Bing Speech API let’s you tap into the Microsoft Speech API to add the ability to convert speech to text and text to speech. Using the built-in speech services, you can take advantage of natural voice processing along with features such as language translation.
There are undoubtedly people who use your site that might not be the best spellers. As such, tapping the Bing Spell Check API can help in guiding your users to the appropriate spelling or help them get to the right name brand or use of a slang term. All of this results in a higher likelihood that they will have a positive experience on your site. Other areas where the Spell Check API can help is with correcting word-breaking issues and in working with misplaced homonyms in text.
More and more web content is being presented in a video format. With the Bing Video API, you can add a number of different video search features to your site. This includes the search based on metadata, encoding, resolution, video length, market, SafeSearch, freshness, and more. The Video Search API will provide results that can include preview thumbnails that are in a static or animated GIF format.
Unfortunately, not all APIs are free. Sometimes you must pay to get functionality. In the case of the Bing APIs, you can subscribe to only what you need and pay for what you use. There is a free tier that can be used to set up the APIs and determine if it is right for you. It is limited to 1 transaction per second and 1,000 transactions per month. When you are ready for more than that, the there is a cost per 1,000 transactions to be considered. You can find the pricing at:
If you choose to use any of the Bing APIs, then Microsoft has not only provided example of their use, but also the JSON code needed to apply them to your site. For example, you can find an example of the Bing Image Search API along with the JSON code at:
All the Bing APIs are part of Microsoft’s Cognitive Services. The Cognitive Services also offer a lot of other APIs outside of Bing and search. Many of the cool Cognitive Services APIs will be presented in the next slide show on HMTLGoodies!