I am trying to get a list of all github repositories for a specific language (e.g. Java), without narrowing the search by any specific keyword. Preferably, I want to do this directly from curl, no scripting. The problem is that I've tried formatting the API URL and didn't manage to find the right one, that includes the language=Java
parameter but no keyword.
For example, the following URL seems to query for repos with the keywords "language" or "java" in their description, including some Scala and Haskell repos:
curl -X GET https://api.github.com/legacy/repos/search/language=java
On the other hand, using the ?
notation returns empty results:
curl -X GET https://api.github.com/legacy/repos/search?language=java
curl -X GET https://api.github.com/legacy/repos/search/?language=java
Lower- or upper-case J also seems irrelevant.
So how do I use the language parameter without specifying a keyword?
Comment: A trick that seems to work is to use a single-letter keyword, repeating from A to Z. Is there a less awkward way?
I would use this according to the v3 api: https://api.github.com/search/repositories?q=language:Java
In case you want to sort:
https://api.github.com/search/repositories?q=language:Java&sort=stars&order=desc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With