query-7cd62c05ea4576cf0287f7ef0f11e5b1

rq turtle/ttl

title: "smell" within the EN itemLabel SELECT DISTINCT ?item ?itemLabel WHERE { hint:Query hint:optimizer "None".

SERVICE wikibase:mwapi { bd:serviceParam wikibase:api "Search"; wikibase:endpoint "www.wikidata.org"; mwapi:srsearch "smell". ?item wikibase:apiOutputItem mwapi:title . }

?item wdt:P31/wdt:P279* wd:Q838948 . hint:Prior hint:gearing "forward". FILTER(contains(str(lcase(?itemLabel)),"smell")) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?item rdfs:label ?itemLabel} }

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: "smell" within the EN itemLabel
SELECT DISTINCT ?item ?itemLabel 
WHERE {


  SERVICE wikibase:mwapi {
    bd:serviceParam wikibase:api "Search";
                    wikibase:endpoint "www.wikidata.org";
                    mwapi:srsearch "smell".
    ?item wikibase:apiOutputItem mwapi:title .
  }

  ?item wdt:P31/wdt:P279* wd:Q838948 . 
  FILTER(contains(str(lcase(?itemLabel)),"smell"))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
                           ?item rdfs:label ?itemLabel}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?item"):::projected v1("?itemLabel"):::projected a1((" ")) c7(["www.wikidata.org"]):::literal c13(["wd:Q838948"]):::iri c1(["smell"]):::literal c3(["bd:serviceParam"]):::iri c5(["Search"]):::literal c16(["#91;AUTO_LANGUAGE#93;,en"]):::literal c10(["mwapi:title"]):::iri f0[["contains(str(lower-case(?itemLabel)),'smell')"]] f0 --> v1 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c3 --"mwapi:api"--> c5 c3 --"mwapi:endpoint"--> c7 c3 --"mwapi:srsearch"--> c1 v2 --"mwapi:apiOutputItem"--> c10 end v2 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c13 subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c3 --"mwapi:language"--> c16 v2 --"rdfs:label"--> v1 end