1

I have many (up to 2000) repository names. I need to know the number of stars in each of them. How to do this with the least amount of requests to the Github API? Not important version 3 or 4

1 Answers1

0

Each time you seek to minimize the number of API calls, you might want to consider the GraphQL API v4, which is made to replace multiple REST requests with a single call to fetch the data you specify.

Example: hanksudo/githubstars, which list repository stars and info through Github v4 GraphQL API

In your case, you would need to modify the query to get any repository whose name matches one of your list. See if a filter approach described here would apply.

J. Gerbershagen recommends in the comments to enter as search term "repo:xxx/yyy repo:fff/yyy".

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250