Help:Page ID
For developer-oriented information, see Manual:Page ID .
The page ID, sometimes article ID (if the page represents an article), is a number that is unique within the scope of the wiki and identifies a wiki page.
General features
edit- A page ID is generally more stable, and often shorter, than a page title. Consequently, URLs based on page IDs may be more useful as persistent identifiers than canonical URLs based on page titles. See #How to access a page by page ID below.
- A page ID does not change when a page is moved.
- If a page is deleted, its historical page ID persists in the archive table. If the page is restored, it attempts to reclaim its old page ID. This was not yet the case in MediaWiki 1.27 and before.
- Special pages do not come with page IDs.
How to look up the page ID
edit- The page ID of any wiki page can be looked up in the "page information" link from the menu which is called Tools.
- The magic word
{{PAGEID}}
can be used to return the page ID of a page. For instance, it reveals that the page ID of the current page is: 1902463. - Some APIs, such as API:Query , let you fetch the page ID by providing a page title. For example, https://www.mediawiki.org/w/api.php?action=query&prop=info&titles=Manual:Page%20ID
How to access a page by page ID
edit- The special page Special:Redirect can be used to access pages via their page IDs. For example, Special:Redirect/page/1902463, redirects to the present page.
- index.php accepts the parameter
curid
to access pages via their page IDs. For example, /w/index.php?curid=1902463 will load the present page.
Services that use the page ID
editAPIs
editThere are many API features that either return the page ID or use it as an input. For example, for the present page, see https://www.mediawiki.org/w/api.php?action=query&prop=info&pageids=1902463.
What links here
editThe What links here feature orders links by namespace then page ID.