List of all languages supported by github search #23724
-
Hello! Is there a complete list of languages somewhere which are supported by GitHub search? I would also like to know what are the prefixes for the languages to be used when searching, e.g. - Example: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hello and welcome to the community @0xInfection. The Linguist project is what we use to determine which language a file contains and it has a very exhaustive list of languages it recognizes. Each language can have a list of aliases that it recognizes and the Let us know if you have any more questions! |
Beta Was this translation helpful? Give feedback.
-
Hey @lee-dohm thanks for the great response, very much appreciated. Just a final question, whenever we search GitHub using the web search bar, there is a column at the left side displaying the top 10 languages where the search term has been found. Is there a way I can grab that list from the GitHub API for a search? |
Beta Was this translation helpful? Give feedback.
-
0xInfection:
No, that information isn’t exposed directly through the GitHub API. You would have to search and then iterate through the list of individual results to collect that information. |
Beta Was this translation helpful? Give feedback.
Hello and welcome to the community @0xInfection.
The Linguist project is what we use to determine which language a file contains and it has a very exhaustive list of languages it recognizes. Each language can have a list of aliases that it recognizes and the
languages.yml
file is also where to find that information.Let us know if you have any more questions!