I have been looking for examples online but can't find any for getting ISO 3166-1 country codes using the Wikidata API.
It's mentioned here that one can do https://query.wikidata.org/sparql
or https://query.wikidata.org/bigdata/ldf
, but I don't really know the difference. Also, I'm used to using APIs that return JSON, which it seems like neither of these two endpoints are. Is there a way to get JSON?
Overall, just wondering how to do this properly since examples are few and far between (or none at all).