Do users have access to the "most starred" or "most watched" repositories, through the API? Similar to these pages.
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

- 1,262,500
- 529
- 4,410
- 5,250
-
1Adding to the previous answer, here will be the query to find repositories with the highest number of stars, sorted by star count. https://api.github.com/search/repositories?q=stars:%3E1&sort=stars – Aditya Mehta Jan 03 '20 at 21:04
-
@AdityaMehta Thank you. I have included your comment in the answer for more visibility. – VonC Jan 04 '20 at 08:14