SPARQLExecute[url, query]
executes query on the SPARQL endpoint located at url.
SPARQLExecute
SPARQLExecute[url, query]
executes query on the SPARQL endpoint located at url.
Details and Options
- In SPARQLExecute[url,query], query can be a symbolic SPARQL query or update request or a string.
- Possible symbolic query forms include SPARQLSelect, SPARQLAsk and SPARQLConstruct.
Examples
Basic Examples (1)
Needs["GraphStore`"]Count the triples in Wikidata:
SPARQLExecute[
"https://query.wikidata.org/sparql",
SPARQLSelect[RDFTriple[SPARQLVariable["x"], SPARQLVariable["y"], SPARQLVariable["z"]]] /* SPARQLAggregate["count" -> SPARQLEvaluation["count"][]]
]The same query using a query string:
SPARQLExecute[
"https://query.wikidata.org/sparql",
"select (count(*) as ?count) where {?x ?y ?z}"
]Related Guides
Text
Wolfram Research (2019), SPARQLExecute, Wolfram Language function, https://reference.wolfram.com/language/GraphStore/ref/SPARQLExecute.html.
CMS
Wolfram Language. 2019. "SPARQLExecute." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/SPARQLExecute.html.
APA
Wolfram Language. (2019). SPARQLExecute. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GraphStore/ref/SPARQLExecute.html
BibTeX
@misc{reference.wolfram_2026_sparqlexecute, author="Wolfram Research", title="{SPARQLExecute}", year="2019", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLExecute.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_sparqlexecute, organization={Wolfram Research}, title={SPARQLExecute}, year={2019}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLExecute.html}, note=[Accessed: 13-June-2026]}