简单的 Bing 新闻搜索 Api - 搜索短语

发布于 2024-09-08 23:46:18 字数 116 浏览 1 评论 0原文

我想搜索一个短语而不是单词集合 我该怎么做?

例如 "&Query= Widget Foo"

我只想返回包含短语“Widget Foo”的结果,而不是与 foo 分开的小部件。

I want to search for a phrase and not the collection of words How can I do this?

For instance
"&Query= Widget Foo"

I only want to return results with the phrase 'Widget Foo' and not widget separate from foo.

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

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

发布评论

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

评论(2

够钟 2024-09-15 23:46:18

将您的搜索词用引号引起来。这是一个已经进行 url 编码的示例:

http://www.bing.com/search?q=%22widget+foo%22

Wrap your search term in quotes. Here is an example that is already url encoded:

http://www.bing.com/search?q=%22widget+foo%22
深海蓝天 2024-09-15 23:46:18

同样的原则也适用于使用 Bing API 订阅模型搜索的短语:

https://datamarket.azure。 com/dataset/bing/search

因此,如果您正在查找新闻短语:

“佩林在 CPAC 演讲中嘲笑奥巴马和罗夫”

..将您的查询括在引号中,并对引号进行 URL 编码:

https://api.datamarket.azure.com/Bing/Search/v1/News?Query=%27%22Palin%20mocks%20Obama%20and%20Rove%20in%20CPAC%20speech%22%27

Same principle applies to phrases searched for with the Bing API's subscription model at:

https://datamarket.azure.com/dataset/bing/search

So if you're looking for the news phrase:

"Palin mocks Obama and Rove in CPAC speech"

..wrap your query in quotes and URL encode the quotes as well:

https://api.datamarket.azure.com/Bing/Search/v1/News?Query=%27%22Palin%20mocks%20Obama%20and%20Rove%20in%20CPAC%20speech%22%27

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