Help:Linksearch/Toolforge
toolforge:Linksearch is similar to Special:LinkSearch in that it performs a search for URLs contained in pages, but additionally allows filtering by namespace, and additional placeholders may be used. Unlike the special page, the total number of hits (URL, not hit pages) is also specified.
Syntax for the URL to be searched for
[edit]Placeholder
%
and_
can be used as placeholders.%
stands for any number of characters (including zero)._
stands for exactly one character.
- If the URL is not complete at the end, it must be terminated with a percent sign (unlike on the special page!).
- Examples:
https://%.wikipedia.org/wiki/%
https://www.wiki_edia.org/
- If the characters are to be
%
or_
part of the URL, they must be escaped with\
. - Example:
https://en.wikipedia.org/w/index.php?title=95\%\_CI
Protocol:
- In contrast to the special page, the protocol always needs be specified.
- Please note, however, that there are also protocol-relative URLs (starting with
//
) for which the protocol specification is missing.
URL and URL parameters
[edit]The parameters as used in the URL are listed below.
- The base URL is
https://linksearch.toolforge.org/
- The parameter list must be appended to this with a preceding question mark
?
. - Assignments name
=
value follow. - The value must not contain any spaces; certain characters may have to be URL encoded.
- The individual assignments name
=
value must be separated by&
.
- target
- Search pattern for the URL
- namespace
- Number of the namespace to which the hits are to be restricted.
- Not specified: All namespaces
- associated
1
– browse namespaces for both content page and associated discussion page0
(default) – only analyze directly specifiednamespace=
, otherwise analyze all namespaces- limit
- Maximum number of hits per result page
- Not specified:
100
- offset
- Sequential number of the hit from which the results page is to be displayed.
- Not specified:
0
(from the first) - lang
- Language of the user interface, e.g.
en
- wiki
- WMF project of interest, e.g.
en.wikipedia
- submit
1
– submit the query0
(default) – show the form without executing the query with specified parameters
An interactive form is displayed.
- The hit list then follows in the sequence of the URL found.
Up-to-dateness
[edit]Under normal circumstances, the URL changes in articles are also visible in toolforge:Linksearch within seconds. Sometimes, however, the underlying database s5 is updated with a delay. With this link you can check if the database is up to date: Replag reported by heartbeat_p: if a delay of 0 is specified for s5, then the database, and thus also the result of toolforge:Linksearch is up to date. A delay at s5 has a negative effect on a variety of tools. If the delay lasts for hours and there is a strong upward tendency (increase of 55 seconds within one minute), opening a ticket on Phabricator may be useful.