1

How do we use the Bing API in C#? I have to pass a query to the Bing API and then get the results.

5 Answers 5

5
BingService.BingService service = new BingService.BingService();

        SearchRequest request = new SearchRequest();
        // use your Bing AppID
        request.AppId = ""; /* Your App ID */
        request.Query = "rose"; // your search query

        // I want to search only web
        request.Sources = new SourceType[]
        {
            SourceType.Image 
        };

        SearchResponse response = service.Search(request);

        foreach (ImageResult result in response.Image.Results)
        {

            //lstBxImages.Items.Add("<a href="+result.Url + '"'+"></a>" + result.Title);
            imgliteral.Controls.Add(new LiteralControl("<img src=" + result.MediaUrl + " width=100
Sign up to request clarification or add additional context in comments.

1 Comment

what are the things i need to runn this code, and where do i get them?
2

Download bing dlls from microsoft site and add those dlls . Then only we can able to use bing service.

1 Comment

Hello, any links for where these dlls can be downloaded?
1

Here's something will help you a lot https://github.com/insatmc/BingMapHelper

Comments

0

Just adding to above there is a full documentation of te API given by BING in a PDF.

Here is a Basic Details Version

Comments

0

hii..

Add a bing reference to web references in an application and use search.wsdl

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.