Luca
Luca

Reputation: 984

Get wikidata ID from specific property id and value

I need to get the wikidata id (i.e. Q38655111) of an item and I know the property id "Property:P961" and the property value (i.e. 310980-1).

If I call this API https://www.wikidata.org/w/api.php?action=query&format=xml&generator=backlinks&gblnamespace=0&gbllimit=5000&prop=info&gbltitle=Property:P961 I get all records. How may I filter for a specific property value?

Upvotes: 0

Views: 33

Answers (1)

Alex W.
Alex W.

Reputation: 174

That can be done via cirrusSearch. The call you need is: https://www.wikidata.org/w/api.php?action=query&list=search&srsearch=haswbstatement:P961=310980-1&format=json

Upvotes: 1

Related Questions