query-1e48b13a07bbc4d0cd2a56525dad175a

rq turtle/ttl

title: using example created by Jura for in archive dated 14:12 on 11 August 2020 (UTC) SELECT ?item ?itemLabel ?instance_of ?instance_ofLabel WHERE { VALUES ?search_string { "Multisensory brand search: How the meaning of sounds guides consumers' visual attention." "Moderate Stress Enhances Immediate and Delayed Retrieval of Educationally Relevant Material in Healthy Young Men" "The inheritance of blindness-Lorem ipsum" } SERVICE wikibase:mwapi { bd:serviceParam wikibase:api "Search" . bd:serviceParam wikibase:endpoint "www.wikidata.org" . bd:serviceParam mwapi:srnamespace "0" . bd:serviceParam mwapi:srsearch ?search_string . ?title wikibase:apiOutput mwapi:title . } BIND( URI(CONCAT(str(wd:),?title)) as ?item) OPTIONAL { ?item wdt:P31 ?instance_of } # MINUS { ?item wdt:P31 wd:Q13442814 } # no articles # ?item wdt:P31 wd:Q47089 #only faults SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } }

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 bd: <http://www.bigdata.com/rdf#>
#title: using example created by Jura for in archive dated 14:12 on 11 August 2020 (UTC)
SELECT ?item ?itemLabel ?instance_of ?instance_ofLabel
WHERE
{
  VALUES ?search_string {
    "Multisensory brand search: How the meaning of sounds guides consumers' visual attention."
    "Moderate Stress Enhances Immediate and Delayed Retrieval of Educationally Relevant Material in Healthy Young Men" 
    "The inheritance of blindness-Lorem ipsum"
  }
  SERVICE wikibase:mwapi
  {
      bd:serviceParam wikibase:api "Search" .
      bd:serviceParam wikibase:endpoint "www.wikidata.org" .
      bd:serviceParam mwapi:srnamespace "0" .
      bd:serviceParam mwapi:srsearch ?search_string  .
      ?title wikibase:apiOutput mwapi:title .
  }
  BIND( URI(CONCAT(str(wd:),?title)) as ?item)
  OPTIONAL { ?item wdt:P31 ?instance_of }
  # MINUS { ?item wdt:P31 wd:Q13442814 }  # no articles
  # ?item wdt:P31 wd:Q47089 #only faults
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?instance_of"):::projected v3("?item"):::projected v1("?search_string") v2("?title") c6(["www.wikidata.org"]):::literal c8(["0"]):::literal c2(["bd:serviceParam"]):::iri c4(["Search"]):::literal c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal c11(["mwapi:title"]):::iri bind0[/VALUES ?search_string/] bind0-->v1 bind00(["Multisensory brand search: How the meaning of sounds guides consumers' visual attention."]) bind00 --> bind0 bind01(["Moderate Stress Enhances Immediate and Delayed Retrieval of Educationally Relevant Material in Healthy Young Men"]) bind01 --> bind0 bind02(["The inheritance of blindness-Lorem ipsum"]) bind02 --> bind0 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c2 --"mwapi:api"--> c4 c2 --"mwapi:endpoint"--> c6 c2 --"mwapi:srnamespace"--> c8 c2 --"mwapi:srsearch"--> v1 v2 --"mwapi:apiOutput"--> c11 end bind1[/"concat(str('wd:'),?title)"/] v2 --o bind1 bind1 --as--o v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P31".-> v4 end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c2 --"mwapi:language"--> c15 end