Giter VIP home page Giter VIP logo

bing-docs's Introduction

bing-docs's People

Contributors

alekhyasasi avatar alexbuckgit avatar arwong avatar cmcclister avatar dhurataj avatar fenxu avatar ghiathajam avatar hnky avatar jaggerbodas-ms avatar jmart1428 avatar josmperez1 avatar justpies avatar microsoft-github-policy-service[bot] avatar mohtaha7 avatar nacharya1 avatar nkgami avatar oskarwojciski avatar roudabeh1348 avatar swhite-msft avatar syntaxc4 avatar tfosmark avatar v-emilypr avatar weisisheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bing-docs's Issues

Code samples links are broken

Code samples links inluded in the two tables of sections "Samples using native HTTP GET requests" and "Samples using the Bing client library" are broken and need to be updated


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Yes but where do I get a key?

[Enter feedback here]

Would help if you gave some clues how to get a key.
Also remember that the azure portal is a twisty maze so you might have to describe well kinds of things you need to look for - as it's probably hard to get to the page where the actual button is.

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Github link dead (404)

[Enter feedback here]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Sample links broken

The links to the api samples are incorrect, or the pages don't exist


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

"Samples using native HTTP GET requests" -> Broken Github Links

Those github links under "Samples using native HTTP GET requests" are all returning 404s


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

dead links to Bing Web Search samples

links to github sample locations are throwing 404s.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Need procedure to get setup subscription key

How to setup subscription key for the Bing Spell Check API?
[Enter feedback here]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

using System.Globalization; is missing - required for CultureInfo

[Enter feedback here]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

https://api.bing.microsoft.com/v7.0/search

[Enter feedback here]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Github links provided as REST samples shows 404 error

The github links provided as REST samples shows 404 error. It would be great if working links are provided.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

q parameter bug

There seems to be a bug in the q search parameter. If I do:

https://www.bing.com?q=site:example.com&q=something

It only takes the last search parameter and doesn't combine all the search parameters.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Trending Topics call ends up with 401 Permission denied

Hello bing-docs team,

I am integrating bing news API. World news, categorical news fetch are all working.
But when I fetch for trendingtopics (https://api.bing.microsoft.com/v7.0/news/trendingtopics), it says subscription key is wrong. Does this endpoint required additional pricing plan or something?

Thanks much!


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

GitHub Link is broken

Github link in the first paragraph leads to 404.

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Github project not found

The mentioned github project links are not working.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Hangs on client.GetAsync

No timeout or nothing. I tried both subscription keys. Works fine in Fiddler. Net 4.72

`

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net.Http.Headers;
using System.Net.Http;
using Newtonsoft.Json;

namespace BingWebSearchTest
{
public partial class frmTest : Form
{
private static string _subscriptionKey = "xxxx";
private static string _baseUri = "https://api.bing.microsoft.com/v7.0/images/search";

    // The user's search string.

    private static string searchString = "hummingbird";

    // To page through the images, you'll need the next offset that Bing returns.

    private static long _nextOffset = 0;

    // To get additional insights about the image, you'll need the image's
    // insights token (see Visual Search API).

    private static string _insightsToken = null;

    // Bing uses the X-MSEdge-ClientID header to provide users with consistent
    // behavior across Bing API calls. See the reference documentation
    // for usage.

    private static string _clientIdHeader = null;
    private const string QUERY_PARAMETER = "?q=";  // Required
    private const string MKT_PARAMETER = "&mkt=";  // Strongly suggested
    private const string COUNT_PARAMETER = "&count=";
    private const string OFFSET_PARAMETER = "&offset=";
    private const string ID_PARAMETER = "&id=";
    private const string SAFE_SEARCH_PARAMETER = "&safeSearch=";
    private const string ASPECT_PARAMETER = "&aspect=";
    private const string COLOR_PARAMETER = "&color=";
    private const string FRESHNESS_PARAMETER = "&freshness=";
    private const string HEIGHT_PARAMETER = "&height=";
    private const string WIDTH_PARAMETER = "&width=";
    private const string IMAGE_CONTENT_PARAMETER = "&imageContent=";
    private const string IMAGE_TYPE_PARAMETER = "&imageType=";
    private const string LICENSE_PARAMETER = "&license=";
    private const string MAX_FILE_SIZE_PARAMETER = "&maxFileSize=";
    private const string MIN_FILE_SIZE_PARAMETER = "&minFileSize=";
    private const string MAX_HEIGHT_PARAMETER = "&maxHeight=";
    private const string MIN_HEIGHT_PARAMETER = "&minHeight=";
    private const string MAX_WIDTH_PARAMETER = "&maxWidth=";
    private const string MIN_WIDTH_PARAMETER = "&minWidth=";
    private const string SIZE_PARAMETER = "&size=";

    public frmTest()
    {
        InitializeComponent();
    }

    private void frmTest_Load(object sender, EventArgs e)
    {
    }

    private async Task RunAsync()
    {
        try
        {
            // Remember to encode the q query parameter.

            var queryString = QUERY_PARAMETER + Uri.EscapeDataString(searchString);
            queryString += MKT_PARAMETER + "en-us";

            HttpResponseMessage response = await MakeRequestAsync(queryString);

            _clientIdHeader = response.Headers.GetValues("X-MSEdge-ClientID").FirstOrDefault();

            // This example uses dictionaries instead of objects to access the response data.

            var contentString = await response.Content.ReadAsStringAsync();
            Dictionary<string, object> searchResponse = JsonConvert.DeserializeObject<Dictionary<string, object>>(contentString);

            if (response.IsSuccessStatusCode)
            {
                ShowImages(searchResponse);
            }
            else
            {
                PrintErrors(response.Headers, searchResponse);
            }
        }
        catch (Exception e)
        {
            Console.WriteLine(e.Message);
        }

        Console.WriteLine("\nPress ENTER to exit...");
        Console.ReadLine();
    }

    private void ShowImages(Dictionary<string, object> response)
    {
        Console.WriteLine("The response contains the following images:\n");

        // This example prints the first page of images but if you want to page
        // through the images, you need to capture the next offset that Bing returns.

        _nextOffset = (long)response["nextOffset"];

        var images = response["value"] as Newtonsoft.Json.Linq.JToken;

        foreach (Newtonsoft.Json.Linq.JToken image in images)
        {
            Console.WriteLine("Thumbnail: " + image["thumbnailUrl"]);
            Console.WriteLine("Thumbnail size: {0} (w) x {1} (h) ", image["thumbnail"]["width"], image["thumbnail"]["height"]);
            Console.WriteLine("Original image: " + image["contentUrl"]);
            Console.WriteLine("Original image size: {0} (w) x {1} (h) ", image["width"], image["height"]);
            Console.WriteLine("Host: {0} ({1})", image["hostPageDomainFriendlyName"], image["hostPageDisplayUrl"]);
            Console.WriteLine();

            // If you want to get additional insights about the image, capture the
            // image token that you use when calling Visual Search API.

            _insightsToken = (string)image["imageInsightsToken"];
        }
    }

    private async Task<HttpResponseMessage> MakeRequestAsync(string queryString)
    {
        var client = new HttpClient();

        // Request headers. The subscription key is the only required header but you should
        // include User-Agent (especially for mobile), X-MSEdge-ClientID, X-Search-Location
        // and X-MSEdge-ClientIP (especially for local aware queries).

        client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", _subscriptionKey);

        // hangs here:
        return (await client.GetAsync(_baseUri + queryString));
    }

    private void PrintErrors(HttpResponseHeaders headers, Dictionary<String, object> response)
    {
        Console.WriteLine("The response contains the following errors:\n");

        object value;

        if (response.TryGetValue("error", out value))  // typically 401, 403
        {
            PrintError(response["error"] as Newtonsoft.Json.Linq.JToken);
        }
        else if (response.TryGetValue("errors", out value))
        {
            // Bing API error

            foreach (Newtonsoft.Json.Linq.JToken error in response["errors"] as Newtonsoft.Json.Linq.JToken)
            {
                PrintError(error);
            }

            // Included only when HTTP status code is 400; not included with 401 or 403.

            IEnumerable<string> headerValues;
            if (headers.TryGetValues("BingAPIs-TraceId", out headerValues))
            {
                Console.WriteLine("\nTrace ID: " + headerValues.FirstOrDefault());
            }
        }

    }

    private void PrintError(Newtonsoft.Json.Linq.JToken error)
    {
        string value = null;

        Console.WriteLine("Code: " + error["code"]);
        Console.WriteLine("Message: " + error["message"]);

        if ((value = (string)error["parameter"]) != null)
        {
            Console.WriteLine("Parameter: " + value);
        }

        if ((value = (string)error["value"]) != null)
        {
            Console.WriteLine("Value: " + value);
        }
    }

    private void cmdSearch_Click(object sender, EventArgs e)
    {
        RunAsync().Wait();
    }
}

}
`

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Shopping Sources Image Not Returned

Good day,

First, I do not get Offers for shoppingSources in Tags > Actions > Data, rather I see it in Tags > Actions > Data > Value > insightsMetadata. Also, Not all records in offers have images (in seller) and those with image carry non relevant images not close to the product image at all.

Please are my missing something and how can this issue be fixed?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Text refers to wrong API

Under "Recommended Content" Text below link to Spell Check API reference
Screenshot 2022-04-12 162603
Screenshot 2022-04-12 162603
refers to Video Search API instead of Spell Check API.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Sample links broken

Hi, the links on this page appear to be broken....


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Most links are broken

Most links in that documentation page are broken links.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Bing search samples missing

The nodejs links are not accessible (404)

looking through Microsoft repository, no sample are available, just 3 sdk.
Either they are hidden from non-members, or the urls are broken.

How can I access them ?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Wrong search url

Search URL seems to be wrong. Page should say
https://api.bing.microsoft.com/v7.0/news/search?q=mt+rainier


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Getting HTTP Error 400. The request hostname is invalid

I have signed up for Microsoft.BingSearch in Azure portal and when I try to search, I get HTTP 400.

Please help


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Links broken

[Enter feedback here]

Samples using native HTTP GET requests
All example links are 404


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

The Search Operation under Web Search API - v7 is not supported with the current subscription key and pricing tier Bing.CustomSearch.S1

[Enter feedback here]
Following the instructions at https://docs.microsoft.com/en-us/azure/cognitive-services/bing-custom-search/overview

Bing Search APIs are moving from Cognitive Services to Bing Search Services. Starting October 30, 2020, any new instances of Bing Search need to be provisioned following the process documented https://docs.microsoft.com/en-us/bing/search-apis/bing-web-search/create-bing-search-service-resource

After creating an S1 BingCustomSearch subscription and testing it at

https://api.bing.microsoft.com/v7.0/search?q=cat&count=1

I get the following error

{
"error": {
"code": "401",
"message": "The Search Operation under Web Search API - v7 is not supported with the current subscription key and pricing tier Bing.CustomSearch.S1."
}
}


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Link for "Bing Image Search API samples" no longer valid

Expected Behavior

I can visit the sample code pages and view the sample codes for Image Search API.

Actual Behavior

All links show Github:404 page.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Make It Easier for People to Try the API

It would be a big value add, if you could let people test the API on this page, like Google does.

It would be way easier to see if this meets the need of devs this way (seeing sample data).


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Bing Spellcheck Ressource unavailable

Hello,

your link to https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesBingSpellCheck-v7
returns an error. It appears that the resource is no longer available, which makes your whole tutorial moot.
Please update the information.
Thank you.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Bing News Samples

Bing News samples at GitHub does not exist
https://github.com/microsoft/bing-search-dotnet-samples/blob/main/rest/BingWebSearchV7.cs
error 404
[Enter feedback here]


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Bing Search API regions not listed in documentation

We have the following feedback, Can you please review and update document accordingly? Thanks!


The official list of country/region codes appears to be this:

https://docs.microsoft.com/en-us/bing/search-apis/bing-web-search/reference/market-codes#country-codes

However it seems to be outdated.

The list here seems to be a bit more comprehensive:
https://help.bing.microsoft.com/#apex/bing/en-US/10004/-1

Bing itself supports many more regions as seen here (from Bing web UI)


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Add missing }

-    img#logo {float: right;
+    img#logo {float: right;}
</style>

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Can't filter visual search results

When using visual search I can't further filter the results. For example, let's say that I take a picture of a piece of floor tile. Visual search might find art, rugs, vector graphics, and floor tiles in the search results. However, there is no way to limit the search results to only those that are floor tiles.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Is there any parameter about paging offset and count

It seams to the doc have no update for a long time.


文档详细信息

请勿编辑此部分。 docs.microsoft.com ➟ GitHub 问题链接必须具有此部分。

There is no Python Samples using native HTTP GET requests

The Python samples about using native HTTP GET requests link in the doc is 404.
https://github.com/microsoft/bing-search-python-samples/tree/main/rest
image
Could you give the latest samples link, thx.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Bing Web Search samples links are broken

In the Bing Web Search samples document, all links to the actual samples are broken. They redirect to non existing github pages.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Bing Spell Check API samples - deadlinks

Links to samples are not working - error 404.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Dead links on this page

Hi, the links to sample code on this search API documentation are dead.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.