query-ce507e57fc4706616b27248294f92dd0
TODO
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#>
SELECT ?item ?l ?lang
{
# BIND ( "indescription:puente metálico" as ?search_string )
# BIND ( "inalias:Viaducto del Hacho" as ?search_string )
BIND ( "inlabel:puente del Hacho" as ?search_string )
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "www.wikidata.org" .
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam mwapi:generator "search" .
bd:serviceParam mwapi:language "es" .
bd:serviceParam mwapi:gsrsearch ?search_string .
bd:serviceParam mwapi:gsrlimit "max" .
bd:serviceParam mwapi:gsrnamespace "0" .
?item wikibase:apiOutputItem mwapi:title .
}
?item rdfs:label ?l.
SERVICE wikibase:label { bd:serviceParam wikibase:language "es" }
bind(lang(?l) as ?lang)
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?item"):::projected
v3("?l"):::projected
v4("?lang"):::projected
v1("?search_string")
c4(["www.wikidata.org"]):::literal
c13(["max"]):::literal
c10(["es"]):::literal
c15(["0"]):::literal
c8(["search"]):::literal
c2(["bd:serviceParam"]):::iri
c17(["mwapi:title"]):::iri
c6(["Generator"]):::literal
bind0[/"'inlabel:puente del Hacho'"/]
bind0 --as--o v1
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c2 --"mwapi:endpoint"--> c4
c2 --"mwapi:api"--> c6
c2 --"mwapi:generator"--> c8
c2 --"mwapi:language"--> c10
c2 --"mwapi:gsrsearch"--> v1
c2 --"mwapi:gsrlimit"--> c13
c2 --"mwapi:gsrnamespace"--> c15
v2 --"mwapi:apiOutputItem"--> c17
end
v2 --"rdfs:label"--> v3
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c2 --"mwapi:language"--> c10
end
bind1[/"?l"/]
v3 --o bind1
bind1 --as--o v4