Bing API moved to Azure

Jul 16, 2012 at 5:33 PM

Tried this and learned that the Bing API now lives in Azure, and am pretty sure the CodePlex project needs to be updated to the new API on Azure.

Here's a sample:

### Load the C# file they provide as a sample client
Add-Type -Path E:\Scratch\BingSearchContainer.cs -ReferencedAssemblies System.Data.Services.Client
### Create the Object
$bingContainer = New-Object Bing.BingSearchContainer(New-Object URI 'https://api.datamarket.azure.com/Bing/Search/')
### You need an account key here - free when you sign up for Azure free trial
$bingContainer.Credentials = New-Object System.Net.NetworkCredential('foooooooooooooooooo=','foooooooooooooooooo=')
### Create an Image search
$imageQuery = $bingContainer.Image('PowerShell',$null,'en-US','Moderate',$null,$null,$null)
### Execute and display the results
$imageQueryResults = $imageQuery.Execute()
Foreach($result in $imageQueryResults)
{
    $result.Title
}