Searching Github Gists via API

Hey folks,

Is it possible to use the Github API to perform searches on Github Gists? One thing in particularly I’d like to be able to do is to query for all of the most recent gists of a specific language. Here’s an example of performing this exact type of query from the browser:

Unfortunately, this doesn’t seem possible according to the docs. Specifically, the gists/public endpoint doesn’t have the query param q for search field that the console does:

Is this accurate, or am I just looking in the wrong place?


:wave: hello there @Seancarpenter welcome to the GitHub Support Community!

The REST API’s Search API doesn’t currently an endpoint for searching gists, nor is a gist one of our supported SearchType values for the GraphQL API.

This is accurate; there’s no q parameter (or similar) for that particular endpoint.

Thanks for sharing that context! Since no interface exists for searching Gists today, we encourage you to submit a new request through our official product feedback form so that our product team can track your request. Currently, that’s the best place to share requests like these in consideration for future iterations of GitHub features. It might also be worth following our GitHub public roadmap and our GitHub changelog for upcoming features and updates respectively.

Would you like to know anything more about Gists in relation to the GitHub API? :thought_balloon: