Hi,

There is an option to do that - in fact, each library simply wraps around the existing REST endpoint ( based on https://query.wikidata.org/sparql ). If you look at the available Code tabs, after you execute the query, you can select "URL" tab. This will give you an endpoint that will return json with the response. Usage is quite simple - SPARQL query is a "query" param in a GET request to "https://query.wikidata.org/sparql" endpoint.

Hope that helps!

Regards,
Zbyszko

On Wed, Jan 27, 2021 at 3:50 PM Yaron Koren <yaron57@gmail.com> wrote:
Hi,

After you run a SPARQL query in the Wikidata Query Service (https://query.wikidata.org), the interface provides a lot of options - you can download the results in formats like CSV and JSON, and it even provides code to let you run that query directly in a variety of different computer languages. What I don't know, though, is whether there is some URL that, when accessed, will directly retrieve the results, in some format like CSV or JSON. The idea is that some code - in any language - can get the results without needing any SPARQL-related libraries or special handling, by just going to the "CSV URL" (for instance) and retrieving the results. Does such a thing exist?

-Yaron

--
WikiWorks · MediaWiki Consulting · http://wikiworks.com
_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


--

Zbyszko Papierski (He/Him)

Senior Software Engineer

Wikimedia Foundation