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 made an iOS Shortcut based on the same code. To use it after installing, access it from the iOS Share screen when you're on a relevant site. It will look for preferred mirrors from Wikidata before running.
I guess the rest API will do, ugh.
Related discussion: https://news.ycombinator.com/item?id=28277749