query-75b8babbf8fad98ef4a58cbd1dda4b31

rq turtle/ttl

Querying for all external identifiers for an itemHello! I am trying to query wikidata to retrieve all of the external identifiers for a wikidata item. For example, I would like all of the external identifiers for Ferdinand Hodler (wd:Q214564). I am asking for all properties and their associated values of Ferdinand Hodler, and then I am specifying that I only want properties that are of the property type "External ID". When I run this query, the results read "No matching records found."

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?property ?value ?propertyLabel ?propertyDescription WHERE {
  wd:Q214564 ?property ?value .
  ?property wikibase:propertyType wikibase:ExternalId .
    SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
    }          
} ORDER BY ?propertyLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?property"):::projected v1("?propertyLabel"):::projected v3("?value"):::projected c5(["bd:serviceParam"]):::iri c1(["wd:Q214564"]):::iri c7(["en"]):::literal c3(["wikibase:ExternalId"]):::iri c1 -->v2--> v3 v2 --"wikibase:propertyType"--> c3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end