Search code examples
javascriptapigithubrepository

Get the most popular github repositories


I need to get the repositories with the most stars. I need to use github API for this. For example, i can get all repositories that includes 'awesome':

https://api.github.com/search/repositories?q=awesome

But i dont know how to get just the most popular repositories.

Maybe someone knows how to do this?


Solution

  • Have a look at this part of the docs.

    https://help.github.com/en/github/searching-for-information-on-github/searching-for-repositories#search-by-number-of-stars

    Under the "Search by number of stars"

    https://api.github.com/search/repositories?q=stars:>=1&sort=stars&order=desc