User:WikiMacaroons/linkrot.js

const mlinks = { action: 'parse', page: 'Coffee', format: 'json', prop: 'externallinks' }; const mwapi = new mw.Api;

mwapi.get(mlinks).done(data => {	console.log(data.parse.text.externallinks); });