Bing search API: specify filetype and site/domain?

人盡茶涼 提交于 2019-12-11 05:49:32

问题


Having had the luxury of having my fun and earning my bread well away from MS products for years, I am today trying to programmatically search with Bing Azure (wearing gloves) basically because I thought getting a google api was complex. So I headed down Data Market and issued this (let's say with perl's LWP which has been used to pass credentials):

https://api.datamarket.azure.com/Bing/Search/v1/Composite?%24skip=0&%24top=10&%24format=json&Sources=%27web%27&Query=%27abc%27

which works.

What I am now trying to find out is

1) how to tell the Bing search api to restrict results to a specific domain (e.g. ".org" or even a single website "www.wikipedia.org").

2) how to tell the search engine to restrict results to a specific filetype, e.g. 'PDF', 'XML' (or PDF and XML if that's possible)

3) if there is a simple list of the features/keywords in the GET request of the latest bing search API. Please no MS links if you please - i am really tired.

I have seen "site:.org" working on the bing search website when doing a manual search. And read about "filetype:pdf" working too.

Any hints?

bliako


回答1:


cracked it:

... Query=%27abc site:.com filetype:pdf%27

at the point when m$ realises it costs to be clumsy

bliako



来源:https://stackoverflow.com/questions/37756554/bing-search-api-specify-filetype-and-site-domain

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!