title: Wikipedia API does not give any data back
body: <p>I am trying to get data from the Wikipedia API but I cannot get data to return. I think the problem is with the URL, but I don't know. I have changed the URL. I had the url as</p>
  
  <p>url = "<a href="https://en.wikipedia.org/w/api.php?&amp;action=opensearch&amp;search=" rel="nofollow noreferrer">https://en.wikipedia.org/w/api.php?&amp;action=opensearch&amp;search=</a>" + searchItem +"&amp;format=json&amp;orgin=*";</p>
  
  <p>url = "<a href="https://en.wikipedia.org/w/api.php?&amp;action=opensearch&amp;search=" rel="nofollow noreferrer">https://en.wikipedia.org/w/api.php?&amp;action=opensearch&amp;search=</a>" + searchItem +"&amp;format=json&amp;orgin=*&amp;callback=?";</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(function(){
  
      
      $('#search-click').click(function(){ 
       var searchItem = document.getElementById('input-search').value;
       console.log(searchItem);
       console.log('clicked');
  
       var url = "https://en.wikipedia.org/w/api.php?&amp;action=opensearch&amp;search=" + searchItem +"&amp;format=json&amp;callback=?";
       $.ajax({
        type:"GET",
        url: url,
        async: false,
        dataType: "jsonp",
        success: function(data){
         console.log('Success.');
        },
        error: function(error){
         console.log('Error. Cannot Load Data.');
        }
  
       });
  
      });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body, html{
   padding: 0;
   margin: 0;
   background-color: #16324f;
   color: #d6d9ce;
   text-align: center;
   width: 100%;
  } 
  h1{
   text-align: center;
   color: #d6d9ce;
   font-size: 50px;
  }
  h3{
   text-align: center;
   font-size: 30px;
   color: #d6d9ce;
   padding-bottom: 0;
   margin-bottom: 5px;
  }
  .center div{
   margin: 0 30%;
  }
  form{
   padding: 10px;
   margin: 10px 10px;
   display: inline-flex;
  }
  #search-click img{
   padding-left: 10px;
   vertical-align: middle;
  }
  #input-search{
   padding: 10px;
   width: 400px;
   color: #16324f;
  }
  input{
   border-radius: 25px;
  }
  #random-search img{
   margin: 0 50%;
  }
  footer{
   margin-top: 100px;
  }
  footer a{
   text-decoration: none;
   color: #d6d9ce;
   text-align: center;
   font-size: 20px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
   &lt;title&gt;Wikipedia Viewer&lt;/title&gt;
   &lt;link rel="stylesheet" type="text/css" href="wikipediaviewer.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
   &lt;header&gt;&lt;h1&gt;Wikipedia Viewer&lt;/h1&gt;&lt;/header&gt;
   &lt;div class="center"&gt;
    &lt;div&gt;
     &lt;form id="form"&gt;
      &lt;input id="input-search" type="text" name="search"&gt;
      &lt;a id="search-click" href=""&gt;&lt;img src="https://png.icons8.com/ios/51/f49d37/search-filled.png"&gt;&lt;/a&gt;
     &lt;/form&gt;
    &lt;/div&gt;
    &lt;div&gt;
     &lt;h3&gt;Random Search&lt;/h3&gt;
     &lt;a id="random-search" href="https://en.wikipedia.org/wiki/Special:Random" target="_blank"&gt;&lt;img src="https://png.icons8.com/ios/51/d6d9ce/search-filled.png"&gt;&lt;/a&gt;
    &lt;/div&gt;
   &lt;/div&gt;
   &lt;div&gt;
     
    &lt;ul id="wikipedia-links"&gt;&lt;/ul&gt;
   &lt;/div&gt;
  
   &lt;footer&gt;
    &lt;a href="https://icons8.com"&gt;Icon pack by Icons8&lt;/a&gt;
   &lt;/footer&gt;
  
   &lt;!-- JQUERY --&gt;
  
       &lt;script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;!-- Latest compiled and minified JavaScript --&gt;
      &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"&gt;&lt;/script&gt;
  
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"&gt;&lt;/script&gt; 
       &lt;script type="text/javascript" src="wikipediaviewer.js"&gt;&lt;/script&gt; 
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>