title: How can I get a list of all public GitHub repos with more than 20 stars?
body: <p>I'd like to get a list of all the public GitHub repos with more than a certain number of stars (say 15 or 20). I can use the GitHub GraphQL API to get a list of repos with greater than 15 stars:</p>
  
  <pre><code>query {
    search(query: "is:public stars:&gt;15", type: REPOSITORY, first:10) {
      repositoryCount
      edges {
        node {
          ... on Repository {
            nameWithOwner
            stargazers {
              totalCount
            }
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>The result looks like this:</p>
  
  <pre><code>{
    "data": {
      "search": {
        "repositoryCount": 704279,
        "edges": [
          { "node": { "nameWithOwner": "freeCodeCamp/freeCodeCamp", "stargazers": { "totalCount": 308427 } } },
          { "node": { "nameWithOwner": "996icu/996.ICU", "stargazers": { "totalCount": 249062 } } },
          { "node": { "nameWithOwner": "vuejs/vue", "stargazers": { "totalCount": 156364 } } },
          { "node": { "nameWithOwner": "facebook/react", "stargazers": { "totalCount": 143121 } } },
          { "node": { "nameWithOwner": "tensorflow/tensorflow", "stargazers": { "totalCount": 140562 } } },
          { "node": { "nameWithOwner": "twbs/bootstrap", "stargazers": { "totalCount": 138369 } } },
          { "node": { "nameWithOwner": "EbookFoundation/free-programming-books", "stargazers": { "totalCount": 136421 } } },
          { "node": { "nameWithOwner": "sindresorhus/awesome", "stargazers": { "totalCount": 125160 } } },
          { "node": { "nameWithOwner": "getify/You-Dont-Know-JS", "stargazers": { "totalCount": 115851 } } },
          { "node": { "nameWithOwner": "ohmyzsh/ohmyzsh", "stargazers": { "totalCount": 102749 } } }
        ]
      }
    }
  }
  </code></pre>
  
  <p>There's 704,279 repos, but I can request up to 100 repos/query and step through the results using a cursor. So it would seem that with enough time this would work. But unfortunately, the GitHub GraphQL API <a href="https://github.community/t5/GitHub-API-Development-and/search-api-is-limited-to-only-the-first-1000-items/td-p/26993" rel="noreferrer">limits you to the first 1,000 results</a> of any query, so this won't do.</p>
  
  <p>I can run multiple queries using ranges of stars (<code>stars:1000..1500</code>) but this breaks down once you get to repos with less starpower (there are over 1,000 repos with <a href="https://github.com/search?utf8=%E2%9C%93&amp;q=is%3Arepo+stars%3A123&amp;type=Repositories&amp;ref=advsearch&amp;l=&amp;l=" rel="noreferrer">exactly 123 stars</a>).</p>
  
  <p>I could break the query down more ways (e.g. by date the repo was created) but this is starting to get crazy. Is there a simpler way to get a complete list of public GitHub repos with 15 or more stars?</p>