4

I'm interested in getting a count of github repos for a certain set of languages (with historical data if possible.)

Here are things I've tried to start collecting the stats myself:

  1. Screen scraping a page like:

https://github.com/search?q=language%3Aperl&type=&ref=simplesearch

  1. Using the github API:

https://api.github.com/legacy/repos/search/KEYWORD?language=perl

but unfortunately this seems to require a KEYWORD to get any results. Also, I only need a count not the meta data on each repo.

I'm also interested in historical data, and it seems that those stats might already be available somewhere.

Any ideas on better ways to get repo counts by language and/or historical data?

3
  • 1
    You can get these by using Google's BigQuery and gitarchive.com
    – Wouter J
    Apr 14, 2013 at 19:56
  • thanks - but gitarchive.com doesn't exist - a typo perhaps?
    – ErikR
    Apr 14, 2013 at 20:24
  • 3
    ah yeah, my fault: You should use Google's BigQuery and githubarchive.org
    – Wouter J
    Apr 14, 2013 at 20:32

1 Answer 1

5

You can try this: https://api.github.com/search/repositories?q=language:Python

Also, you can query the github archive. Using big query interface, the query should be:

bq query 'SELECT repository_language, count(repository_language) as pushes
FROM [githubarchive:github.timeline]
WHERE type="CreateEvent" and repository_fork == "false"
GROUP BY repository_language
ORDER BY pushes DESC'

This query generates statistics of number of repos per language.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.