Bing search API: specify filetype and site/domain?

2019-07-30 04:57发布

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条回答
ら.Afraid
2楼-- · 2019-07-30 05:24

cracked it:

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

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

bliako

查看更多
登录 后发表回答