GitHub Search API only return 30 results

Jack Feng picture Jack Feng · Jun 5, 2015 · Viewed 10.6k times · Source

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

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?

Answer

TheCodingFrog picture TheCodingFrog · Jun 5, 2015

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

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

More detail can be found here