I want to do a query on WikiData where I get all items, that are somehow connect to another item.
For example I have Item "Vienna" (Q1741). Now I want to get all Items, that have Item Vienna in any property.
The API I currently use is the one from wmflabs. Here I can do a query like
claim[189:1741]
This gives me every item with property "Place of discovery" (P189) = "Vienna" (Q1741).
But what I want is something like
claim[*:1741]
to get all items where any property fits "Vienna", for example "Birthplace" (P19), "Place of Death" (P20) or anything else. But wildcards are not working here.
Is this possible? How?
PS: I'm not bound to this API, I could use any API to wikidata accessible via JS. There are also some SparQL endpoints to Wikidata-Dumps available (like wikidataldf), but I don't know how stable they are. But if anyone could help with a solution using SPARQL, I would be glad, too.