使用Bing.com和Bing Search API的结果不同

Ada*_*nch 11 php xml api search bing

我正在使用Bing Search API 2.0(XML)和PHP来检索结果.
但是当运行一些查询时,API不会返回Bing.com会得到的(相同)结果.

当我发送此请求时:( 这是使用API​​)

http://api.search.live.net/xml.aspx?Appid=__________&query=3+ts+site%3Amycharity.ie/charity&sources=web&web.count=10&web.offset=0
Run Code Online (Sandbox Code Playgroud)

我得到0结果.

但如果我去Bing.com搜索培根,网址将是:

http://www.bing.com/search?q=bacon&go=&form=QBRE&filt=all&qs=n&sk=&sc=8-5
Run Code Online (Sandbox Code Playgroud)

因此,如果我将我的API查询替换为此URL,如下所示:

http://www.bing.com/search?q=3+ts+site%3Amycharity.ie/charity&go=&form=QBRE&filt=all&qs=n&sk=&sc=8-5
Run Code Online (Sandbox Code Playgroud)

我应该再次获得0结果,对吗?

不,我得到了1个结果.(我用API寻找的结果).
为什么是这样?有没有办法解决?

McA*_*Man 0

看起来 API 请求实际上并不是在请求信息。嗯,确实如此,但又不完全是。例子; 来自 bing 搜索;“search?q=bacon&go=&form” 注意其中的“bacon”一词。这似乎不会在 API 请求中以任何方式进行解析。甚至不是十六进制值。我认为问题就在这里。

  • 错误的。在我使用 Bing.com 的示例中,我说“如果我访问 Bing.com 并搜索培根,则 URL 将是”,即只需在文本字段中输入“培根”并单击搜索即可。URL `http://www.bing.com/search?q=bacon&go=&form=QBRE&filt=all&qs=n&sk=&sc=8-5` 是 Bing.com 发回给我的 URL。 (2认同)