parameter"mkt" of bing visual search API does not take effect

绍婧 李 0 Reputation points
2024-05-06T06:46:32.0333333+00:00

When I call the bing visual search API, I specify the market by adding the parameter params = {'mkt': 'zh-CN'} as mentioned in https://learn.microsoft.com/zh-cn/bing/search-apis/bing-visual-search/reference/query-parameters, but the searching result returned does not fit Chinese market. No error code. But the searching link result returned does not fit Chinese market. The returned links are blocked by mainland China.

We have called another API that the Bing Web Search API before, the mkt does take effect.

Bing Visual Search
Bing Visual Search
A Bing service that gives you rich insights to help build compelling image applications on the device of your choice.
24 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2024-05-06T06:46:32.0366667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The mkt parameter in the Bing Visual Search API is used to specify the market where the results come from, which is typically the market where the user is making the request from. According to the documentation, the mkt parameter should be set to the appropriate market code, such as en-US or zh-CN. However, it seems that the mkt parameter is not taking effect for your searches and the returned links are blocked by mainland China.

    It is possible that the issue is related to the Bing Visual Search API being blocked in mainland China. According to the documentation, the Bing Web Search API does support the mkt parameter and you mentioned that it worked for your searches. It is recommended that you use the Bing Web Search API instead of the Bing Visual Search API for your searches in mainland China.

    I hope this helps!


    References:

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.