query-35d220e3d56573d13388b9973f23e6a7

rq turtle/ttl

title:item creator (complete information) SELECT ?item ?creator ?timestamp ?edit_comment WHERE { ?input_item wdt:P9506 [] . BIND(strafter(str(?input_item),"/entity/") as ?titles)

SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "www.wikidata.org" . bd:serviceParam wikibase:api "Generator" . bd:serviceParam mwapi:generator "allpages" . bd:serviceParam mwapi:gapfrom ?titles . bd:serviceParam mwapi:gapto ?titles . bd:serviceParam mwapi:prop "revisions" . bd:serviceParam mwapi:rvprop "user|timestamp|comment" . bd:serviceParam mwapi:rvdir "newer" . bd:serviceParam mwapi:rvlimit "1" . ?item wikibase:apiOutputItem mwapi:title . ?creator wikibase:apiOutput "revisions/rev/@user" . ?timestamp wikibase:apiOutput "revisions/rev/@timestamp" . ?edit_comment wikibase:apiOutput "revisions/rev/@comment" . bd:serviceParam wikibase:limit "once" . } }

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:item creator (complete information)
SELECT ?item ?creator ?timestamp ?edit_comment
WHERE
{
  ?input_item wdt:P9506 [] .
  BIND(strafter(str(?input_item),"/entity/") as ?titles)

  SERVICE wikibase:mwapi
  {
    bd:serviceParam wikibase:endpoint "www.wikidata.org" .
    bd:serviceParam wikibase:api "Generator" .
    bd:serviceParam mwapi:generator "allpages" .
    bd:serviceParam mwapi:gapfrom ?titles .
    bd:serviceParam mwapi:gapto ?titles .
    bd:serviceParam mwapi:prop "revisions" .
    bd:serviceParam mwapi:rvprop "user|timestamp|comment" .
    bd:serviceParam mwapi:rvdir "newer" .
    bd:serviceParam mwapi:rvlimit "1" .
    ?item wikibase:apiOutputItem mwapi:title .
    ?creator wikibase:apiOutput "revisions/rev/@user" .
    ?timestamp wikibase:apiOutput "revisions/rev/@timestamp" .
    ?edit_comment wikibase:apiOutput "revisions/rev/@comment" .
    bd:serviceParam wikibase:limit "once" .
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?creator"):::projected v6("?edit_comment"):::projected v1("?input_item") v3("?item"):::projected v5("?timestamp"):::projected v2("?titles") a1((" ")) c3(["bd:serviceParam"]):::iri c9(["allpages"]):::literal c13(["revisions"]):::literal c23(["revisions/rev/@user"]):::literal c5(["www.wikidata.org"]):::literal c15(["user|timestamp|comment"]):::literal c17(["newer"]):::literal c19(["1"]):::literal c27(["once"]):::literal c24(["revisions/rev/@timestamp"]):::literal c21(["mwapi:title"]):::iri c7(["Generator"]):::literal c25(["revisions/rev/@comment"]):::literal v1 --"wdt:P9506"--> a1 bind0[/"substring-after(str(?input_item),'/entity/')"/] v1 --o bind0 bind0 --as--o v2 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c3 --"mwapi:endpoint"--> c5 c3 --"mwapi:api"--> c7 c3 --"mwapi:generator"--> c9 c3 --"mwapi:gapfrom"--> v2 c3 --"mwapi:gapto"--> v2 c3 --"mwapi:prop"--> c13 c3 --"mwapi:rvprop"--> c15 c3 --"mwapi:rvdir"--> c17 c3 --"mwapi:rvlimit"--> c19 v3 --"mwapi:apiOutputItem"--> c21 v4 --"mwapi:apiOutput"--> c23 v5 --"mwapi:apiOutput"--> c24 v6 --"mwapi:apiOutput"--> c25 c3 --"mwapi:limit"--> c27 end