1

I am trying to find the list of top 1000 Java repos sorted by most stars using GitHub API.

Code:

import requests
import json
r = requests.get('https://api.github.com/search/repositories?q=language:java&sort=stars&order=desc')

OP:

list_of_repos = r.json()["items"]

This list has only information about 30 repos, is there anyway to get the top N where I can pass it as the parameter?

Max
  • 9,220
  • 10
  • 51
  • 83
data_person
  • 4,194
  • 7
  • 40
  • 75
  • 4
    See answer at https://stackoverflow.com/questions/30656761/github-search-api-only-return-30-results for how to use `per_page` and `page` parameters in your query – foxsoup Jul 02 '20 at 00:17

0 Answers0