JSFiddle - React, Tailwind, and code Playground
HTML
<div id=results></div>
CSS
body {
font-family: sans-serif;
}
JavaScript
const q = 'youtube.com';
var p = 0;
onload = async function () {
// see https://hn.algolia.com/api
const url = 'https://hn.algolia.com/api/v1/search?query=' + q + '/&restrictSearchableAttributes=url';
const r = await fetch(url + '&page=' + p++);
const s = await r.json();
const b = `<br><br>`;
const h = s.hits
.filter(h => new URL(h.url).hostname.endsWith(q))
.map(h => `${h.points} <a href=${h.url} target=_blank>${h.title}</a>`)
.join(b);
results.innerHTML = h + b + '<button id=more>Next</button>';
more.onclick = onload;
more.style.width = '100%';
};