GitHub Search API仅返回30个结果 [英] GitHub Search API only return 30 results

查看:127
本文介绍了GitHub Search API仅返回30个结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://api.github.com/search/issues?q=stress+test+label:bug+language:python+state:closed

上面的查询假设返回76个结果,而当我尝试运行它时,它仅返回30.我猜GitHub超过30时会分几部分返回结果.任何想法我都可以得到其余结果?

the above query is suppose to return 76 results, and when I try to run it, it only returns 30. I guess GitHub return results in portions when it is over 30. Any idea how I can get the rest of the results?

推荐答案

您需要使用page参数,例如下30页= 2

You need to use page parameter, e.g. for next 30 page = 2

https://api.github.com/search/issues?q=stress+test+label:bug+language:python+state:closed&page=2

您还可以使用per_page参数更改默认大小30.它支持最大大小100.如下所示:

You can also use per_page parameter to change the default size of 30. It supports max size of 100. Like this:

https://api.github.com/search/issues?q=stress+test+label:bug+language:python+state:closed&per_page=100

可以在此处

这篇关于GitHub Search API仅返回30个结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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