title: Fill Autocomplete From Wikidata api by passing Category
body: <p>I am stuck on a problem . I am having Code to fill autocomplete with results from wipipedia using wikidata api I have used the following git hub resource .</p>
  
  <p><strong>My HTML CODE</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Implementing Autocomplete Search using Wikipedia OpenSearch API - Demo by W3lessons&lt;/title&gt;
  &lt;style&gt;
  body {
          background: #a8a8a8 url(bg.png);
    background-repeat:no-repeat;
    margin:0 auto;
    padding:0;
          color: #7f7f7f;
    font-family:Arial, Helvetica, sans-serif;
    font-size:13px;
    line-height:18px;
    width:100%;
      }
  h1 { color:#F7F7F7; font-size:24px; font-weight:normal; }
  #search input {
    background: none repeat scroll 0 0 #fff;
    border: 0 none;
    color: #7F7F7F;
    float: left;
    font: 12px 'Helvetica','Lucida Sans Unicode','Lucida Grande',sans-serif;
    height: 20px;
    margin: 0;
    padding: 10px;
    transition: background 0.3s ease-in-out 0s;
    width: 300px;
   }
   
   #search button {
    background: url("search.png") no-repeat scroll center center #7eac10;
    cursor: pointer;
    height: 40px;
    text-indent: -99999em;
    transition: background 0.3s ease-in-out 0s;
    width: 40px;
    border: 2px solid #fff;
   }
   
   #search button:hover {
    background-color:#000;
   }
   
  &lt;/style&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
   &lt;center&gt;
  &lt;script type="text/javascript"&gt;&lt;!--
  google_ad_client = "ca-pub-5104998679826243";
  /* mysite_indivi */
  google_ad_slot = "0527018651";
  google_ad_width = 728;
  google_ad_height = 90;
  //--&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
  &lt;/script&gt;
  &lt;/center&gt;
    &lt;div style="width:50%; margin:0 auto;"&gt; 
     &lt;p style="margin:20px;"&gt;&lt;img src="http://w3lessons.info/logo.png" /&gt;&lt;/p&gt;
     &lt;div style="margin:20px;"&gt;
              &lt;h1&gt;Autocomplete Search using Wikipedia Opensearch API&lt;/h1&gt;
  
              &lt;form method="get" id="search"&gt;
                  &lt;input type="text" class="searchbox" value="Type here.. " onblur="if(this.value == '') { this.value = 'Type here..'; }" onfocus="if(this.value == 'Type here..') { this.value = ''; }" name="s"&gt;
                  &lt;button type="submit"&gt;Submit&lt;/button&gt;
              &lt;/form&gt; 
  
  
  
  
  
  
  
    
  
  
  
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css" /&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(".searchbox").autocomplete({
      source: function(request, response) {
          console.log(request.term);
          $.ajax({
              url: "http://en.wikipedia.org/w/api.php",
              dataType: "jsonp",
              data: {
                  'action': "opensearch",
                  'format': "json",
                  'search': request.term
              },
              success: function(data) {
                  response(data[1]);
              }
          });
      }
  });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>My Problem is I want to get data in autocomplete in particular category like if I can use this autocomplete on video in page then it should show results only related to video autocomplete in  or for music it should show fill only music category results in autocomplete or so on from which category it needs to </p>