API:Parse

Prefix: None Required Rights: None POST Only? No  This module parses wikitext and returns parser output

Parameters
Returns the same wikitext, after a PST has been applied. Ignored if page, pageid or oldid is used. Type: bool NOTE: Section tree is only generated if there are more than 4 sections, if the keyword is present, or sections is explicitly requested and the page contains headings/sub-headings (overrides   ).
 * disablepp – Disable the PP Report from the parser output. Type: bool
 * oldid – Parse the content of this revision. Overrides page and pageid. Type: string
 * onlypst – Do a pre-save transform (PST) on the input, but don't parse it
 * page – Parse the content of this page. Cannot be used together with text and title. Type: string
 * pageid – Parse the content of this page. Overrides page. Type: string
 * prop – Which pieces of information to get
 * text          - Gives the parsed text of the wikitext
 * langlinks     - Gives the langlinks the parsed wikitext
 * categories    - Gives the categories of the parsed wikitext
 * categorieshtml - Gives the html version of the categories
 * languageshtml - Gives the html version of the languagelinks
 * links         - Gives the internal links in the parsed wikitext
 * templates     - Gives the templates in the parsed wikitext
 * images        - Gives the images in the parsed wikitext
 * externallinks - Gives the external links in the parsed wikitext
 * sections      - Gives the sections in the parsed wikitext (TOC, table of contents)
 * revid         - Adds the revision id of the parsed page
 * displaytitle  - Adds the title of the parsed wikitext
 * headitems     - Gives items to put in the of the page
 * headhtml      - Gives parsed of the page
 * iwlinks       - Gives interwiki links in the parsed wikitext


 * Type: one of text, langlinks, languageshtml, categories</tt>, categorieshtml</tt>, links</tt>, templates</tt>, images</tt>, externallinks</tt>, sections</tt>, revid</tt>, displaytitle</tt>, headitems</tt>, headhtml</tt>, iwlinks</tt>


 * pst – Do a pre-save transform on the input before parsing it. Ignored if page, pageid or oldid is used. Type: bool
 * redirects – If the page parameter is set to a redirect, resolve it. Type: bool
 * section – Only retrieve the content of this section number. Type: string
 * sections – Retrieve the page's TOC (if any exists). Type: string
 * summary – Summary to parse. Type: string
 * text – Wikitext to parse. Type: string
 * title – Title of page the text belongs to.
 * uselang – Which language to parse the request in. Type: string

Errors Codes

 * missingrev – There is no revision ID oldid.
 * missingtitle – The page you specified doesn't exist.
 * nosuchpageid – There is no page with ID $1.
 * nosuchsection – There is no section sectionnumber in page.
 * params – The page parameter cannot be used together with the text and title parameters.
 * permissiondenied – You don't have permission to view deleted revisions.
 * readapidenied – You need read permission to use this module.