query-52c067a355374aeeca8e2fba9ed26849
Search in category SELECT DISTINCT ?item ?itemLabel (GROUP_CONCAT(?endpoint; SEPARATOR=", ") AS ?found_in) { ?cat schema:about wd:Q8882780. ?cat schema:isPartOf ?wikimedia_site. ?cat schema:name ?category_title. BIND (STRBEFORE(STRAFTER(STR(?wikimedia_site), "https://"), "/") AS ?endpoint) OPTIONAL { SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint ?endpoint. bd:serviceParam wikibase:api "Generator". bd:serviceParam mwapi:generator "categorymembers". bd:serviceParam mwapi:gcmtitle ?category_title. bd:serviceParam mwapi:gcmlimit "max". ?item wikibase:apiOutputItem mwapi:item. ?title wikibase:apiOutput mwapi:title. } } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it". } } GROUP BY ?item ?itemLabel
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#Search in category
SELECT DISTINCT ?item ?itemLabel (GROUP_CONCAT(?endpoint; SEPARATOR=", ") AS ?found_in)
{
?cat schema:about wd:Q8882780.
?cat schema:isPartOf ?wikimedia_site.
?cat schema:name ?category_title.
BIND (STRBEFORE(STRAFTER(STR(?wikimedia_site), "https://"), "/") AS ?endpoint)
OPTIONAL
{
SERVICE wikibase:mwapi
{
bd:serviceParam wikibase:endpoint ?endpoint.
bd:serviceParam wikibase:api "Generator".
bd:serviceParam mwapi:generator "categorymembers".
bd:serviceParam mwapi:gcmtitle ?category_title.
bd:serviceParam mwapi:gcmlimit "max".
?item wikibase:apiOutputItem mwapi:item.
?title wikibase:apiOutput mwapi:title.
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it". }
}
GROUP BY ?item ?itemLabel