Ajax

Using Ajax, you can make a request to the API with JavaScript!

index.html
<!-- Head -->
<script src="script.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
index.html
<!-- Body -->
<h1 class="name">Server Name</h1>
<p class="online">? Members</p>
<img class="pic">
<p class="owner">Owner: ?</p>
script.js
$(document).ready(() => {
$.get('https://example.com/servers/553408019120128020.json', data => {
$('.name').text(data.name);
$('.online').text(`${data.members} Members`);
$('.pic').attr('src', data.iconURL);
$('.owner').text(`Owner: ${data.owner.displayName}`);
});
});