query-f8384674791ff0e47e0fd4451bbf4c73
Get items of any type with a given label and so on, just like when I type the word in the Wikidata search box. Any query I try to do this will time out. (Q428243)Cancer (Q161701)Cancer , (Q8849)Cancer , (Q12078)cancer I'd like to pass a text string and get a list of things for which it is an English label (ideally with a case-insensitive match). For example, when I give "cancer" as input, I'd like it to return
Use at
- https://query.wikidata.org/sparql
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?thing ?name
WHERE
{ ?thing rdfs:label ?name FILTER(lang(?name)="en") FILTER(?name="cancer")
} LIMIT 10
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?name"):::projected
v2("?thing"):::projected
f0[["?name = 'cancer'"]]
f0 --> v1
f1[["?name = 'en'"]]
f1 --> v1
v2 --"rdfs:label"--> v1