how to show json data using api

<html>

<title></title>

<head>

<script type=”text/javascript” src=”http://code.jquery.com/jquery-latest.js”></script>
<script type=”text/javascript”>// <![CDATA[
      $(“#searchterm”).keyup(function(e){
        var q = $(“#searchterm”).val();
        $.getJSON(“http://en.wikipedia.org/w/api.php?callback=?”,
        {
          search: q,
          action: “query”,
          list: “search”,
          format: “json”
        },
        function(data) {
          $(“#results”).empty();
          $(“#results”).append(“
 
Results for <b>” + q + “</b>
 
“);
          $.each(data.query.search, function(i,item){
            $(“#results”).append(“
<div><a href=’http://en.wikipedia.org/wiki/” + encodeURIComponent(item.title) + “‘>” + item.title + “</a>” + item.snippet + “</div>
“);
          });
        });
      });
 
// ]]></script>
</head>
<body>
<input id=”searchterm” type=”text” /> <button id=”search”>search</button>
</body>
</html>