wikipedia api notes

you can link to any wikipedia page by an id

random number in this range seems ok:


get random stuff (doesn't only return articles):

one random article (CHAR LIMIT exchars=500):

specify an article type (otherwise you get all kinds of non-article things like templates and talks) THE ORDER OF THIS SEEMS TO MATTER


search for articles by a word (here the word is: meaning):


Request json: { "action": "query", "format": "json", "list": "search|alllinks", "iwurl": 1, "srsearch": "meaning" }

CORs errors

Adding origin=* fixes CORs errors for requests from localhost for this API.

Posted @ 2019-02-28 12:49