Couldn't see this in the dropdown. I'm trying to phrase a query with the Search API that'll return a list of all public repositories that have a specific file extension.
For example if I wanted to get all that contain a .json file.
Right now I've tried:
Thanks for being here! You can search by file extension, per the docs:
Suppose you want to search for popular Tetris repositories written in Assembly. Your query might look like this.
You can search for multiple topics by adding more
topic: instances, and including the
mercy-preview header. For example:
curl -H "Accept: application/vnd.github.mercy-preview+json" \ https://api.github.com/search/repositories?q=topic:ruby+topic:rails
In this request, we're searching for repositories with the word
tetris in the name, the description, or the README. We're limiting the results to only find repositories where the primary language is Assembly.
Check out the docs for more info.
I hope this helps!
Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!