
Code Search API - Lightning
https://github.com/blog/1564-code-search-api
======
JosephRedfern
Looks good. Hopefully someone will write something to automagically search for
unintentionally exposed sensitive files and notify the repo owner - when the
"human" version of Code Search came out, a lot of private keys and other such
things were discovered.

~~~
eli
I'm not sure I want automated bots contacting me through github.

~~~
extempo
Malicious bots don't care if there is an API. They can screen scrape easily.

~~~
eli
I'm sure malicious bots do try to mass message repository owners through
Github. It's called spam and every platform over a certain size experiences
it. I expect Github already has measures in place to block it.

------
bowmessage
Can't wait for a code completion editor plugin based off of this API.. 20
requests per minute isn't too bad.

~~~
jlarocco
What do you have in mind? I'm not seeing a good use case.

There are already really good ways to do that which don't involve making
connections to remote servers.

~~~
bowmessage
I suppose there are already templating abilities written into the popular code
editors, but something that maybe takes the first two or three lines of what
you've written (maybe a common JDBC connection style block) and identifies it
as such. I'm not sure if it would be incredibly useful but it would be
interesting to see what came of it.

------
benwr
What I want to know is, when will it support regular expressions?

------
archivator
To me, Github search is kinda useless. When I search for anything Android
related (i.e. usage search for some framework type), I get a billion copies of
the main Android source. The signal to noise ratio is almost 0..

~~~
arikrak
You can filter the repo results by their number of stars and forks.

------
boyter
Interesting. Will have to look into integrating this with searchcode.com

My biggest issue with github search is it still has issues with searches like
$i++ as it will not match something like for(i=0;i++;i<100) which is
occasionally frustrating. For reference a comparison
[http://searchcode.com/?q=i%2B%2B](http://searchcode.com/?q=i%2B%2B) vs
[https://github.com/search?q=i%2B%2B&type=Code&ref=searchresu...](https://github.com/search?q=i%2B%2B&type=Code&ref=searchresults)

------
cscheid
I've been waiting for this for so long! Any word on when it will be available
for Github Enterprise?

------
mcantrell
One great use for this would be to search for known vulnerable code and then
get people to patch it.

------
arafalov
I want to search by filename but also limit by repository's stars or similar.

------
kylekyle
What's wrong with command line git grep?

~~~
ihsw
It doesn't search though every repository on github.

