query-2118f6bbed79fc8d2a440c9a475bb8de
Case-insensitive search for scientific articles by DOI number SELECT ?item ?itemLabel ?doival (xsd:dateTime(?timestamp) AS ?displayDate) WHERE { VALUES ?doival { "10.1002/14651858.CD015017.PUB2" "10.1002/14651858.CD013600.pub4" } BIND(CONCAT("haswbstatement:P356=", ?doival) AS ?searchstr) SERVICE wikibase:mwapi { bd:serviceParam wikibase:api "Search"; wikibase:endpoint "www.wikidata.org"; wikibase:limit "once"; mwapi:srsearch ?searchstr; mwapi:srprop "size|wordcount|timestamp". ?item wikibase:apiOutputItem mwapi:title . ?timestamp wikibase:apiOutput "@timestamp" . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Case-insensitive search for scientific articles by DOI number
SELECT ?item ?itemLabel ?doival (xsd:dateTime(?timestamp) AS ?displayDate)
WHERE
{
VALUES ?doival {
"10.1002/14651858.CD015017.PUB2"
"10.1002/14651858.CD013600.pub4"
}
BIND(CONCAT("haswbstatement:P356=", ?doival) AS ?searchstr)
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Search";
wikibase:endpoint "www.wikidata.org";
wikibase:limit "once";
mwapi:srsearch ?searchstr;
mwapi:srprop "size|wordcount|timestamp".
?item wikibase:apiOutputItem mwapi:title .
?timestamp wikibase:apiOutput "@timestamp" .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?displayDate")
v1("?doival"):::projected
v3("?item"):::projected
v2("?searchstr")
v4("?timestamp"):::projected
c6(["www.wikidata.org"]):::literal
c11(["size|wordcount|timestamp"]):::literal
c2(["bd:serviceParam"]):::iri
c15(["@timestamp"]):::literal
c8(["once"]):::literal
c4(["Search"]):::literal
c18(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c13(["mwapi:title"]):::iri
bind0[/VALUES ?doival/]
bind0-->v1
bind00(["10.1002/14651858.CD015017.PUB2"])
bind00 --> bind0
bind01(["10.1002/14651858.CD013600.pub4"])
bind01 --> bind0
bind1[/"concat('haswbstatement:P356=',?doival)"/]
v1 --o bind1
bind1 --as--o v2
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c2 --"mwapi:api"--> c4
c2 --"mwapi:endpoint"--> c6
c2 --"mwapi:limit"--> c8
c2 --"mwapi:srsearch"--> v2
c2 --"mwapi:srprop"--> c11
v3 --"mwapi:apiOutputItem"--> c13
v4 --"mwapi:apiOutput"--> c15
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c2 --"mwapi:language"--> c18
end
bind2[/"http://www.w3.org/2001/XMLSchema#dateTime(?timestamp)"/]
v4 --o bind2
bind2 --as--o v5