Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 8

Github Api v3 different callback responses

I'm using github API in version 3, but request I send give me different results.

I want to retrieve top javascript repositories sorted by stars with that request:

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

Once at the first place is visible freeCodeCamp repository once vue once bootstrap.

Maybe I have used this API incorectly or I should not relly on official github API ?

Have you met such problem? Do you have some kind of solution for this?

7 Replies
Community Manager
Message 2 of 8

Re: Github Api v3 different callback responses

The number of stars that a project has can change at any moment and sometimes the number of stars can change drastically when a project gets a lot of attention because of a news story or other media attention. We also adjust the system when we find that stars were granted improperly or erroneously. Because of this, the star rankings aren't stable for any given length of time.

 

Given all of that, what is it you're trying to accomplish?

Copilot Lvl 2
Message 3 of 8

Re: Github Api v3 different callback responses

Between first and second github star place is about a half star difference (150k for javascript language).
I'm sure there should not be so much change in ranking between top 10 projects in 2 requests sent in 3 min. time interval. Isn't it just unstable API?

Copilot Lvl 2
Message 4 of 8

Re: Github Api v3 different callback responses

@lee-dohm What do you think about it?

Community Manager
Message 5 of 8

Re: Github Api v3 different callback responses

I wasn't able to duplicate what it seems you're describing when I tested it. I've already given reasons for why one might see significant shifts in star numbers, even in a short period of time.

 

Copilot Lvl 2
Message 6 of 8

Re: Github Api v3 different callback responses

So you are saying that have you tried to put in your browser this URL few times: 
https://api.github.com/search/repositories?q=language:javascript&sort=stars&order=desc
And it always gives you first and second (just 1st and 2nd) always the same?
If no, please tell me how it is possible for "freeCodeCamp" to disappear from this list sometimes? If it has 300k starts.
@lee-dohm 

Community Manager
Message 7 of 8

Re: Github Api v3 different callback responses

I've already answered your question. The star counts are not stable for any given length of time for a number of reasons.

 

If you can share what it is you're trying to do, then perhaps I can give some more suggestions or information.

 

Please note, it's against our Code of Conduct for you to bump posts.

Copilot Lvl 2
Message 8 of 8

Re: Github Api v3 different callback responses

Refresh!

 

Can somebody have a look on that?