For AI agents: the complete documentation index is available at https://types-mediawiki-response.pages.dev/zh/llms.txt, the full documentation bundle is available at https://types-mediawiki-response.pages.dev/zh/llms-full.txt, and this page is available as Markdown at https://types-mediawiki-response.pages.dev/zh/api/core/ApiParse.md.
  • 中文
  • Interface: ApiParse

    Defined in: core/parse.ts:221

    The parse object of a successful action=parse response. title and pageid are written before any prop value is considered; with onlypst=1 the module returns a different, metadata-free shape instead — see ApiParseOnlyPstResponse.

    Properties

    categories?

    optional categories?: ApiParseCategory[]

    Defined in: core/parse.ts:265

    Categories the page would be added to. prop=categories.


    categorieshtml?

    optional categorieshtml?: string

    Defined in: core/parse.ts:289

    HTML for the categories, keyed like categories. prop=categorieshtml.


    displaytitle?

    optional displaytitle?: string

    Defined in: core/parse.ts:262

    HTML for the display title. prop=displaytitle.


    encodedjsconfigvars?

    optional encodedjsconfigvars?: string

    Defined in: core/parse.ts:333

    jsconfigvars as a JSON string, ready to inline. prop=encodedjsconfigvars.


    optional externallinks?: string[]

    Defined in: core/parse.ts:277

    External URLs linked by the content. prop=externallinks.


    headhtml?

    optional headhtml?: string

    Defined in: core/parse.ts:377

    Full HTML document head. prop=headhtml.


    headitems?

    optional headitems?: ApiParseHeadItem[]

    Defined in: core/parse.ts:366

    Raw <head> elements, one {tag, content} entry each. prop=headitems.

    Deprecated

    since MediaWiki 1.28 — use headhtml to build a document, or modules + jsconfigvars to update one client-side.


    images?

    optional images?: string[]

    Defined in: core/parse.ts:274

    File names used by the content. prop=images.


    indicators?

    optional indicators?: Record<string, string>

    Defined in: core/parse.ts:295

    HTML page-indicator hooks. prop=indicators.


    optional iwlinks?: ApiParseIWLink[]

    Defined in: core/parse.ts:283

    Interwiki links. prop=iwlinks.


    jsconfigvars?

    optional jsconfigvars?: Record<string, unknown>

    Defined in: core/parse.ts:328

    window.mw.config values needed by modules, keyed by variable name. prop=jsconfigvars.


    optional langlinks?: ApiParseLangLink[]

    Defined in: core/parse.ts:280

    Interlanguage links. prop=langlinks.


    limitreportdata?

    optional limitreportdata?: ApiParseLimitReportEntry[]

    Defined in: core/parse.ts:352

    Parser profiling rows. prop=limitreportdata — emitted regardless of disablelimitreport (that only strips the table from the rendered text).


    limitreporthtml?

    optional limitreporthtml?: string

    Defined in: core/parse.ts:358

    Parser profiling rendered as a preview HTML table. prop=limitreporthtml. Its numbers change on every request.


    optional links?: ApiParseLink[]

    Defined in: core/parse.ts:268

    Pages linked from the content. prop=links.


    modules?

    optional modules?: string[]

    Defined in: core/parse.ts:309

    ResourceLoader modules required by the output. prop=modules (also emits modulescripts and modulestyles); must be paired with jsconfigvars/encodedjsconfigvars or the API warns.


    modulescripts?

    optional modulescripts?: never[]

    Defined in: core/parse.ts:316

    The script-bearing subset of modules.

    Deprecated

    since MediaWiki 1.32 — always empty; read modules instead.


    modulestyles?

    optional modulestyles?: string[]

    Defined in: core/parse.ts:322

    The style-bearing subset of modules. prop=modules — a plain module-name list.


    pageid

    pageid: number

    Defined in: core/parse.ts:229

    Page id of the context title — the parsed page, or the title parameter (default API) when parsing text. 0 only when that title does not exist.


    parsedsummary?

    optional parsedsummary?: string

    Defined in: core/parse.ts:259

    Parsed edit summary (summary= given, or sectiontitle= with section=new).


    parsetree?

    optional parsetree?: string

    Defined in: core/parse.ts:374

    The preprocessor result as an XML tree. prop=parsetree; requires a wikitext content model (otherwise the call fails with the notwikitext error code). Not flagged deprecated by 1.43, unlike the generatexml parameter that also produces it.


    parsewarnings?

    optional parsewarnings?: string[]

    Defined in: core/parse.ts:298

    Parser warnings for the input. prop=parsewarnings.


    parsewarningshtml?

    optional parsewarningshtml?: string[]

    Defined in: core/parse.ts:346

    HTML list of parser warnings. prop=parsewarningshtml.


    properties?

    optional properties?: Record<string, unknown>

    Defined in: core/parse.ts:304

    Extension-registered display properties (values are numbers, strings, or arrays). prop=properties; the set is open-ended.


    psttext?

    optional psttext?: string

    Defined in: core/parse.ts:256

    Pre-save-transformed wikitext (prop=wikitext + pst=1).


    redirects?

    optional redirects?: ApiParseRedirect[]

    Defined in: core/parse.ts:244

    Redirect resolutions (with redirects=1).


    revid?

    optional revid?: number

    Defined in: core/parse.ts:241

    Revision id the content was parsed from. Emitted whenever oldid was given, or when parsing a page with prop=revid.


    sections?

    optional sections?: ApiParseSection[]

    Defined in: core/parse.ts:286

    Section outline. prop=sections.


    showtoc?

    optional showtoc?: boolean

    Defined in: core/parse.ts:343

    Whether the output should show a TOC. prop=tocdata or prop=sections; a real boolean.


    subtitle?

    optional subtitle?: string

    Defined in: core/parse.ts:292

    Page subtitle. prop=subtitle.


    templates?

    optional templates?: ApiParseLink[]

    Defined in: core/parse.ts:271

    Pages transcluded by the content. prop=templates.


    text?

    optional text?: string

    Defined in: core/parse.ts:250

    Rendered HTML output (formatversion=2: a plain string). prop=text. With onlypst=1, the pre-save-transformed wikitext instead.


    textdeleted?

    optional textdeleted?: true

    Defined in: core/parse.ts:232

    The revision's text was deleted. A Flag.


    textsuppressed?

    optional textsuppressed?: true

    Defined in: core/parse.ts:235

    The revision's text was suppressed. A Flag.


    title

    title: string

    Defined in: core/parse.ts:223

    Page title the content was parsed as.


    tocdata?

    optional tocdata?: ApiParseTocData

    Defined in: core/parse.ts:340

    Table of contents with camelCased entries. prop=tocdata.

    Since

    MediaWiki 1.43


    wikitext?

    optional wikitext?: string

    Defined in: core/parse.ts:253

    Source wikitext. prop=wikitext.