if you getting an error related to Fetch, Node's flag option --no-experimental-fetch
may fix the issue
get-wikipedia-article
Fetch Wikipedia article resources (e.g. title, body, links, ...).
Install
npm i get-wikipedia-article
Usage
import getWikipediaArticle from 'get-wikipedia-article';
const article = await getWikipediaArticle('harry potter', {
language: 'es',
include: [
'title',
'body',
'related',
'summary',
'links',
'categories',
'description',
'alias',
'label',
],
format: 'html',
});
console.log(article);