sclass WikiData { S language = "en"; S site = "https://wikidata.org"; S apiPath = "/w/api.php"; L search(S q) { ret (L) rmapGet("search", (Map) loadJSONPageWithParams(site + apiPath, action := "wbsearchentities", format := "json", +language, type := "item", continue := 0, search := q)); } Map getItems(S ids) { ret (Map) rmapGet("entities", (Map) loadJSONPageWithParams(site + apiPath, action := "wbgetentities", format := "json", +ids)); } // itemID = e.g. "Q388" Map get(S itemID) { ret rmapGet(itemID, getItems(itemID)); } }