Edit in JSFiddle

$('#pubid').on('keyup keypress', function (e) {
      $.ajax({
          dataType: "json",
          url: 'https://ee.internetvideoarchive.net/api/ExpressStandard/' + $("#pubid").val(),
          data: {
              'idtype': 1,
              'appid': 'eba4cf26'
          },
          success: function (d) {
              showResponseOutput(d);
          },
          error: function (err, result) {
              showResponseOutput(err.responseJSON);
          }
      });
  });

 function showResponseOutput(data) {
            $("#output").empty().append(JSON.stringify(data, null, '\t'));
        }
<input type="text" style="width:100%" id="pubid" aria-label="enter id" placeholder="Enter Number into textbox. Ex: 1756 for the movie Jaws." />
<pre id="output">
    Code Output
</pre>