query-7c5af0f1eed918d8b424eda6386a8e85

rq turtle/ttl

Bouzinac

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#>
SELECT ?item ?itemLabel ?extract
WHERE
{
  ?item wdt:P31 wd:Q484170 .
  BIND (SUBSTR(STR(?item), 32) AS ?item_title)
  OPTIONAL
  {
    SERVICE wikibase:mwapi
    {
      bd:serviceParam wikibase:endpoint "www.wikidata.org" .
      bd:serviceParam wikibase:api "Generator" .
      bd:serviceParam mwapi:generator "allpages" .
      bd:serviceParam mwapi:gapnamespace "1" .
      bd:serviceParam mwapi:gapfrom ?item_title .
      bd:serviceParam mwapi:gapto ?item_title .
      bd:serviceParam mwapi:prop "extracts" .
      bd:serviceParam mwapi:explaintext "true" .
      bd:serviceParam mwapi:exchars "50" .
      bd:serviceParam mwapi:exlimit "1" .
      ?extract wikibase:apiOutput "extract/text()".
    }
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
LIMIT 10

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?extract"):::projected v1("?item"):::projected v2("?item_title") c4(["bd:serviceParam"]):::iri c10(["allpages"]):::literal c20(["50"]):::literal c6(["www.wikidata.org"]):::literal c23(["extract/text()"]):::literal c12(["1"]):::literal c18(["true"]):::literal c26(["#91;AUTO_LANGUAGE#93;,en"]):::literal c16(["extracts"]):::literal c2(["wd:Q484170"]):::iri c8(["Generator"]):::literal v1 --"wdt:P31"--> c2 bind0[/"substring(str(?item),'32^^xsd:integer')"/] v1 --o bind0 bind0 --as--o v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c4 -."mwapi:endpoint".-> c6 c4 --"mwapi:api"--> c8 c4 --"mwapi:generator"--> c10 c4 --"mwapi:gapnamespace"--> c12 c4 --"mwapi:gapfrom"--> v2 c4 --"mwapi:gapto"--> v2 c4 --"mwapi:prop"--> c16 c4 --"mwapi:explaintext"--> c18 c4 --"mwapi:exchars"--> c20 c4 --"mwapi:exlimit"--> c12 v3 --"mwapi:apiOutput"--> c23 end end subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c4 --"mwapi:language"--> c26 end