3

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.

Cœur
  • 34,719
  • 24
  • 185
  • 251
Agile Ace
  • 489
  • 1
  • 4
  • 16

1 Answers1

6

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.

Community
  • 1
  • 1
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
  • Thanks, VonC. I've discovered that there is a Linguist library maintained by GitHub at https://github.com/github/linguist. In this repo, there is a YAML file containing all the languages, and related info. I'm just going to write a script that will parse this file. – Agile Ace Jan 29 '14 at 07:06
  • @AgileAce sounds great! I have included your comment in the answer for more visibility, as well as a link to that [`lib/linguist/languages.yml`](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml) file. – VonC Jan 29 '14 at 07:10