Template:Wikidata/doc/examples
![]() | Do not delete this page! It is regularly substituted at Template:Wikidata/doc to refresh the example results. |
Examples
Parameters and output types | Example | Description |
---|---|---|
Q55 = "", P395 = ""
[string] |
{{{{{prename|}}}wikidata/doc|property|Q55|P395|{{{extraparams|}}}}}
|
Gets a literal string value. |
P395 = ""
[string] |
{{{{{prename|}}}wikidata/doc|property|P395|{{{extraparams|}}}}}
|
If the template is transcluded on the page (which is linked to Q55), then the Q55 can be omitted.
|
Q55 = "", P395 = ""
[string] |
{{{{{prename|}}}wikidata/doc|property|eid=Q55|P395|{{{extraparams|}}}}}
|
An entity-ID can also be given using the eid= argument.
|
P395 = ""
[string] |
{{{{{prename|}}}wikidata/doc|property|page=|P395|{{{extraparams|}}}}}
|
A page title can be given instead of an entity-ID using the page= argument.
|
Q55 = "", P395 = ""
[string] |
{{{{{prename|}}}wikidata/doc|property|edit|Q55|P395|{{{extraparams|}}}}}
|
Adds a clickable icon that may be used to edit the returned value on Wikidata. |
Q55 = "", P395 = ""
[string] |
{{{{{prename|}}}wikidata/doc|property|edit@end|Q55|P395|{{{extraparams|}}}}}
|
Places the edit icon at the end of the line. |
Q55 = "", P1082 = ""
[quantity] |
{{{{{prename|}}}wikidata/doc|property|normal+|Q55|P1082|{{{extraparams|}}}}}
|
Gets a single property value from claims with a 'normal' rank or higher. |
Q55 = "", P1082 = ""
[quantity] |
{{{{{prename|}}}wikidata/doc|properties|normal+|Q55|P1082|{{{extraparams|}}}}}
|
Gets multiple property values from claims with a 'normal' rank or higher. |
Q55 = "", P1082 = "", P585 = ""
[quantity], [time] |
{{{{{prename|}}}wikidata/doc|properties|qualifier|normal+|Q55|P1082|P585|{{{extraparams|}}}}}
|
Gets a single qualifier value for each claim, additional to the property value. |
Q55 = "", P1082 = "", P585 = ""
[quantity], [time], [reference] |
{{{{{prename|}}}wikidata/doc|properties|qualifier|references|normal+|Q55|P1082|P585|{{{extraparams|}}}}}
|
Gets references for each claim. |
Q55 = "", P1082 = ""
[quantity], [reference] |
A total of
|
Gets a property with its references. |
Q55 = "", P1082 = ""
[quantity], [reference] |
The Netherlands has a population of
|
Adds a punctuation mark at the end of the output, in front of the references. |
Q55 = "", P1082 = "", P585 = ""
[quantity], [time], [reference] |
<ul>
|
Returns the output in a custom format. |
Q55 = "", P1082 = "", P585 = ""
[time] |
{{{{{prename|}}}wikidata/doc|qualifier|normal+|Q55|P1082|P585|{{{extraparams|}}}}}
|
Gets a single qualifier per claim, by default for multiple matching claims. |
Q55 = "", P1082 = "", P585 = ""
[time] |
{{{{{prename|}}}wikidata/doc|qualifier|normal+|single|Q55|P1082|P585|{{{extraparams|}}}}}
|
To get a single qualifier for only a single claim, give the single flag too so that only a single claim will be accessed.
|
Q55 = "", P1082 = "", P585 = ""
[time] |
{{{{{prename|}}}wikidata/doc|qualifier|Q55|P1082|'|P585|{{{extraparams|}}}}}
|
Gets a qualifier from claims for which the (raw) property value matches a given literal value. |
Q55 = "", P1082 = "", P585 = ""
[time] |
{{{{{prename|}}}wikidata/doc|qualifier|mdy|Q55|P1082|P585|{{{extraparams|}}}}}
|
Gets dates in month-day-year order. |
Q55 = "", P1082 = "", P585 = ""
[time] |
{{{{{prename|}}}wikidata/doc|qualifier|raw|Q55|P1082|P585|{{{extraparams|}}}}}
|
Gets a raw date value. |
Q55 = "", P1082 = ""
[reference] |
{{{{{prename|}}}wikidata/doc|'references|Q55|P1082|'|{{{extraparams|}}}}}
|
Gets the references from a particular claim. |
Q55 = "", P1082 = ""
[reference] |
{{{{{prename|}}}wikidata/doc|'references|raw|Q55|P1082|'|{{{extraparams|}}}}}
|
Gets references from a particular claim in their raw form. |
Q55 = "", P1081 = ""
[quantity], [reference] |
{{{{{prename|}}}wikidata/doc|properties|references|normal+|Q55|P1081|{{{extraparams|}}}}}
|
Gets properties from each claim with any references they have. |
Q55 = "", P1081 = ""
[quantity], [reference] |
{{{{{prename|}}}wikidata/doc|properties|references|normal+|sourced|Q55|P1081|{{{extraparams|}}}}}
|
Only gets properties from claims that have at least one reference. |
Q55 = "", P2855 = "", P518 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|qualifier|Q55|P2855|P518|{{{extraparams|}}}}}
|
Gets a single qualifier value (for each matching claim). |
Q55 = "", P2855 = "", P518 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|qualifiers|Q55|P2855|P518|{{{extraparams|}}}}}
|
Gets multiple qualifier values (for each matching claim). |
Q55 = "", P2855 = "", P518 = ""
[quantity], [entity label] |
{{{{{prename|}}}wikidata/doc|properties|qualifiers|Q55|P2855|P518|{{{extraparams|}}}}}
|
Gets multiple property values along with multiple qualifier values. |
Q55 = "", P2855 = "", P518 = ""
[quantity], [entity label] |
{{{{{prename|}}}wikidata/doc|properties|qualifiers|Q55|P2855|P518|sep=_+_|sep%s=|sep%q=_/_|{{{extraparams|}}}}}
|
Returns the output with custom separators. |
Q55 = "", P35 = "", P580 = "", P582 = ""
[entity label], [time] |
{{{{{prename|}}}wikidata/doc|properties|qualifier|qualifier|normal+|Q55|P35|P580|P582|{{{extraparams|}}}}}
|
Gets two different qualifier values for each claim. |
Q55 = "", P35 = "", P580 = "", P582 = ""
[entity label], [time] |
{{{{{prename|}}}wikidata/doc|properties|qualifier|qualifier|normal+|Q55|P35|P580|P582|sep%q=_–_|{{{extraparams|}}}}}
|
Returns the output with a custom separator. |
Q55 = "", P35 = "", P580 = "", P582 = ""
[entity label], [time] |
{{{{{prename|}}}wikidata/doc|properties|qualifier|qualifier|normal+|Q55|P35|P580|P582|format=%p[ <span style="font-size:85\%">(%q1[ – %q2])</span>][%s][%r]|{{{extraparams|}}}}}
|
Returns the output in a custom format instead of with a custom separator. |
Q55 = "", P35 = "", P580 = "", P582 = ""
[entity label], [time] |
{{{{{prename|}}}wikidata/doc|properties|qualifier|qualifier|normal+|Q55|P35|P580|P582|format=%p[ <span style="font-size:85\%">([<![]--%q2]since [%q2--[]>]%q1[ – %q2])</span>][%s][%r]|{{{extraparams|}}}}}
|
To add text only when a certain value is not present, like adding the word since if there is no end time, wrap it in between two optional blocks containing HTML comment tags and the relevant parameter (this also prevents the text from being added to the page source). |
Q55 = "", P35 = "", Q29574 = "", P580 = "", P582 = ""
[entity label], [time] |
{{{{{prename|}}}wikidata/doc|properties|qualifier|raw|qualifier|normal+|Q55|P35|Q29574|P580|P582|format=%p[ <span style="font-size:85\%">(%q1[ – %q2])</span>][%s][%r]|{{{extraparams|}}}}}
|
Gets a property with qualifiers from claims for which the property matches a given Q-identifier, with one of the qualifier values in its raw form. |
Q55 = "", P38 = "", P518 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|properties|qualifiers|normal+|current|Q55|P38|P518|{{{extraparams|}}}}}
|
Gets claims that are currently valid. |
Q55 = "", P38 = ", P518 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|properties|linked|qualifiers|normal+|current|Q55|P38|P518|{{{extraparams|}}}}}
|
Gets claims with linked property values. |
Q55 = "", P38 = ", P518 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|properties|qualifiers|linked|normal+|current|Q55|P38|P518|{{{extraparams|}}}}}
|
Gets claims with linked qualifier values. |
Q55 = "", P38 = ", P518 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|properties|linked|short|qualifiers|linked|normal+|current|Q55|P38|P518|{{{extraparams|}}}}}
|
Gets claims with linked property and qualifier values, with short property values wherever available. |
Q55 = "", P38 = ", Q4917 = "", P518 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|qualifiers|normal+|current|Q55|P38|Q4917|P518|{{{extraparams|}}}}}
|
Gets qualifiers from claims for which the (raw) property value matches a given Q-identifier. |
Q55 = "", P38 = ", P518 = "", Q27561 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|properties|normal+|current|Q55|P38|P518=Q27561|{{{extraparams|}}}}}
|
Gets properties from claims for which a (raw) qualifier value matches a given Q-identifier. |
Q55 = "", P38 = "
[entity label] |
{{{{{prename|}}}wikidata/doc|properties|normal+|former|Q55|P38|{{{extraparams|}}}}}
|
Gets claims that were valid in the past. |
Q55 = "", P38 = "
[entity label] |
{{{{{prename|}}}wikidata/doc|properties|raw|normal+|former|Q55|P38|{{{extraparams|}}}}}
|
Gets raw property values. |
Q55 = "", P38 = "
[entity label] |
{{{{{prename|}}}wikidata/doc|properties|raw|linked|normal+|former|Q55|P38|{{{extraparams|}}}}}
|
Gets raw property values that are linked to Wikidata. |
Q55 = "", P1549 = ""
[monolingual text] |
{{{{{prename|}}}wikidata/doc|property|Q55|P1549|{{{extraparams|}}}}}
|
Gets a monolingual text value in the current wiki's language. |
Q55 = "", P1549 = "", P407 = "", Q36846 = ""
[monolingual text] |
{{{{{prename|}}}wikidata/doc|property|multilanguage|Q55|P1549|P407=Q36846|{{{extraparams|}}}}}
|
Gets a monolingual text value in any available language. |
Q55 = "", P2884 = ""
[quantity] |
{{{{{prename|}}}wikidata/doc|property|Q55|P2884|{{{extraparams|}}}}}
|
Gets a quantity value with its associated unit of measurement. |
Q55 = "", P2884 = ""
[quantity] |
{{{{{prename|}}}wikidata/doc|property|linked|Q55|P2884|{{{extraparams|}}}}}
|
Gets a quantity value with a linked unit of measurement. |
Q55 = "", P2884 = ""
[quantity] |
{{{{{prename|}}}wikidata/doc|property|raw|Q55|P2884|{{{extraparams|}}}}}
|
Gets a raw quantity value. |
Q55 = "", P2884 = ""
[quantity] |
{{{{{prename|}}}wikidata/doc|property|unit|Q55|P2884|{{{extraparams|}}}}}
|
Gets only the unit of measurement. |
Q55 = "", P2884 = ""
[quantity] |
{{{{{prename|}}}wikidata/doc|property|unit|raw|Q55|P2884|{{{extraparams|}}}}}
|
Gets the raw unit of measurement. |
Q55 = "", P625 = ""
[globe coordinate] |
{{{{{prename|}}}wikidata/doc|property|Q55|P625|{{{extraparams|}}}}}
|
Gets a globe coordinate value. |
Q55 = "", P625 = ""
[globe coordinate] |
{{{{{prename|}}}wikidata/doc|property|linked|Q55|P625|{{{extraparams|}}}}}
|
Gets a linked globe coordinate value. |
Q55 = "", P625 = ""
[globe coordinate] |
{{{{{prename|}}}wikidata/doc|property|raw|Q55|P625|{{{extraparams|}}}}}
|
Gets a raw globe coordinate value. |
Q55 = "", P625 = ""
[globe coordinate] |
{{{{{prename|}}}wikidata/doc|property|Q55|coord|{{{extraparams|}}}}}
|
A property alias can be used instead of the P-identifier. |
Q55 = "", P41 = ""
[commons media] |
{{{{{prename|}}}wikidata/doc|property|linked|Q55|P41|{{{extraparams|}}}}}
|
Gets a media file name and links to it on Commons. |
Q55 = "", P41 = ""
[commons media] |
{{{{{prename|}}}wikidata/doc|property|raw|Q55|P41|format=\[\[File:%p {{!}} thumb {{!}} left\]\]|{{{extraparams|}}}}}
|
A Commons media file can be included on the page as-is by omitting the linked and raw flags, but by using the raw flag it can be freely formatted.
|
Q55 = "", P41 = ""
[commons media] |
{{{{{prename|}}}wikidata/doc|property|raw|date=1700-05-06|Q55|P41|format=\[\[File:%p {{!}} thumb {{!}} left\]\]|{{{extraparams|}}}}}
|
To get the value of a property that was valid at a given time, the date= argument can be used.
|
Q55 = "", P41 = ""
[commons media] |
{{{{{prename|}}}wikidata/doc|property|raw|date=1700-05-06|former|Q55|P41|format=\[\[File:%p {{!}} thumb {{!}} left\]\]|{{{extraparams|}}}}}
|
The time constraint flags work relatively to the date value given for the date= argument.
|
Q915684 = "", P2534 = ""
[math] |
{{{{{prename|}}}wikidata/doc|property|Q915684|P2534|{{{extraparams|}}}}}
|
Gets a mathematical expression. |
Q915684 = "", P7235 = "", P9758 = ""
[entity label], [math] |
<ul>
|
Mathematical expressions can be combined with regular text as usual. |
Q6256 = "", P3896 = ""
[geographic shape] |
{{{{{prename|}}}wikidata/doc|property|linked|Q6256|P3896|{{{extraparams|}}}}}
|
Gets a geographic shape data file name and links to it on Commons. |
Q4917 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|label|Q4917|{{{extraparams|}}}}}
|
Gets an item's label. |
Q4917 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|label|short|linked|Q4917|{{{extraparams|}}}}}
|
Gets an item's short and linked label. |
P38 = "
[entity label] |
{{{{{prename|}}}wikidata/doc|label|P38|{{{extraparams|}}}}}
|
Gets a property's label. |
P38 = "
[entity label] |
{{{{{prename|}}}wikidata/doc|label|linked|P38|{{{extraparams|}}}}}
|
Gets a property's label that is linked to Wikidata. |
Q776 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|label|Q776|{{{extraparams|}}}}}
|
Gets an item's label. |
Q776 = ""
[entity label] |
{{{{{prename|}}}wikidata/doc|label|linked|Q776|{{{extraparams|}}}}}
|
Gets an item's linked label. |
[entity label] |
{{{{{prename|}}}wikidata/doc|label|{{{extraparams|}}}}}
|
If the template is transcluded on the page (which is linked to Q776), then the Q776 can be omitted.
|
[entity label] |
{{{{{prename|}}}wikidata/doc|label|raw|{{{extraparams|}}}}}
|
If just the label command with the raw flag is given, then the Q-identifier of the item connected to the current page is returned.
|
[entity label] |
{{{{{prename|}}}wikidata/doc|label|raw|linked|{{{extraparams|}}}}}
|
If additionally the linked flag is given, then the Q-identifier of the item connected to the current page is linked to Wikidata.
|
Q776 = ""
[page title] |
{{{{{prename|}}}wikidata/doc|title|Q776|{{{extraparams|}}}}}
|
Gets the title of the page on the current wiki that is linked to the given item. |
Q776 = ""
[page title] |
{{{{{prename|}}}wikidata/doc|title|linked|Q776|{{{extraparams|}}}}}
|
Gets the linked title of the page on the current wiki that is linked to the given item. |
[page title] |
{{{{{prename|}}}wikidata/doc|title|{{{extraparams|}}}}}
|
If the template is transcluded on the page (which is linked to Q776), then the Q776 can be omitted.
|
Q55 = ""
[entity description] |
{{{{{prename|}}}wikidata/doc|description|Q55|{{{extraparams|}}}}}
|
Gets an item's description. |
[entity description] |
{{{{{prename|}}}wikidata/doc|description|{{{extraparams|}}}}}
|
If the template is transcluded on the page (which is linked to Q55), then the Q55 can be omitted.
|
Q55 = ""
[entity alias] |
{{{{{prename|}}}wikidata/doc|alias|Q55|{{{extraparams|}}}}}
|
Gets one of an item's aliases. |
Q55 = ""
[entity alias] |
{{{{{prename|}}}wikidata/doc|aliases|Q55|{{{extraparams|}}}}}
|
Gets all of an item's aliases. |
Q55 = ""
[entity alias] |
{{{{{prename|}}}wikidata/doc|alias|linked|Q55|{{{extraparams|}}}}}
|
Gets a linked alias from an item. |
[entity alias] |
{{{{{prename|}}}wikidata/doc|alias|{{{extraparams|}}}}}
|
If the template is transcluded on the page (which is linked to Q55), then the Q55 can be omitted.
|
Q2 = ""
[page badge] |
{{{{{prename|}}}wikidata/doc|badges|Q2|{{{extraparams|}}}}}
|
Gets the badges for the page on the current wiki that is linked to the given item. |
Q2 = ""
[page badge] |
{{{{{prename|}}}wikidata/doc|badges|raw|Q2|{{{extraparams|}}}}}
|
Gets the raw badges for the page on the current wiki that is linked to the given item. |
[page badge] |
{{{{{prename|}}}wikidata/doc|badges|{{{extraparams|}}}}}
|
If the template is transcluded on the page (which is linked to Q2), then the Q2 can be omitted.
|
Q28865 = "", P548 = "", P348 = "",
[version], [reference] |
{{{{{prename|}}}wikidata/doc|property|reference|edit|Q28865|P548=Q2804309|P348|{{{extraparams|}}}}}
|
Get Python's latest stable release version with its references. You may want to use P548=Q2122918 to get the latest preview release version. |