query-2587e0dcc03c6f776c0c8fedf8bc5cb9

rq turtle/ttl

TODO

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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?article WHERE {
  hint:Query hint:optimizer "None".
  SERVICE wikibase:mwapi {
    bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
    bd:serviceParam wikibase:api "Generator" .
    bd:serviceParam mwapi:generator "search" .
    bd:serviceParam mwapi:gsrsearch "hastemplate:"infobox film"" .
    bd:serviceParam mwapi:gsrlimit "max" .
    ?item wikibase:apiOutputItem mwapi:item .   
 } 
  FILTER(BOUND(?item))
  ?item wdt:P31 wd:Q11424 .
  ?item wdt:P495 ?place .
  ?place wdt:P361 wd:Q4412 .
  OPTIONAL {
     ?article schema:about ?item .
     ?article schema:inLanguage "en" .
     FILTER (SUBSTR(str(?article), 1, 25) = "https://en.wikipedia.org/")
 }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Query found at