query-e16301db190226762187ec2a85e037c9
: here is a version that should work : Chainastole@ 13:23, 11 September 2018 (UTC)) talk (Symac: : I don't have the answer to the question but I have changed the formatting, you need to add {{SPARQL|query= before the query then }} after it. Chainastole@ 15:09, 11 September 2018 (UTC)) talk (ChainastoleThank you, Symac for formatting. I am aware of this option. The issue I want the initial search of the items in the vicinity of provided coordinate be performed in Wikimedia - not Wikidata. This way I hope to receive better contextual relevance of the search. Additionally I would like to receive some information (like pageviews) which is accessible on Wikimedia but isn't on Wikidata. 15:31, 11 September 2018 (UTC)) talk (Tagishsimon which says "Parameters passed to a generator must be prefixed with a g. For instance, when using generator=backlinks, use gbltitle instead of bltitle." --https://www.mediawiki.org/wiki/API:Query#Generators: the cure might be as simple as adding an extra 'g' to a couple of your parameters - which I've done in your original query. See paragraph 3 of Chainastole@ that Generator service is supposed to receive "prop" as an input but when providing it like below it didn't work.https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual/MWAPI: This really fixed the problem. The Generator service now really returns the Wikimedia item to SPARQL query, where I conveniently retrieve more Wikidata related to it. My next problem is I need some info from Wikimedia, which is not accessible on Wikidata (like pageviews) which seem not to be supported MWAPI services. MWAPI Generator service only seems to be able to return the most basic item info like its URL, ns, pageid and title. I see at "Supported services" paragraph at Tagishsimon@
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?pageviews WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "en.wikipedia.org" .
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam mwapi:prop "pageviews" .
bd:serviceParam mwapi:pvipdays "2" .
bd:serviceParam mwapi:generator "geosearch" .
bd:serviceParam mwapi:ggscoord "32.086169|34.876460" .
bd:serviceParam mwapi:ggsradius "1000" .
bd:serviceParam wikibase:limit 10 .
?item wikibase:apiOutputItem mwapi:item .
?pageviews wikibase:apiOutput "@pageviews" .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}