API:Alllinks

From MediaWiki.org
Jump to: navigation, search
Tools clipart.png This page is part of the MediaWiki action API documentation.
MediaWiki APIsAPI:Main page

MediaWiki action API

v · d · e

Returns a list of (unique) links to pages in a given namespace starting ordered by link title.

Parameters[edit | edit source]

  • alcontinue: Used to continue a previous request
  • alfrom: Start listing at this title. The title need not exist.
  • alprefix: Only list links to titles that begin with this value
  • alnamespace: The namespace to enumerate. You can only enumerate one namespace at a time. By default, the main namespace will be enumerated.
  • alunique: If set, multiple links to the same title will be listed only once. It cannot be used with alprop=ids. When used as a generator, yields target pages instead of source pages. Before MW 1.21 (gerrit:40559) it couldn't be used in generator mode.
  • allimit: Maximum amount of links to list. (Default: 10)
  • alprop: Which properties to return. (Default: title)
    • ids: Page IDs of the linking pages. Cannot be used together with alunique.
    • title: Link titles

Example[edit | edit source]

List all links to talk pages whose name starts with Talk:API

Error Codes[edit | edit source]

Code Info
alparams alllinks cannot be used as a generator in unique links mode
alparams alllinks cannot return corresponding page ids in unique links mode
Note: This happens when you use alunique and alprop=ids together
alparams alcontinue and alfrom cannot be used together