|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 5 | + <meta http-equiv="Content-Language" content="en-us" /> |
| 6 | + <meta http-equiv="imagetoolbar" content="false" /> |
| 7 | + <meta name="MSSmartTagsPreventParsing" content="true" /> |
| 8 | + <title>New Validation Rule for Beta Code Search API</title> |
| 9 | + <link rel="alternate" type="application/atom+xml" title="API Changes" href="/changes.atom" /> |
| 10 | + <link href="/css/reset.css" rel="stylesheet" type="text/css" /> |
| 11 | + <link href="/css/960.css" rel="stylesheet" type="text/css" /> |
| 12 | + <link href="/css/uv_active4d.css" rel="stylesheet" type="text/css" /> |
| 13 | + <link href="/shared/css/documentation.css" media="screen" rel="stylesheet" type="text/css"> |
| 14 | + <link href="/shared/css/pygments.css" media="screen" rel="stylesheet" type="text/css"> |
| 15 | + <script src="/shared/js/jquery.js" type="text/javascript"></script> |
| 16 | + <script src="/shared/js/documentation.js" type="text/javascript"></script> |
| 17 | +</head> |
| 18 | +<body class="api"> |
| 19 | + <div id="header-wrapper"> |
| 20 | + <div id="header"> |
| 21 | + <div> |
| 22 | + <a class="logo" href="/"><img src="/images/logo_developer.png" height="45" alt="GitHub:Developer" /></a> |
| 23 | + <ul class="nav"> |
| 24 | + <li class="api-status"></li> |
| 25 | + <li><a href="/v3/">API v3</a></li> |
| 26 | + <li><a href="/changes/">Changes</a></li> |
| 27 | + <li><a |
| 28 | + href="https://github.com/contact">Support</a></li> |
| 29 | + <li><a href="/changes.atom"> |
| 30 | + <img src="/images/feed-icon-28x28.png" width="16" height="16" alt="GitHub API Changes Feed" /> |
| 31 | + </a></li> |
| 32 | + </ul> |
| 33 | + </div> |
| 34 | + </div><!-- #header --> |
| 35 | + </div><!-- #header-wrapper --> |
| 36 | + |
| 37 | + <div id="wrapper"> |
| 38 | + <div class="content"> |
| 39 | + <div class="change" id="/changes/2013-10-18-new-code-search-requirements/"> |
| 40 | +<h2 class="title"> |
| 41 | + <a href="/changes/2013-10-18-new-code-search-requirements/">New Validation Rule for Beta Code Search API</a> |
| 42 | +</h2> |
| 43 | + |
| 44 | +<div class="meta"> |
| 45 | + <ul> |
| 46 | + <li class="published"> |
| 47 | + <span class="octicon octicon-calendar"></span> |
| 48 | + October 18, 2013 |
| 49 | + |
| 50 | + </li> |
| 51 | + <li class="who_when"> |
| 52 | + <img height="16" width="16" src="https://secure.gravatar.com/avatar/592e1e6f041f9a4ec51846fd82013aea?s=20&d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png" /> |
| 53 | + <a href="https://github.com/jasonrudolph">jasonrudolph</a> |
| 54 | + </li> |
| 55 | +</ul> |
| 56 | +</div> |
| 57 | + |
| 58 | + |
| 59 | +<p>As we <a href="/changes/2013-09-28-an-update-on-the-new-search-api/">prepare to end the preview period</a> for the new search API, |
| 60 | +we’re making sure that it’s ready to handle the traffic from all the apps you’ll build on top of it.</p> |
| 61 | + |
| 62 | +<h2 id="new-validation-rule">New Validation Rule</h2> |
| 63 | + |
| 64 | +<p>In order to support the expected volume of requests, we’re applying a new validation rule to the <a href="/v3/search/#search-code">Code Search API</a>. |
| 65 | +Starting today, you will need to scope your code queries to a specific set of users, organizations, or repositories.</p> |
| 66 | + |
| 67 | +<p>As usual, you specify the query via the <code>q</code> parameter. |
| 68 | +The value must include <a href="https://help.github.com/articles/searching-code#users-organizations-and-repositories">at least one user, organization, or repository</a>.</p> |
| 69 | + |
| 70 | +<p>For example, with this query, we’re searching for code from <a href="https://github.com/twitter">@twitter</a> or <a href="https://github.com/facebook">@facebook</a> that uses an MIT License:</p> |
| 71 | + |
| 72 | +<pre><code>MIT License @twitter @facebook |
| 73 | +</code></pre> |
| 74 | + |
| 75 | +<p>And here, we’re looking for uses of the underscore library in <a href="https://github.com/mozilla/BrowserQuest">@mozilla’s BrowserQuest</a> repository:</p> |
| 76 | + |
| 77 | +<pre><code>underscore language:js @mozilla/BrowserQuest |
| 78 | +</code></pre> |
| 79 | + |
| 80 | +<p>To perform these queries via the API, we would use the following URLs (respectively):</p> |
| 81 | + |
| 82 | +<pre><code>https://api.github.com/search/code?q=MIT+License+%40twitter+%40facebook |
| 83 | + |
| 84 | +https://api.github.com/search/code?q=underscore+language%3Ajs+%40mozilla%2FBrowserQuest |
| 85 | +</code></pre> |
| 86 | + |
| 87 | +<p>All the various <a href="https://help.github.com/articles/searching-code">code search qualifiers</a> are still available to you. |
| 88 | +A <a href="https://help.github.com/articles/searching-code#users-organizations-and-repositories">user, organization, or repository qualifier</a> is now required. |
| 89 | +The other search qualifiers are still optional.</p> |
| 90 | + |
| 91 | +<h2 id="other-search-types-not-affected">Other Search Types Not Affected</h2> |
| 92 | + |
| 93 | +<p>This new validation only applies to the <a href="/v3/search/#search-code">Code Search API</a>. |
| 94 | +It does not apply to the Search API for <a href="/v3/search/#search-issues">issues</a>, <a href="/v3/search/#search-users">users</a>, or <a href="/v3/search/#search-repositories">repositories</a>.</p> |
| 95 | + |
| 96 | +<p>This validation does not affect searches performed on <a href="https://github.com/search">github.com/search</a>.</p> |
| 97 | + |
| 98 | +<p>By ensuring that code queries are more targeted in nature, the API will be ready to meet the expected demand from all your apps. |
| 99 | +As we continue to tune the Search API, we hope to relax this validation in the future. |
| 100 | +There’s no ETA, but we’d like to relax it as soon as it’s feasible.</p> |
| 101 | + |
| 102 | +<p>As always, if you have any questions or feedback, please <a href="https://github.com/contact?form%5Bsubject%5D=New+Validation+Rule+for+Code+Search+API">get in touch</a>.</p> |
| 103 | +</div> |
| 104 | + |
| 105 | + </div> |
| 106 | + |
| 107 | + <div id="js-sidebar" class="sidebar-shell"> |
| 108 | + <div class="js-toggle-list sidebar-module expandable"> |
| 109 | + <ul> |
| 110 | + <li class="js-topic"> |
| 111 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/v3/">Overview</a></h3> |
| 112 | + <ul class="js-guides"> |
| 113 | + <li><a href="/v3/libraries/">Libraries</a></li> |
| 114 | + <li><a href="/v3/media/">Media Types</a></li> |
| 115 | + <li><a href="/v3/oauth/">OAuth</a></li> |
| 116 | + <li><a href="/v3/auth/">Other Authentication Methods</a></li> |
| 117 | + <li><a href="/v3/troubleshooting/">Troubleshooting</a></li> |
| 118 | + </ul> |
| 119 | + </li> |
| 120 | + <li class="js-topic"> |
| 121 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/guides/">Guides</a></h3> |
| 122 | + <ul class="js-guides"> |
| 123 | + <li><a href="/guides/getting-started/">Getting Started</a></li> |
| 124 | + <li><a href="/guides/basics-of-authentication/">Basics of Authentication</a></li> |
| 125 | + <li><a href="/guides/rendering-data-as-graphs/">Rendering Data as Graphs</a></li> |
| 126 | + <li><a href="/guides/working-with-comments/">Working with Comments</a></li> |
| 127 | + </ul> |
| 128 | + </li> |
| 129 | + <li class="js-topic"> |
| 130 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/v3/activity/">Activity</a></h3> |
| 131 | + <ul class="js-guides"> |
| 132 | + <li><a href="/v3/activity/events/">Events</a></li> |
| 133 | + <li><a href="/v3/activity/events/types/">Event Types</a></li> |
| 134 | + <li><a href="/v3/activity/feeds/">Feeds</a></li> |
| 135 | + <li><a href="/v3/activity/notifications/">Notifications</a></li> |
| 136 | + <li><a href="/v3/activity/starring/">Starring</a></li> |
| 137 | + <li><a href="/v3/activity/watching/">Watching</a></li> |
| 138 | + </ul> |
| 139 | + </li> |
| 140 | + <li class="js-topic"> |
| 141 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/v3/gists/">Gists</a></h3> |
| 142 | + <ul class="js-guides"> |
| 143 | + <li><a href="/v3/gists/comments/">Comments</a></li> |
| 144 | + </ul> |
| 145 | + </li> |
| 146 | + <li class="js-topic"> |
| 147 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/v3/git/">Git Data</a></h3> |
| 148 | + <ul class="js-guides"> |
| 149 | + <li><a href="/v3/git/blobs/">Blobs</a></li> |
| 150 | + <li><a href="/v3/git/commits/">Commits</a></li> |
| 151 | + <li><a href="/v3/git/refs/">References</a></li> |
| 152 | + <li><a href="/v3/git/tags/">Tags</a></li> |
| 153 | + <li><a href="/v3/git/trees/">Trees</a></li> |
| 154 | + </ul> |
| 155 | + </li> |
| 156 | + <li class="js-topic"> |
| 157 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/v3/issues/">Issues</a></h3> |
| 158 | + <ul class="js-guides"> |
| 159 | + <li><a href="/v3/issues/assignees/">Assignees</a></li> |
| 160 | + <li><a href="/v3/issues/comments/">Comments</a></li> |
| 161 | + <li><a href="/v3/issues/events/">Events</a></li> |
| 162 | + <li><a href="/v3/issues/labels/">Labels</a></li> |
| 163 | + <li><a href="/v3/issues/milestones/">Milestones</a></li> |
| 164 | + </ul> |
| 165 | + </li> |
| 166 | + <li class="js-topic"> |
| 167 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/v3/misc/">Miscellaneous</a></h3> |
| 168 | + <ul class="js-guides"> |
| 169 | + <li><a href="/v3/emojis/">Emojis</a></li> |
| 170 | + <li><a href="/v3/gitignore/">Gitignore</a></li> |
| 171 | + <li><a href="/v3/markdown/">Markdown</a></li> |
| 172 | + <li><a href="/v3/meta/">Meta</a></li> |
| 173 | + <li><a href="/v3/rate_limit/">Rate Limit</a></li> |
| 174 | + </ul> |
| 175 | + </li> |
| 176 | + <li class="js-topic"> |
| 177 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/v3/orgs/">Orgs</a></h3> |
| 178 | + <ul class="js-guides"> |
| 179 | + <li><a href="/v3/orgs/members/">Members</a></li> |
| 180 | + <li><a href="/v3/orgs/teams/">Teams</a></li> |
| 181 | + </ul> |
| 182 | + </li> |
| 183 | + <li class="js-topic"> |
| 184 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/v3/pulls/">Pull Requests</a></h3> |
| 185 | + <ul class="js-guides"> |
| 186 | + <li><a href="/v3/pulls/comments/">Review Comments</a></li> |
| 187 | + </ul> |
| 188 | + </li> |
| 189 | + <li class="js-topic"> |
| 190 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/v3/repos/">Repositories</a></h3> |
| 191 | + <ul class="js-guides"> |
| 192 | + <li><a href="/v3/repos/collaborators/">Collaborators</a></li> |
| 193 | + <li><a href="/v3/repos/comments/">Comments</a></li> |
| 194 | + <li><a href="/v3/repos/commits/">Commits</a></li> |
| 195 | + <li><a href="/v3/repos/contents/">Contents</a></li> |
| 196 | + <li><a href="/v3/repos/downloads/">Downloads</a></li> |
| 197 | + <li><a href="/v3/repos/forks/">Forks</a></li> |
| 198 | + <li><a href="/v3/repos/keys/">Keys</a></li> |
| 199 | + <li><a href="/v3/repos/hooks/">Hooks</a></li> |
| 200 | + <li><a href="/v3/repos/merging/">Merging</a></li> |
| 201 | + <li><a href="/v3/repos/releases/">Releases</a></li> |
| 202 | + <li><a href="/v3/repos/statistics/">Statistics</a></li> |
| 203 | + <li><a href="/v3/repos/statuses/">Statuses</a></li> |
| 204 | + </ul> |
| 205 | + </li> |
| 206 | + <li class="js-topic"> |
| 207 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/v3/search/">Search</a></h3> |
| 208 | + <ul class="js-guides"> |
| 209 | + <li><a href="/v3/search/#search-repositories">Repositories</a></li> |
| 210 | + <li><a href="/v3/search/#search-code">Code</a></li> |
| 211 | + <li><a href="/v3/search/#search-issues">Issues</a></li> |
| 212 | + <li><a href="/v3/search/#search-users">Users</a></li> |
| 213 | + <li><a href="/v3/search/legacy/">Legacy Search</a></li> |
| 214 | + </ul> |
| 215 | + </li> |
| 216 | + <li class="js-topic"> |
| 217 | + <h3><a href="#" class="js-expand-btn collapsed"> </a><a href="/v3/users/">Users</a></h3> |
| 218 | + <ul class="js-guides"> |
| 219 | + <li><a href="/v3/users/emails/">Emails</a></li> |
| 220 | + <li><a href="/v3/users/followers/">Followers</a></li> |
| 221 | + <li><a href="/v3/users/keys/">Keys</a></li> |
| 222 | + </ul> |
| 223 | + </li> |
| 224 | + </ul> |
| 225 | + </div> <!-- /sidebar-module --> |
| 226 | + <div class="sidebar-module"> |
| 227 | + <p>This website is a <a href="https://github.com/github/developer.github.com" target="_blank">public GitHub repository</a>. Please help us by forking the project and adding to it.</p> |
| 228 | + </div> |
| 229 | + </div><!-- /sidebar-shell --> |
| 230 | + |
| 231 | + </div><!-- #wrapper --> |
| 232 | + |
| 233 | + <div id="footer" > |
| 234 | + <div class="upper_footer"> |
| 235 | + <div class="footer_inner clearfix"> |
| 236 | + |
| 237 | + <ul class="footer_nav"> |
| 238 | + <h4>GitHub</h4> |
| 239 | + <li><a href="https://github.com/about">About</a></li> |
| 240 | + <li><a href="https://github.com/blog">Blog</a></li> |
| 241 | + <li><a href="https://github.com/features">Features</a></li> |
| 242 | + <li><a href="https://github.com/contact">Contact & Support</a></li> |
| 243 | + <li><a href="https://github.com/training">Training</a></li> |
| 244 | + <li><a href="http://status.github.com/">Site Status</a></li> |
| 245 | + </ul> |
| 246 | + |
| 247 | + <ul class="footer_nav"> |
| 248 | + <h4>Tools</h4> |
| 249 | + <li><a href="http://mac.github.com/">GitHub for Mac</a></li> |
| 250 | + <li><a href="http://mobile.github.com/">Issues for iPhone</a></li> |
| 251 | + <li><a href="https://gist.github.com">Gist: Code Snippets</a></li> |
| 252 | + <li><a href="http://enterprise.github.com/">GitHub Enterprise</a></li> |
| 253 | + <li><a href="http://jobs.github.com/">Job Board</a></li> |
| 254 | + </ul> |
| 255 | + |
| 256 | + <ul class="footer_nav"> |
| 257 | + <h4>Extras</h4> |
| 258 | + <li><a href="http://shop.github.com/">GitHub Shop</a></li> |
| 259 | + <li><a href="http://octodex.github.com/">The Octodex</a></li> |
| 260 | + </ul> |
| 261 | + |
| 262 | + <ul class="footer_nav"> |
| 263 | + <h4>Documentation</h4> |
| 264 | + <li><a href="http://help.github.com/">GitHub Help</a></li> |
| 265 | + <li><a href="http://developer.github.com/">Developer API</a></li> |
| 266 | + <li><a href="http://github.github.com/github-flavored-markdown/">GitHub Flavored Markdown</a></li> |
| 267 | + <li><a href="http://pages.github.com/">GitHub Pages</a></li> |
| 268 | + </ul> |
| 269 | + |
| 270 | + </div><!-- /.site --> |
| 271 | + </div><!-- /.upper_footer --> |
| 272 | + |
| 273 | + <div class="lower_footer"> |
| 274 | + <ul class="footer-cell"> |
| 275 | + <li><a href="http://help.github.com/terms-of-service/">Terms of Service</a></li> |
| 276 | + <li><a href="http://help.github.com/privacy-policy/">Privacy</a></li> |
| 277 | + <li><a href="http://help.github.com/security/">Security</a></li> |
| 278 | + </ul> |
| 279 | + |
| 280 | + <span class="footer-cell"> |
| 281 | + <a href="https://github.com" class="mega-icon mega-icon-invertocat"></a> |
| 282 | + </span> |
| 283 | + |
| 284 | + <span class="footer-cell"> |
| 285 | + Design © <span class="js-year">2013</span> GitHub, Inc. All rights reserved. |
| 286 | + <p> |
| 287 | + Except where otherwise noted, content on this site is licensed under a |
| 288 | + <a href="http://creativecommons.org/licenses/by/3.0/us/">Creative Commons CC-BY license</a>. |
| 289 | + </p> |
| 290 | + </span> |
| 291 | + </div> |
| 292 | + |
| 293 | + </div><!-- /#footer --> |
| 294 | + <script type="text/javascript"> |
| 295 | + var _gauges = _gauges || []; |
| 296 | + (function() { |
| 297 | + var t = document.createElement('script'); |
| 298 | + t.type = 'text/javascript'; |
| 299 | + t.async = true; |
| 300 | + t.id = 'gauges-tracker'; |
| 301 | + t.setAttribute('data-site-id', '4f2038e0cb25bc1b55000003'); |
| 302 | + t.src = '//secure.gaug.es/track.js'; |
| 303 | + var s = document.getElementsByTagName('script')[0]; |
| 304 | + s.parentNode.insertBefore(t, s); |
| 305 | + })(); |
| 306 | + </script> |
| 307 | +</body> |
| 308 | +</html> |
0 commit comments