Template:Wd/doc

This is intended to fetch data from Wikidata with or without a link to the connected Wikipedia article and with many other features.

Commands
The commands (, , ...) determine what kind of values are returned. One call can only contain commands from a single class.

Claim class
The claim class commands can be combined, meaning that multiple commands of different types from this class can be given at one time.

Combine multiple commands into one call to this, instead of making multiple calls to this with one command each, to be sure that all the returned pieces of information belong to each other.

General class
The general class commands cannot be combined.

Flags
The following (optional) flags are available which can be used to alter this 's behaviour. They must be given after the (first) command and before the other arguments. For convenience, empty flags (i.e. ) are allowed and will simply be ignored.

Command flags
These flags (, , ...) apply to the command that precedes them directly.

Configuration flags
These flags are general configuration flags and can be given anywhere after the first command (but before the other arguments).

Arguments
The arguments determine the sources from which all the returned values are fetched.

Positional arguments
The following table shows the available positional arguments in their fixed order. For each command, the applicable set of arguments is marked. If multiple commands are given, then the applicable set is the union of the individual sets. For instance, if the commands  and   have been given, then at least both the arguments   and   should be given as well.

More than one /  command can be given. The order in which these commands with their flags are given matches the order in which the respective  arguments are given.

Below follows a description of all positional arguments.

Named arguments
Below follows a description of all named arguments, which are name-value pairs (i.e. ). These are all optional and can be given anywhere.

Property aliases
Property aliases are other names for P-identifiers that can be used instead. The following property aliases (which are case-sensitive) are currently available:

Advanced usage
The layout of the output from (a combination of) commands that have both a singular and a plural form (e.g. / ) can be customized by using a number of named flags, which are name-value pairs (i.e.  ), that can be given anywhere. The table below shows the available named flags.

To insert a space at the beginning or end of a, use an underscore. To get a literal underscore, escape it by placing a backslash  directly in front of it (i.e.  ); the same holds for a literal backslash (i.e.  ). To get a literal vertical bar , use   or.