query-9cd913362ff024ae7015424c453dae23

rq turtle/ttl

Get labels and descriptions for the particular itemsI have pretty long list of items' IDs like {Q1149081, Q420, Q58854, ...} and I need just to get the labels and descriptions for them and export to csv. Is there any way to do it via SPARQL? 15:23, 29 May 2022 (UTC)) talk (Fusanari Shimizu: if You need to…, this should do:Fusanari Shimizu@

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT #?item
?itemLabel ?itemDescription {
  VALUES ?item {wd:Q1149081 wd:Q420 wd:Q58854}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item") c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;, en"]):::literal bind0[/VALUES ?item/] bind0-->v1 bind00(["wd:Q1149081"]) bind00 --> bind0 bind01(["wd:Q420"]) bind01 --> bind0 bind02(["wd:Q58854"]) bind02 --> bind0 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end