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.)

Possible errors
None.

parse
Returns parsed wikitext. Extension:TextExtracts provides additional APIs.

Possible errors
is returned only for syntactically invalid page titles (eg. empty). Trying to fetching a missing page will return the rendered HTML of the "page missing" notice, not an error. However, you can check the  attribute of, which will always be   for missing pages.