DuckDuckGo API-如何获得更多结果? [英] DuckDuckGo API - How to get more results?
问题描述
使用DuckDuckGo API的默认搜索仅返回首页上的结果(我想大约是25).有什么方法可以获取更多结果或导航到搜索结果的第二页,第三页?
The default search using the DuckDuckGo API returns only the results on the first page (around 25 I guess). Is there any way to get more results or navigate to the 2nd, 3rd pages of the search results?
诸如Faroo之类的网站都有一个名为s
的参数(代表开始),如果我们想要前10个结果,则可以将其设置为 1 ;如果需要,则可以将其设置为 11 我们想要下10个结果,依此类推. DuckDuckGo也有类似的东西吗?
Websites like Faroo have a parameter called s
(which stands for start) which can be set to 1 if we want the first 10 results, to 11 if we want the next 10 results and so on. Is there something like that for DuckDuckGo, too?
推荐答案
根据DuckDuckGo 搜索API文档,全部可用参数为:
According to DuckDuckGo Search API documentation, all the available parameters are:
q:查询
q: query
format:输出格式(json或xml)
format: output format (json or xml)
如果format =='json',您还可以传递:
If format=='json', you can also pass:
callback:用于回调(JSONP格式)的函数漂亮:1使JSON 看起来很漂亮(例如适用于Chrome/Firefox的JSONView)
callback: function to callback (JSONP format) pretty: 1 to make JSON look pretty (like JSONView for Chrome/Firefox)
no_redirect:1跳过HTTP重定向(用于!bang命令).
no_redirect: 1 to skip HTTP redirects (for !bang commands).
no_html:1,用于从文本中删除HTML,例如粗体和斜体.
no_html: 1 to remove HTML from text, e.g. bold and italics.
skip_disambig:1跳过歧义消除(D)类型.
skip_disambig: 1 to skip disambiguation (D) Type.
尤其要注意:
但是,此API并不包括我们所有的链接.那就是 不是完整的搜索结果API或将DuckDuckGo结果获取的方法 您的应用程序超出了我们的即时答案.
This API does not include all of our links, however. That is, it is not a full search results API or a way to get DuckDuckGo results into your applications beyond our instant answers.
这篇关于DuckDuckGo API-如何获得更多结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!