query-ec55a35d9e21f616677bc6c5f52d2cf0
added 2022-08
title: All Properties and Values of an Item
Based on the "winwaed"'s answer on Stack Overflow: https://stackoverflow.com/questions/56486888/how-to-get-property-labels-from-wikidata-using-sparql
SELECT ?propLabel ?valueLabel WHERE { wd:Q243 ?a ?value. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } ?prop wikibase:directClaim ?a . }
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# added 2022-08
# title: All Properties and Values of an Item
# Based on the "winwaed"'s answer on Stack Overflow: https://stackoverflow.com/questions/56486888/how-to-get-property-labels-from-wikidata-using-sparql
SELECT ?propLabel ?valueLabel
WHERE
{
wd:Q243 ?a ?value.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
?prop wikibase:directClaim ?a .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?a")
v3("?prop")
v2("?value")
c3(["bd:serviceParam"]):::iri
c5(["en"]):::literal
c1(["wd:Q243"]):::iri
c1 -->v1--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c3 --"wikibase:language"--> c5
end
v3 --"wikibase:directClaim"--> v1