Is there a way to restrict the returned claims on wikidata's REST API? For example I am using this query:


which returns all claims for the entity. But I am only interested in "P31", for example. It seems excessive to download the whole set. Any ideas?

  • it's not that excessive to download the entire file (in this case less than 200KB), and then filter locally. – philshem Apr 17 '18 at 14:35
  • 1
    wikidata.org/w/… ? Better learn SPARQL. – Stanislav Kralin Apr 17 '18 at 14:50

Following Stanislavs comment: It is possible using the REST SPARQL Endpoint at


The query would be:

SELECT ?instanceof ?instanceofLabel WHERE {
 wd:Q17714 wdt:P31 ?instanceof.
 SERVICE wikibase:label {
  bd:serviceParam wikibase:language 'de' .


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.