My god, why did you mention wikidata? SPARQL is the most obscure fucking thing I've ever encountered. I've been sitting here for an hour trying to find how to get the data of a specific page!
I guess the rest API will do, ugh.
Related discussion: https://news.ycombinator.com/item?id=28277749