You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/v3/search.md
+23-11Lines changed: 23 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,16 @@ Find file contents via various criteria. (This method returns up to 100 results
126
126
127
127
GET /search/code
128
128
129
+
###Considerations for code search
130
+
131
+
Due to the complexity of searching code, there are a few restrictions on how searches are performed:
132
+
133
+
<ul>
134
+
<li>Only the _default branch_ is considered. In most cases, this will be the `master` branch.</li>
135
+
<li>Only files smaller than 200 KB are searchable.</li>
136
+
<liclass='not-enterprise'> You must always include at least one search term when searching source code. For example, searching for <ahref="https://github.com/search?utf8=✓&q=language%3Ago&type=Code"><code>language:go</code></a> is not valid, while <ahref="https://github.com/search?utf8=✓&q=amazing+language%3Ago&type=Code"><code>amazing language:go</code></a> is.</li>
137
+
</ul>
138
+
129
139
###Parameters
130
140
131
141
Name | Type | Description
@@ -217,34 +227,36 @@ The `q` search term can also contain any combination of the supported issue sear
217
227
Qualifies which fields are searched. With this qualifier you can restrict the
218
228
search to just the title, body, comments, or any combination of these.