Microsoft released their new search engine called “Bing” at, aptly named, http://www.bing.com. Microsoft is getting positive reviews from the likes of CNET, The Wall Street Journal, and TechCrunch. Instead of posting my review of the site, I’ll let you browse the above links to find out what the services is all about.
What interested me about Bing is that Microsoft has released a full API to allow you to use their services in your applications. The Bing API is documented at Microsoft’s developer site and I thought to myself how I could test it out. The obvious answer was PowerShell of course. My previous PoshTweet Twitter Library has been fairly popular so I figured I’d give a “library” type project another go around and tackle the Bing APIs.
The Bing API has the concept of “SourceTypes” which are essentially data sources that you can search into. My script library provides access to the Image, InstantAnswer, News, MobileWeb, Phonebook, RelatedSearch, Spell, Web, Translation, and Video SourceTypes with the following functions:
- Get-BingImage – Search the Image SourceType for a list of images including properties about the media files.
- Get-BingInstantAnswer – Get single, authoritative answers to questions.
- Get-BingNews – Provide news specific to a topic, a location, or breaking news.
- Get-BingMobileWeb – Returns mobile web results, primarily relevant XHTML or WML pages.
- Get-BingPhonebook – Enables you to view details about a business for which you are searching as if they were a phonebook entry.
- Get-BingRelatedSearch – View searches that provide information in which you might be interested, based on your current search.
- Get-BingSpell – Query alternative spellings for a given word or phrase.
- Get-BingWeb – Get pages relevant to the queried terms.
- Get-BingTranslation – Translate a term from one language to another.
- Get-BingVideo – return a list of videos and their properties relevant to the query terms.
I’ve included parsing for the response streams for the above SourceTypes, but if you would like to get the raw XML back, all of the above functions include a “-raw” parameter to allow you to bypass the response processing.
This little script has taken on a life of it’s own. As a consequence, I’ve created a project on CodePlex.com to manage the distributions. You can access it now at the following link: