Can't perform search via GitHub API

Hello! I’ve tried the following code:

curl -H "Accept: application/vnd.github.v3+json" ' in:description'

but it failed with:

    <meta content="origin" name="referrer">
    <title>Bad request &middot; GitHub</title>
    <meta name="viewport" content="width=device-width">
    <style type="text/css" media="screen">
      body {
        background-color: #f6f8fa;
        color: rgba(0, 0, 0, 0.5);
        font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;
        font-size: 14px;
        line-height: 1.5;
      .c { margin: 50px auto; max-width: 600px; text-align: center; padding: 0 24px; }
      a { text-decoration: none; }
      a:hover { text-decoration: underline; }
      h1 { color: #24292e; line-height: 60px; font-size: 48px; font-weight: 300; margin: 0px; }
      p { margin: 20px 0 40px; }
      #s { margin-top: 35px; }
      #s a {
        color: #666666;
        font-weight: 200;
        font-size: 14px;
        margin: 0 10px;
    <div class="c">
      <h1>Whoa there!</h1>
      <p>You have sent an invalid request. <br><br>
        Please do not send this request again.
      <div id="s">
        <a href="">Contact Support</a> &mdash;
        <a href="">GitHub Status</a> &mdash;
        <a href="">@githubstatus</a>

How to fix if to make work?

When I load:

I get:

  "message": "Validation Failed",
  "errors": [
      "message": "Must include at least one user, organization, or repository",
      "resource": "Search",
      "field": "q",
      "code": "invalid"
  "documentation_url": ""

fwiw, typically code searches expect you to include an auth header (which I don’t see in your sample), also urls should generally encode spaces as %20.

1 Like