Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github - How to search a gist via API?

I understand that it is possible to search a repository via various criteria with the Github API but how to search for a single gist or find its id?

Ideally I'd like to use user and filename but it could be a hash inside the content body:

https://gist.github.com/search?q=sadjghasghdhjasgdfhs
like image 217
RafaSashi Avatar asked May 16 '26 16:05

RafaSashi


1 Answers

I just found out that it is possible to search for a specific user and/or filename. I've looked at the advanced search of github, which uses user:some-user-name and path:some-file-name. These criteria also work on the gist search terms.

example: https://gist.github.com/search?q=user%3Amanuelvanrijn+path%3Aguid.js

Hope this helps until there's a search api available for gists

like image 81
Manuel van Rijn Avatar answered May 21 '26 15:05

Manuel van Rijn