Retrieved 2025-06-27.
![]() | This is the template sandbox page for Template:Retrieved (diff). See also the companion subpage for test cases. |
To quickly apply this template with today's date as access date, see Quickfill examples Problems with template use? See Errors and notifications. |
![]() | This template uses Lua: |
This template applies online-retrieval information ("Retrieved ...") as implemented by Citation Style 1 templates, mainly template {{cite web}}
. It may be used with citation and external-link templates that do not provide retrieval information, such as
and others; it may also complement shortened-footnote producing templates such as {{harvnb}}
and similar (see below). The template may accompany other allowable external links when such usage is appropriate; recommended exceptions are described in § Applicability. Although its use may assist verifiability, the template is not a tool for validating wikitext or discovering sources, and should not be considered an alternative to citations of online material.
Syntax, application and documentation use Citation Style 1 guidelines, with variations. Presentation and notification options are available. Documentation examples use the current date unless specified otherwise; if the date is not current the page.[a] "Link" refers to the retrieved material's online location and "source" to its online content.
A [[Brad Pitt]] statement.<ref>{{IMDb name|id=0000093|name=Brad Pitt}}. {{retrieved/sandbox |access-date=2025-06-27}}</ref>
===References===
{{reflist}}
Listed by relative importance |
Syntax: For basic use only the full date the material was retrieved is required, via parameter access-date or its alias accessdate (|access-date=<fulldate>
); it displays after the static text "Retrieved ".
Insert this template next to the prerequisite external-link providing template or when appropriate, after any other allowable external link; its output should follow the link as closely as possible, see Wikipedia:Text-source integrity.
All parameters are named; some parameters have short-form aliases and/or predefined option sets. All parameter and option names/aliases must be entered in lowercase.
Copy a blank version from the box above to use. Insert the "|" (pipe) character between each parameter. Delete unused parameters. Unrecognized or undefined parameters are normally ignored; defined parameters do not display without a value.
Date elements: The template presumes Gregorian calendar information; access dates must be in citation-compatible acceptable date formats. With one exception, dates require non-padded day and month numbers, see § Access date.
Presentation: Citation Style 1 presentation mode is the default; optionally Citation Style 2 mode may be used. Per Citation Style 1 usage, the static term "Retrieved" appears capitalized in default mode. Depending on the utilized parameters other presentation and formatting elements including static text, white space and additional punctuation may be displayed.
Errors and notices: Usage errors and requirement/constraint violations may suppress related template elements and may add the edited page to a maintenance category ( ). Depending on the type of parameter(s) involved, notifications may display by default or by user preference.
Do not use this template when either the link or the source is inaccessible or unfit for any reason. The template applies only to wikitext-supporting sources (free or restricted)[c] that are retrievable through working, legitimate external links. See Wikipedia:Link rot.
Additionally, the template should not be used when retrieval information is inapplicable, superfluous, or not recommended, such as in External links or Further reading sections, or with templates such as {{official website}}
.
In general do not use with stable or static external links e.g. links to online archives or repositories (however, it may be used when accessing online archive snapshots). See Wikipedia:External links.
The examples below autoinsert today's date[d] via the available "quickfill" options. For details, see § Access date. Consider adding parameter access-info when applicable.
All-numeric Year-Month-Day [info]
{{retrieved/sandbox |access-date=ymd}}
Day Month Year [info]
{{retrieved/sandbox |access-date=dmy}}
Month Day, Year [info]
{{retrieved/sandbox |access-date=mdy}}
Day AbbreviatedMonth Year [info]
{{retrieved/sandbox |access-date=sdmy}}
AbbreviatedMonth Day, Year [info]
{{retrieved/sandbox |access-date=smdy}}
The examples in this section use the all-numeric YMD format to insert access dates; by default they display access dates in the same format (i.e. as YYYY-MM-DD), except where stated as "autoformatted" and in the "All parameters" example (via parameter date-format/df).[e]
Basic usage [info]
{{retrieved/sandbox |access-date=2025-06-27}}
Basic usage with autoformatted access date display (dmy) [info]
{{retrieved/sandbox |access-date=2025-06-27 |date-format=dmy}}
Access information (registration) [info]
{{retrieved/sandbox |access-date=2025-06-27 |access-info=registration}}
Source information (version) [info]
{{retrieved/sandbox |access-date=2025-06-27 |source-info=Revised}}
Source format (image) [info]
{{retrieved/sandbox |access-date=2025-06-27 |source-format=[[JPEG]]}}
Online provider information [info]
{{retrieved/sandbox |access-date=2025-06-27 |via=[[OnlinePublisherName]]}}
Link note [info]
{{retrieved/sandbox |access-date=2025-06-27 |link-note=brief link note}}
No terminal punctuation [info]
{{retrieved/sandbox |access-date=2025-06-27 |postscript=none}}
Optional presentation mode (Citation Style 2) [info]
{{retrieved/sandbox |access-date=2025-06-27 |access-info=registration |source-info=revised |source-format=[[JPEG]] |via=[[OnlinePublisherName]] |link-note=brief link note |mode=cs2}}
All parameters (using short-form aliases)
{{retrieved/sandbox |accessdate=2025-06-27 |access-info=registration |np=y |source-info=(revised) |format=[[JPEG]] |df=dmy |via=[[OnlinePublisherName]] |note=brief link note |mode=cs2 |ps=; |msg=y}}
The parameter set consists of 11 native parameters; they apply retrieval and link information, source access and type information, presentation options and notification options. Parameters may be required, dependent, conditional, default (preset), or optional.
Dependent parameters and all parameter options are described under their prerequisites. Optional parameters are normally ignored when misspelled, when any prerequisite is absent or when inserted without a value. Predefined option sets disallow any other input for the related parameter unless specifically stated otherwise.
Included parameters must provide information specific to the retrieved version of the source or to the specific access link. Do not add an optional parameter if identical information is provided in the source's external-link template, full citation, or other reference data (the access date is required regardless of duplication). However, include parameter access-info wherever applicable, as it is relevant to reader decisions regarding retrieval.
Incorrect parameter usage may suppress display of related template elements, see parameter descriptions and § Errors and notifications.
Parameter options may have additional specific requirements, constraints and conditions.
|access-date=ymd
– displays as the all-numeric Year-Month-Day.|access-date=dmy
– displays as Day Month Year.|access-date=mdy
– displays as Month Day, Year.|access-date=sdmy
– displays as Day Month Year but with "short" (abbreviated) month name.|access-date=smdy
– displays as Month Day, Year but with "short" (abbreviated) month name.|access-info=registration
– free registration is required; displays a gray lock icon.|access-info=limited
– free access is limited e.g. based on number of views, or is time-limited, or is only partially free; displays the same gray lock icon as registration, but with different tooltip text.|access-info=subscription
– paid subscription is required (WP:PAYWALL); displays a red lock icon. When set, the edited page will be added to Category:Pages containing links to subscription-only content.|np=y
(any other input is silently ignored). Removes the default presentation mode punctuation autoinserted between the adjacent outputs of the prerequisite parameters, leaving a single space as their separator [example]. If parameter msg is used notifications will be displayed when in error.|date-format=
(or |df=
) options are identical to parameter access-date/accessdate "quickfill" options in name and function, see there for descriptions.[ ymd | dmy | mdy | sdmy | smdy ]
|mode=cs2
– set to switch to Citation Style 2 mode: the separator may include white space and/or a non-wrapping comma ( , ) or en dash ( – ), terminal punctuation is omitted, and the term "retrieved" is all-lowercase [example]|mode=cs1
– the default presentation mode; enter to explicitly state, or switch back to Citation Style 1 mode: the separator may include white space and/or a non-wrapping period ( . ) or en dash, terminal punctuation is a non-wrapping period, and the term "Retrieved" is capitalized.|postscript=none
(or |ps=none
) to remove terminal punctuation altogether [example].|msg=y
to check for and display error notifications about select optional parameters (this parameter included) and maintenance notifications for any parameter; notifications for unrecognized parameters (including misspellings) will also be displayed. Notifications display first, before other template output. Any and all such messaging will appear upon transclusion; handling of individual or per-parameter notifications is not supported. Incorrect input for msg will suppress all notifications except the notification for itself; mislabeling the parameter will additionally suppress its own notification. See § Errors and notifications.Short citations (WP:SFN) may include external links as in-source locations and be subject to the same retrieval-information guidelines applying to full citations.[g] This template may be used to complement select short-citation producing templates, e.g. {{harvnb}}
. See Template:Harvnb § Adding a URL for the page or location.
In the example below, the in-source location has more-retrictive access than the source in general. Note {{harvnb}}
output is followed by a non-breaking space (via {{nbsp}}
) to provide continuity and context to the output of {{retrieved}}
.[e]
A wikitext statement.<ref>{{harvnb|AuthorLast|2025|pp=[https://www.example.com 23–24]}}{{nbsp}}{{retrieved/sandbox |access-info=subscription |access-date=2025-06-27}}</ref>
===Notes===
{{reflist}}
===References===
{{refbegin}}
* {{cite journal |author-last=AuthorLast |date=June 2025 |title=ArticleTitle |journal=JournalName |issue=5 |pages=21–35 |url=https://example.com |url-access=limited |access-date=2025-06-27}}
{{refend}}
Notes
References
The template handles several types of error and maintenance conditions, including fatal errors, usage-related issues, constraint violations and unrecognized parameters. The conditions and/or their notifications may suppress display of related template elements; fatal errors stop template application and the notification message suppresses any other template output. Non-fatal notifications display before other output.
Notifications are generated by required parameter access-date/accessdate and by optional parameters access-info, date-format/df, mode, np and msg.
Error notifications generated by access date-related issues are always displayed, and the edited page is added to Category:Template Retrieved errors. If parameter access-date/accessdate is absent, mislabeled, or has no value the error is fatal.
Notifications about optional-parameter error conditions, all maintenance issues, and unrecognized parameters are not displayed by default; input error values and in some cases the error conditions are ignored. Parameter msg may be used to display these notifications; when msg itself is in error its message or condition suppresses all other notifications.
Notifications are delimited by exclamation marks ( ! ) and are grouped and numbered according to context; the numbering may not be strictly sequential. Error messages display mostly in red text, other notices in gray text.
No. | Type | Message | Link |
---|---|---|---|
F01 | [fatal error] | ! Parameter access-date/accessdate is missing, mislabeled, or has no value ! | [info] |
E11 | [usage error] | ! Access date is partial or incorrectly formatted ! | [info] |
E12 | [usage error] | ! Access date format is invalid ! | [info] |
E13 | [constraint] | ! Access date is invalid future value ! | [info] |
E14 | [constraint] | ! Access date is invalid past value ! | [info] |
E15 | [usage error] | ! Access date format is invalid – parameter date-format/df may be misapplied ! | [info] |
E21 | [usage error] | ! Access information option is invalid ! | [info] |
E31 | [usage error] | ! Date format option is invalid ! | [info] |
E41 | [usage error] | ! Presentation mode option is invalid ! | [info] |
E42 | [usage error] | ! Parameter np value is invalid ! | [info] |
E43 | [constraint] | ! Parameter np requires parameter source-info ! | [info] |
E44 | [constraint] | ! Parameter np requires parameter access-info ! | [info] |
E101 | [usage error] | ! Parameter msg value is invalid ! | [info] |
No. | Type | Message | Link |
---|---|---|---|
N01 | [usage] | ! Unrecognized parameter name <parameter name> ! | [info] |
N02 | [maintenance] | ! Date format is superfluous (autoinserted access date) ! | [info] |
TemplateData for Retrieved
This template adds online-retrieval information ("Retrieved ...") to external-link templates that do not provide such facility, and to other allowable external links; it follows Wikipedia citation-template guidelines, with variations. All date input must be in one of Wikipedia's citation-compatible date formats. When entered manually, predefined options must be in lowercase, without quote-marks. For details and examples see the template's documentation. Parameter list order reflects relative importance.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Access date | access-date accessdate | The full date the external link (a) was successfully accessed, and (b) targeted relevant wikitext-supporting content. To autoinsert today's date select a "quickfill" option from the dropdown list or type it in (lowercase, no quote-marks): 'ymd' for all-numeric Year-Month-Day; 'dmy' for Day Month Year; 'mdy' for Month Day, Year; 'sdmy' for Day Month Year with abbreviated month name; 'smdy' for Month Day, Year with abbreviated month name. Otherwise manually enter a full date, displays as entered; all-numeric date formats require zero-padded day and month numbers. 'Access date format' may be used to validate/autoformat manually entered dates
| String | required |
Access information | access-info | Recommended when the source has access restrictions. Select the relevant dropdown list option or type it in (lowercase); it displays first, as a related lock icon/tooltip combination
| Content | optional |
Access date format | date-format df | Access date autoformat options for manually entered dates; identical to 'Access date' quickfill options in name and function. Deselect this parameter when using autoinserted access dates; recommended for validation otherwise. Select a dropdown list option or type it in (lowercase)
| String | suggested |
Source information | source-info | Use only when additional citable information specific to the retrieved version is needed for clarity; displays after 'Access information' if it exists, or first if it doesn't | String | optional |
Source format | source-format format | Use only if the retrieved version is in different format than the original or has specific format requirements; may be wikilinked, displays in parentheses before "Retrieved" | String | optional |
Online provider | via | Name of the accessed version's provider if other than the original provider or publisher; may be wikilinked, displays after the access date | String | optional |
Link note | link-note note | When required for clarification, add a brief note specific to the accessed link, may be wikilinked; displays in parentheses after the access date (or 'Online provider' if it exists) | String | optional |
Presentation mode | mode | Presentation mode, applies static text, parameter separators and terminal punctuation. Preset to Citation Style 1 mode; enter (in lowercase, no quote-marks) or select from the dropdown list option 'cs2' for Citation Style 2, 'cs1' to switch back or explicitly state the default
| String | optional |
Terminal punctuation | postscript ps | Insert desired value to replace the presentation mode's default terminal punctuation, which is either a period (mode 'cs1') or nothing (mode 'cs2'); to remove terminal punctuation altogether enter 'none' (lowercase, no quote-marks) | String | optional |
Notification display | msg | Set to 'y' (lowercase, no quote-marks) to display notifications about select optional parameters, and all maintenance notices; may suppress display of related template elements; use to test template output before committing
| Boolean | optional |
Conditional punctuation | np | When applicable, set to 'y' (lowercase, no quote-marks) to suppress the autoinserted punctuation (but not the space) between 'Access information' and 'Source information'; both are prerequisites
| Boolean | optional |