Using the new Bing Web Search API from PowerShell

July 22, 2012

in Uncategorized

I wrote a function for retrieving search results from the new Microsoft Bing API, the old version stops working in August.

It’s up on GitHub.

Authorization

The new Bing Search API is now available on Windows Azure Marketplace. The PowerShell function is using the new v3 Invoke-RestMethod cmdlet and passes the encrypted Bing API Key in the header.

Invoke-RestMethod -Uri $BingUrl -Headers @{Authorization=$s}

Bing Subscription

To try it out , register and get an API key. You can register for one that lets you do free searching.

Want to see more

Check out my book Windows PowerShell for Developers. I cover PowerShell interacting with the Web and more.

  • Slice and dice Text, XML, CSV, and JSON effortlessly
  • Embed PowerShell to provide scripting abilities for your C# apps
  • Create GUI applications five to ten times faster with less code
  • Leverage PowerShell’s capabilities to work with the Internet
  • Interact with DLLs and create objects, automatically display properties, and call methods in live interactive sessions
  • Build domain-specific languages (DSLs) and vocabularies to express solutions more clearly
  • Work with Microsoft Office via the Component Object Model (COM)
  • Discover PowerShell v3 features included with Windows 8 and Windows Server 2012

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Contrat Creative Commons

© 2007-2013, Doug Finke