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, 2018 at 14:35
  • 1
    wikidata.org/w/… ? Better learn SPARQL. Apr 17, 2018 at 14:50

1 Answer 1


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' .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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