I'd like to return a list of the presidents of the United States from the wikipedia api, but I can't seem to find an efficient way to do so.
I can use the rvsection
param to isolate to that section of the content, but it seems like a very brittle (and still hard to parse) solution. Is there an easier way to get the names of the presidents in that section?
Current query:
https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvprop=content&format=json&pageids=19908980&rvsection=1