NAME
wdq - command line access to Wikidata Query Service
USAGE
Access Wikidata Query Service via command line. A SPARQL query is read from STDIN or option query
. Default namespaces are added automatically. If a query starts with {
a SELECT
clause is added.
EXAMPLES
# get all parts of the solar system
wdq -q '{ ?c wdt:P361 wd:Q544 }'
OPTIONS
- --query|-q
-
File with query (
-
for STDIN as default). If query begins with{
it is used as WHERE clause of a SPARQL query. PREFIX definitions are included automatically. - --format
-
Output format (
json
as default). Supportsjson
,xml
, andtsv
. - --no-default-prefixes
-
Don't add default namespace prefixes to the SPARQL query
- --api
-
SPARQL endpoint. Default value:
https://query.wikidata.org/bigdata/namespace/wdq/sparql
- --no-execute|-n
-
Don't execute query but show it in expanded form. Useful to validate and pretty-print queries.
- --help|-h|-?
-
Show usage help
- --version
-
Show version if this script
COPYRIGHT AND LICENSE
Copyright by Jakob Voß voss@gbv.de
Based on a PHP script by Marius Hoch hoo@online.de
at https://github.com/mariushoch/asparagus.
Licensed under GPL 2.0+
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 235:
Non-ASCII character seen before =encoding in 'Voß'. Assuming UTF-8