1

I’m trying to fetch all files of a particular extension (in this case, *.zip files) across all repositories in an organization using the GitHub API.

If I use the GitHub web search directly in the browser, this works perfectly:

https://github.com/search?q=org:ORGNAME+path:*.zip&type=code

I can see 27 results on the web UI.

However, when I try to use the API:

curl -H "Authorization: Bearer <MY_GITHUB_TOKEN>" "https://api.github.com/search/code?q=org:ORGNAME+path:*.zip"

I get:

{ "total_count": 0, "incomplete_results": false, "items": [] }

The token has all required scopes, and I am authenticated.

4
  • Any change, if you try ?q=org%3AORGNAME+path%3A%2A.zip? Commented Mar 18 at 12:37
  • @C3roe no changes. Commented Mar 18 at 12:45
  • FWIW, reproduced, I get the same results with 0 files listed using curl. Commented Mar 18 at 15:00
  • I have the same issue with the query path:*.wasm. Commented Jun 26 at 11:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.