Wikipedia viewer api error

const req= data => {
return https://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch=${data};
};

const builder = async s => {
const data = await fetch(req(s));
const response = await data.json();
};

there is a error in console No ‘Access-Control-Allow-Origin’

Who build wikipedia viewer pls answer how did you fix this problem, or give another api =) Thanks.

Our forum has a really good search feature: No Access-Control-Allow-Origin

1 Like

Sorry, Didn’t think about this :pensive:

I figured I’d save you the time of waiting for a lot of the same answers :wink:

yeah it’s a true :slight_smile: