Hi,
nop, the rest api exposed for gist doesn't allow to search for content... you can only use it when you have a reference of the gist already, such a bummer... and it's the same with bitbucket snippets... they are totally missing the obvious, or simply don't want to provide a free service for this ( second option more likely), as it would become defacto the biggest saas for public code sharing.
Bye,
Jean