Search repositories with language in multiple languages

Hello all,

I’ve been trying to wrap my head around this for a day. I’ve been trying to query the REST API v3 for /search/repositories using the language qualifier, but in my specific case I need to query for multiple possible languages.

The query I have is https://api.github.com/search/repositories?q=test+language:Javascript+language:java , but so long it has been returning almost any language.

I’d appreciate if you could help me, as the documentation doesn’t seem very clear on this subject.

Thanks!

Hello @Zamus and welcome to the community.

I confess that I only looked through the first 100 results but they all reported either JavaScript or Java as their primary language:

$ http -pb "https://api.github.com/search/repositories?q=test+language:Javascript+language:java&per_page=100" | jq .items[].language
"JavaScript"
"Java"
"JavaScript"
"JavaScript"
"JavaScript"
"Java"
"Java"
"Java"
"JavaScript"
"Java"
"Java"
"Java"
"JavaScript"
"Java"
"JavaScript"
"Java"
"JavaScript"
"Java"
"JavaScript"
"Java"
"JavaScript"
"JavaScript"
"JavaScript"
"Java"
"JavaScript"
"JavaScript"
"Java"
"JavaScript"
"JavaScript"
"Java"
"JavaScript"
"JavaScript"
"JavaScript"
"Java"
"Java"
"Java"
"Java"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"Java"
"Java"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"Java"
"JavaScript"
"Java"
"JavaScript"
"Java"
"Java"
"Java"
"Java"
"Java"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"Java"
"Java"
"JavaScript"
"Java"
"JavaScript"
"Java"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"Java"
"Java"
"JavaScript"
"JavaScript"
"JavaScript"
"Java"
"JavaScript"
"JavaScript"
"Java"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"JavaScript"
"Java"
"JavaScript"
"JavaScript"
"Java"
"JavaScript"
"Java"

Is there something that I’m doing wrong to reproduce your results?

Let me know!

1 Like

@lee-dohm thanks a lot for such a quick response.
Not really, that’s the way I’m constructing my API call, although there’s one detail which is I’m performing these calls via the restAssured library for Java, but I don’t think that should be affecting the response.
I’ll keep testing further but at least with you I can make sure that my syntax was correct, I was very worried about that actually.

1 Like