0

I'm trying to figure out how to use the Wikipedia API to get an entire Wikipedia page in JSON format.

Here is my current query. It's not giving me nearly all the content from the page.

https://en.wikipedia.org/w/api.php?origin=*&action=query&format=json&formatversion=2&redirects&prop=revisions&rvprop=content&titles=Albert+Einstein

Does anybody know how to return a Wikipedia page's entire content as JSON?

All the similar questions I've seen have answers like how to get just the snippet from the Wikipedia page, or just images. I want the entire Wikipedia page in JSON format so it can be parsed by a computer for analysis.

  • 1
    What is missing from that response? If you're actually wanting plain text rather than wikitext, then see https://stackoverflow.com/questions/74836987/how-can-i-extract-all-sections-of-a-wikipedia-page-in-plain-text – smartse Jan 16 '23 at 12:35

0 Answers0