API:Parsing wikitext

These API modules allow calling the parser for preprocessing and rendering.

Retrieving just the raw source wikitext can be done through prop=revisions.

expandtemplates
Returns preprocessed wikitext (comments stripped, templates expanded, etc.)

Parameters

 * : Wikitext to preprocess
 * : Act like the wikitext is on this page (default: )
 * This only really matters when parsing links to self (like this) or links to subpages.

Possible errors
None.

parse
Returns parsed wikitext

Parameters

 * : Wikitext to parse
 * : Act like the wikitext is on this page (default: )
 * This only really matters when parsing links to self (like this) or links to subpages.
 * If you are interested in simple getting the rendered content of a page, you can bypass the api and simple add  to your url, like so:  . More info on parameters to index.php.
 * : Parse the content of this page. Cannot be used together with  or
 * : Which properties to get (all by default)
 * : The generated HTML
 * : A list of language links in the wikitext fragment
 * : A list of category links in the wikitext fragment
 * : A list of internal links in the wikitext fragment
 * : A list of templates used in the wikitext fragment
 * : A list of images used in the wikitext fragment
 * : A list of external links used in the wikitext fragment
 * : A list of sections present in the wikitext fragment
 * : If  was used, specify the ID of the revision parsed
 * : Do a pre-save-transform (makes work properly)

Possible errors

 * code: params
 * info: The page parameter cannot be used together with the text and title parameters
 * code: missingtitle
 * info: The page you specified doesn't exist