If you look through the code examples the query service UI generates for
you, you can see that several of them (including the PHP one and the two
JavaScript ones) don’t use any special SPARQL libraries. You can also
see the “URL” option, which is just the URL you’re looking for. The
returned format depends on the Accept request header (or “format” query
parameter), so if you add a request header “Accept: text/csv”, you’ll
get CSV back.
Cheers,
Lucas
On 27.01.21 15:49, Yaron Koren wrote:
Hi,
After you run a SPARQL query in the Wikidata Query Service
(
https://query.wikidata.org <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
<http://wikiworks.com>
_______________________________________________
Wikidata mailing list
Wikidata(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata