query-cb40239a1bc38a4892aced8b379fa2fb
Engelske etiketter som inneholder ordet 'Oslo' SELECT ?item ?label WHERE { SERVICE wikibase:mwapi { bd:serviceParam wikibase:endpoint "www.wikidata.org"; wikibase:api "Generator"; mwapi:generator "search"; mwapi:gsrsearch "inlabel:oslo"; mwapi:gsrlanguage "en"; mwapi:gsrlimit "max". ?item wikibase:apiOutputItem mwapi:title. } ?item rdfs:label ?label. FILTER(LANG(?label)="en") FILTER(CONTAINS(LCASE(?label), "oslo")) }
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Engelske etiketter som inneholder ordet 'Oslo'
SELECT ?item ?label
WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "www.wikidata.org";
wikibase:api "Generator";
mwapi:generator "search";
mwapi:gsrsearch "inlabel:oslo";
mwapi:gsrlanguage "en";
mwapi:gsrlimit "max".
?item wikibase:apiOutputItem mwapi:title.
}
?item rdfs:label ?label. FILTER(LANG(?label)="en")
FILTER(CONTAINS(LCASE(?label), "oslo"))
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?label"):::projected
c6(["www.wikidata.org"]):::literal
c15(["max"]):::literal
c2(["en"]):::literal
c10(["search"]):::literal
c4(["bd:serviceParam"]):::iri
c12(["inlabel:oslo"]):::literal
c17(["mwapi:title"]):::iri
c8(["Generator"]):::literal
f0[["contains(lower-case(?label),'oslo')"]]
f0 --> v1
f1[["?label = 'en'"]]
f1 --> v1
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:gsrsearch"--> c12
c4 --"mwapi:gsrlanguage"--> c2
c4 --"mwapi:gsrlimit"--> c15
v2 --"mwapi:apiOutputItem"--> c17
end
v2 --"rdfs:label"--> v1