Bing search API not working with my Class Library Project

Answered Bing search API not working with my Class Library Project

  • Sunday, November 11, 2012 2:17 AM
     
     

    I am integrating bing search API in my C# Class Library project and it is not working! Could you help me with it?

    I am following the 'Bing APi Migration Guide' located here and have downloaded a copy of BingSearchContainer.cs from here.

    Here is the code in my application

    Search URL - https://api.datamarket.azure.com/Bing/Search/ 

    Subscription - 5000 transactions/month on Bing Search API

    The webQuery.Execute method is not working and I am not getting the expected results

    Firstly, the webQuery has a '()' appended at the end of the URL. After calling the bingContainer.Web methof, the query is something like  https://api.datamarket.azure.com/Bing/Search/Web()?Query='iphone 5 review'

    Here is the output that I received on executing the Query.. I am not seeing any results in it


    --Amrish

All Replies

  • Monday, November 12, 2012 7:25 AM
     
     

    HI

    Why you add this "()" to your query string?

    I follow the migrate guide and it works for me.

  • Monday, November 12, 2012 10:38 PM
     
     Answered

    @i2infinity

    Your bingContainer.Web method should look similar to this:

    var webQuery = bingContainer.Web("XBox", "", "", "en-US", "Moderate", 0, 0, "");

    After processing the line above, examine the property:

    [System.Data.Services.Client.DataServiceQuery<Bing.WebResult>.DataServiceOrderedQuery]

    ...to review the results returned.

    Thanks

    Lester