DuckDuckGo API - 如何获得更多结果? [英] DuckDuckGo API - How to get more results?

查看:45
本文介绍了DuckDuckGo API - 如何获得更多结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 DuckDuckGo API 的默认搜索仅返回第一页上的结果(我猜大约为 25).有什么办法可以得到更多的结果或导航到搜索结果的第2、3页吗?

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:查询

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆