Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub API - List of Languages

Is there an endpoint in the GitHub API that will provide me with a list of ALL the languages on GitHub? I'm looking for similar results to the Languages drop-down in the "Trending" section on the github.com website.

like image 231
Agile Ace Avatar asked May 31 '26 16:05

Agile Ace


1 Answers

Not from GitHub API directly.

The OP AgileAce adds in the comments:

I've discovered that there is a Linguist library maintained by GitHub.
In this repo, there is a YAML file (lib/linguist/languages.yml) containing all the languages, and related info.
I'm just going to write a script that will parse this file.

I mentioned the linguist library in "How does github figure out a project's language?".


You can also get that data from various GitHub statistic sites, like www.githubarchive.org:

See "Top Github Languages for 2013 (so far)", by ADAM BARD:

I just discovered the Github Archive, a dataset of Github events queryable using Google BigQuery. What fun! So I decided to count how many repositories have been created this year by language.

SELECT repository_language, count(repository_language) AS repos_by_lang
FROM [githubarchive:github.timeline]
WHERE repository_fork == "false"
AND type == "CreateEvent"
AND PARSE_UTC_USEC(repository_created_at) >= PARSE_UTC_USEC('2013-01-01 00:00:00')
AND PARSE_UTC_USEC(repository_created_at) < PARSE_UTC_USEC('2013-08-30 00:00:00')
GROUP BY repository_language
ORDER BY repos_by_lang DESC
LIMIT 100

coderstats.net could be a good source too, with its language section.

like image 149
VonC Avatar answered Jun 03 '26 08:06

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!