$.get( url, function(data, status) {} ); is the straightforward and easy solution can download remote files or API response.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <div id="test"></div> <script> url = "https://google.com"; $.get( url, function(data, status) { $("#test").html( data); }); </script>