As it was discussed earlier on Wikidata, the query
SELECT (IRI(concat("https://commons.wikimedia.org/wiki/", ?creatorTemplate)) as ?creatorLink) ?creatorName ?categoryName ?commonsCatItem ?commonsCatItemLabel {
SERVICE wikibase:mwapi { # list of all creator templates without Wikidata link
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
bd:serviceParam mwapi:gcmtitle "Category:Creator templates without Wikidata link" .
bd:serviceParam mwapi:generator "categorymembers" .
bd:serviceParam mwapi:gcmtype "page" .
bd:serviceParam mwapi:gcmlimit "max" .
bd:serviceParam mwapi:gcmsort "timestamp" .
bd:serviceParam mwapi:gcmdir "descending" .
?creatorTemplate wikibase:apiOutput mwapi:title .
}
hint:Prior hint:runFirst 1 .
SERVICE wikibase:mwapi { # get home category
bd:serviceParam wikibase:api "Categories" .
bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
bd:serviceParam mwapi:titles ?creatorTemplate .
bd:serviceParam mwapi:clshow "!hidden" .
?category wikibase:apiOutput mwapi:category .
}
BIND(substr(?creatorTemplate,9) as ?creatorName ) .
BIND(substr(?category,10) as ?categoryName) .
OPTIONAL {
?commonsCatItem wdt:P373 ?categoryName . # category is linked from Wikidata
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
FILTER ( BOUND(?commonsCatItem) ) .
FILTER ( ?commonsCatItem!=wd:Q24731821 ) .
<nowiki>}</nowiki>
does not return all the results because the generator does not show all the pages from c:Category:Creator templates without Wikidata link. Can we fix it somehow? At the moment I can get different results if I remove gcmsort or gcmdir. I would like to catch all the pages that are in that directory which have home category linked from Wikidara through P373, so I can add link to Wikidata. The current number of pages returned is 500. I would need it be be at least 1300 for the query to work