Есть такой способ:
let url = "https://www.wikidata.org/w/api.php?";
const params: { [key: string]: string } = {
action: "wbsearchentities",
search: "плод",
format: "json",
language: "ru",
uselang: "ru"
};
// url += "?origin=*";
Object.keys(params).forEach(function (key) {
url += `&${key}=${params[key]}`;
});
fetch(url)
.then(function (response) {
return response.json();
})
.then(function (response) {
console.log(response.search[0].description);
})
.catch(function (error) {
console.log(error);
});