User:Habst/getSitelink.js

query = `SELECT ?item ?articleName WHERE { ?item wdt:P1146 "14916120". ?item ^schema:about ?article. OPTIONAL { ?article schema:isPartOf ; schema:name ?articleName. } }`; await (await fetch('https://query.wikidata.org/sparql?'+new URLSearchParams({query}), { headers: { 'accept': 'application/sparql-results+json' } })).json;