query-5c83a655bf4bd6fd3713988e5b64f41f
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel
WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Search";
wikibase:endpoint "www.wikidata.org";
mwapi:srsearch "Los Angeles".
?item wikibase:apiOutputItem mwapi:title .
}
?item rdfs:label ?itemLabel . filter(lang(?itemLabel)="en")
FILTER(CONTAINS(?itemLabel,"Los Angeles"))
?item wdt:P31/wdt:P279* wd:Q515 .
?item wdt:P17 wd:Q30.
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v1("?itemLabel"):::projected
a1((" "))
c8(["www.wikidata.org"]):::literal
c17(["wd:Q30"]):::iri
c4(["bd:serviceParam"]):::iri
c15(["wd:Q515"]):::iri
c6(["Search"]):::literal
c1(["Los Angeles"]):::literal
c11(["mwapi:title"]):::iri
f0[["contains(?itemLabel,'Los Angeles')"]]
f0 --> v1
f1[["?itemLabel = 'en'"]]
f1 --> v1
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c4 --"mwapi:api"--> c6
c4 --"mwapi:endpoint"--> c8
c4 --"mwapi:srsearch"--> c1
v2 --"mwapi:apiOutputItem"--> c11
end
v2 --"rdfs:label"--> v1
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c15
v2 --"wdt:P17"--> c17