90

Possible Duplicate:
Github: Can I see the number of downloads for a repo?

Can anybody tell where can I found the number of downloads of my project on GitHub?

Community
  • 1
  • 1
5hrp
  • 2,230
  • 1
  • 18
  • 18
  • 2
    You now can see the **number of clones**: see [How to get GitHub Clone stats?](http://stackoverflow.com/a/25270050/6309) – VonC Aug 12 '14 at 17:10
  • if they could simply make public their log about how many git clone requests were made (and completed downloading), it would suffice :(, I miss this on sourceforge... – Aquarius Power Nov 24 '14 at 16:35

3 Answers3

80

You can find answer on the github support.

There are technical limitations, we tried this in the past and it had a negative impact on performance. If we find a solution, we'll re-implement it.

https://help.github.com/articles/getting-the-download-count-for-your-releases/

Wally Altman
  • 3,535
  • 3
  • 25
  • 33
Xhinking
  • 1,069
  • 1
  • 11
  • 15
  • 146
    This is very lame. It's the most basic of all metrics one would care about. – John Lehmann Mar 29 '12 at 14:10
  • 24
    GitHub open sources some of their efforts so shame on all of us for not contributing a fix earlier. And shame for those who feel entitled to the extent shown in the previous comments. Also, if anyone knows of any git hosting solutions that offer such statistics, it would be useful to provide that information here. – Milimetric May 07 '13 at 14:19
  • 21
    The keyword there is "some of" and don't act as if GitHub is some wonderful 100% free service, because it is not. They have paid versions and probably make plenty of money. A download counter is one of the most basic of all metrics and is not very difficult for a site like GitHub to implement. – redline Jun 09 '13 at 07:00
  • 4
    @redline Since you said it's not that difficult, I'd suggest you go ahead and create a patch you can send to them - since they obviously don't know anything... – Zach Mar 12 '14 at 15:30
  • 2
    @Zach Or maybe you can since you apparently like working for free for companies that actually make money... – redline Apr 21 '14 at 17:38
  • 6
    My theory is that they could implement this, but **they may have a business reason not to**. Why? Download stats **WILL** signifcantly change GitHub users' attitudes and perceptions of the site. Showing download stats might skew the popularity of what projects visitors will gravitate towards and use. Even if the stats were only shown to a project's owner, he may not post new code if previous projects got no interest from others. I do believe they could easily come up with a better message about this than trying to spin it a technical challenge. – selbie Sep 05 '14 at 19:46
  • I partially agree. Github projects actually are placed very well on search engines. What I think is that Github is much more social than sourceforge (If you think about the features are almost the same, you can follow projects and comments in both sites, but github make that more accessibile and immediate. Even less popular projects get interest this way and users can create networks of interests easily (more immediate feedback on your project and that let people drive the growth of hosted projects easily) Literally I saw that happening for ThreadPools in C++. DL count can be faked easily btw – CoffeDeveloper Mar 27 '15 at 23:58
  • 4
    The page you link to has been updated. – Andy Hayden Dec 20 '15 at 05:40
13

You can also perform this programmatically by leveraging the GitHub API. There's a whole section dedicated to the Package Download API.

Below the syntax to retrieve the list of downloads

GET /repos/:user/:repo/downloads

For instance here are the list of downloads of the libgit2 project:

nulltoken
  • 64,429
  • 20
  • 138
  • 130
  • I think you have misunderstood. The question was about CODE downloads, like cloning the repo, not about package downloads. – quetzalcoatl Dec 23 '12 at 16:57
  • 2
    @quetzalcoatl The question doesn't refer to cloning/forking a repository. Although now deprecated, the "downloading" feature allowed one repo owner to dynamically convert a tagged commit into a downloadable source tarball, or manually upload something that would be proposed for download. – nulltoken Dec 23 '12 at 17:55
  • Thanks for explanation, I've never seen that one. Sounds a bit artificial to me, so I was totally sure that "download a project" = clone the repo. – quetzalcoatl Dec 23 '12 at 20:11
  • It seems not to work for private repos. Even if I have access to it and I have an open session to github. – Adil Malik Feb 06 '14 at 22:50
  • 1
    @AdilMalik Try `$ curl -u "{:username}" https://api.github.com/repos/{:organization}/{:repository}/downloads`. See https://developer.github.com/v3/#authentication – nulltoken Feb 07 '14 at 07:06
  • @nulltoken Thanks for your suggestion. But now there is no error but I am getting empty result `[ ]` – Adil Malik Feb 07 '14 at 11:50
  • @AdilMalik You will only see previously exiting downloads. It's been deprecated since this answer in favor of the Releases API - see this post for further info https://github.com/blog/1302-goodbye-uploads – nulltoken Feb 07 '14 at 13:10
  • 1
    This answer is not relevant anymore. Deprecated feature – Sentry.co Feb 08 '17 at 14:18
8

If you archive your project and post it as a download, you can see how many times that archive has been downloaded (e.g. https://github.com/jhclark/multeval/downloads).

However, I'm not aware of any way of doing this for downloads of the entire source tree.

jhclark
  • 2,493
  • 1
  • 20
  • 14