wikidata get all properties with labels and values of an item

Useful links on the Wikidata data model:

  • RDF dump format
  • Wikidata qualifiers, references and ranks
  • Help:qualifiers

Your query should be of this kind:

SELECT ?wdLabel ?ps_Label ?wdpqLabel ?pq_Label {
  VALUES (?company) {(wd:Q95)}

  ?company ?p ?statement .
  ?statement ?ps ?ps_ .

  ?wd wikibase:claim ?p.
  ?wd wikibase:statementProperty ?ps.

  OPTIONAL {
  ?statement ?pq ?pq_ .
  ?wdpq wikibase:qualifier ?pq .
  }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
} ORDER BY ?wd ?statement ?ps_

Try it!

Only qualifiers and their values are included in the result. Neither provenance references nor value annotations (e.g. time precision) are included. Please write a comment if you need to add them.

Leave a Comment

tech