带有 DisableLocationDetection 的 Bing 搜索 API 无法正常工作

发布于 2024-12-17 19:12:57 字数 249 浏览 4 评论 0原文

即使我设置了适当的选项,Bing 搜索 API 也会使用我(或我的服务器)的位置。我希望它提供与位置无关的响应。

我是否误解了文档?这个语法对吗?

http://api.bing.net/json.aspx?Appid=<XXX>&query=microsoft&sources=news&options=DisableLocationDetection

提前致谢

The Bing search API is using my (or my server's) location even when I set the appropriate option. I would like it to provide a location agnostic response.

Am I misunderstanding the documentation? Is this syntax right?

http://api.bing.net/json.aspx?Appid=<XXX>&query=microsoft&sources=news&options=DisableLocationDetection

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤独患者 2024-12-24 19:12:57

语法是正确的。根据 docDisableLocationDetection 选项阻止 Bing 从查询本身(示例中的“microsoft”)推断位置,但不能从请求的属性(例如服务器的 IP)推断位置。

新闻请求可以指定LocationOverride 参数以获取来自美国特定州的新闻。此外,如果您在自动市场检测方面遇到问题(例如,如果您的服务器位于另一个国家/地区),您可以指定 市场参数覆盖市场检测。

如果这仍然对您没有帮助,您可以更新问题以提供给出错误结果的查询示例吗?

The syntax is right. According to the doc, the DisableLocationDetection option prevents Bing from inferring location from the query itself ("microsoft" in your example), but not from the properties of the request, such as server's IP.

News requests can specify LocationOverride parameter to get news from a particular US state. Also, if you're having troubles with automatic market detection (if your server is in another country, for example), you can specify Market parameter to override the market detection.

If this still doesn't help you, can you update the question to provide an example of a query which gives you the bad result?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文