Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub API popular repos

Tags:

github

Do users have access to the "most starred" or "most watched" repositories, through the API? Similar to these pages.

github.com/popular/starred

github.com/languages/shell/most_watched

like image 290
Zombo Avatar asked Dec 05 '12 03:12

Zombo


People also ask

What is the most popular GitHub repo?

1| VS Code This development environment has not only topped as the most popular open-source repository in GitHub with 19.1k contributors but also has been chosen as the most popular development environment in the Stack Overflow's annual Developer Survey 2019.

What is the largest GitHub repo?

freeCodeCamp is arguably the biggest repository on GitHub, and it's easy to see why.

Is GitHub API free?

A collective list of free APIs for use in software and web development. For information on contributing to this project, please see the contributing guide.

How do I list all repositories on GitHub?

How To List All Public Repositories Belonging to a User? So, to list all public repos from a user, send a GET request to https://api.github.com/users/<USER-NAME>/repos , replacing with the actual user from whom you want to retrieve the repositories.


1 Answers

No: this is user-centric, meaning you get the repo starred by users, or by a given user.

And don't forget what you are calling "watch" is now "star".

What used to be known as “Watching” is now “Starring”.
Starring is basically a way to bookmark interesting repositories.
Watching is a way to indicate that you want to receive email or web notifications on a Repository.


While the search GUI now exposes "stars" as a sort order (see "Get sorted github repository search results by “some” attribute(the number of forks or stars)", February 2013), the search API (a port from V2) is the only one mentioning "stars" as a sort order for repositories.

GET /legacy/repos/search/:keyword?sort=stars

(this should work both for public GH and GHE: GitHub for enterprise, but requires a keyword, and does not follow the v3 pagination pattern. This method returns up to 100 results per page and pages can be fetched using the start_page parameter.)

Aditya Mehta points out in the comments:

Here is the query to find repositories with the highest number of stars, sorted by star count.
api.github.com/search/repositories?q=stars:%3E1&sort=stars

like image 82
VonC Avatar answered Oct 20 '22 06:10

VonC