MediaWiki API ヘルプ
このページは自動生成された MediaWiki API の説明文書ページです。
説明文書と例: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=parse
- このモジュールは読み取りの権限を必要とします。
- ソース: MediaWiki
- ライセンス: GPL-2.0-or-later
Parses content and returns parser output.
See the various prop-modules of action=query to get information from the current version of a page.
There are several ways to specify the text to parse:
- Specify a page or revision, using page, pageid, or oldid.
- Specify content explicitly, using text, title, revid, and contentmodel.
- Specify only a summary to parse. prop should be given an empty value.
- title
- 文字列が属するページのページ名。これを省略する場合、必ず contentmodel を指定しなければなりません。また、その場合 API がページ名として使用されます。 
- text
- 構文解析する文字列。コンテンツモデルを制御するためにはtitle または contentmodel を使用してください。 
- revid
- Revision ID, for - {{REVISIONID}}and similar variables.
- 型: 整数
- summary
- 構文解析する要約 
- page
- このページの内容を構文解析します。text および title とは同時に使用できません。 
- pageid
- このページの内容を構文解析する。page をオーバーライドします。 
- 型: 整数
- redirects
- もし page や pageid に転送ページが指定された場合、それを解決する。 
- 型: 真偽値 (詳細)
- oldid
- この版の内容を構文解析する。page および pageid をオーバーライドします。 
- 型: 整数
- prop
- どの情報を取得するか: - text
- ウィキテキストの解析されたテキストを提供します。
- langlinks
- 解析されたウィキテキストにおける言語リンクを提供します。
- categories
- 構文解析されたウィキテキストのカテゴリを提供します。
- categorieshtml
- カテゴリのHTMLバージョンを提供します。
- links
- 構文解析されたウィキテキスト内で内部リンクを提供します。
- templates
- 構文解析されたウィキテキストでテンプレートを提供します。
- images
- 構文解析されたウィキテキストの画像を提供します。
- externallinks
- 構文解析されたウィキテキスト内で外部リンクを提供します。
- sections
- 構文解析されたウィキテキスト内のセクションを提供します。
- revid
- 構文解析されたページの版IDを追加します。
- displaytitle
- 構文解析されたウィキテキストのタイトルを追加します。
- subtitle
- Adds the page subtitle for the parsed page.
- headhtml
- ページの<html>と<head>の要素を開いて<body>を開示し、Doctype を解析する。
- modules
- Gives the ResourceLoader modules used on the page. To load, use mw.loader.using(). Either jsconfigvars or encodedjsconfigvars must be requested jointly with modules.
- jsconfigvars
- ページに固有のJavaScriptの設定変数を提供します。適用するには、mw.config.set()を使用します。
- encodedjsconfigvars
- JSON文字列としてページに固有のJavaScriptの設定変数を提供します。
- indicators
- ページ上で使用されるページのステータスインジケータのHTMLを提供します。
- iwlinks
- 構文解析されたウィキテキスト内でウィキ間リンクを提供します。
- wikitext
- 構文解析されたオリジナルのウィキテキストを提供します。
- properties
- 構文解析されたウィキテキスト内で定義されたさまざまなプロパティを提供します。
- limitreportdata
- Gives the limit report in a structured way. Gives no data, when disablelimitreport is set.
- limitreporthtml
- Gives the HTML version of the limit report. Gives no data, when disablelimitreport is set.
- parsetree
- 版内容のXML構文解析ツリー (requires content model wikitext)
- parsewarnings
- Gives the warnings that occurred while parsing content (as wikitext).
- parsewarningshtml
- Gives the warnings that occurred while parsing content (as HTML).
- headitems
- 廃止予定です。 ページの <head>の中に入れてアイテムを提供します。
 
- 値 (| または別の文字列で区切る): categories、categorieshtml、displaytitle、encodedjsconfigvars、externallinks、headhtml、images、indicators、iwlinks、jsconfigvars、langlinks、limitreportdata、limitreporthtml、links、modules、parsetree、parsewarnings、parsewarningshtml、properties、revid、sections、subtitle、templates、text、wikitext、headitems
- 既定: text|langlinks|categories|links|templates|images|externallinks|sections|revid|displaytitle|iwlinks|properties|parsewarnings
- wrapoutputclass
- CSS class to use to wrap the parser output. 
- 既定: mw-parser-output
- pst
- それを構文解析する前に、入力の上で事前保存の変換を実行してください。テキストで使用した場合のみ有効です。 
- 型: 真偽値 (詳細)
- onlypst
- Do a pre-save transform (PST) on the input, but don't parse it. Returns the same wikitext, after a PST has been applied. Only valid when used with text. 
- 型: 真偽値 (詳細)
- effectivelanglinks
- 廃止予定です。
- エクステンションによって供給された言語リンクが含まれています (for use with prop=langlinks). 
- 型: 真偽値 (詳細)
- section
- その節の識別子の内容のみを構文解析します。 - new のとき、ページに新しい節を追加するかのように text とsectiontitle を解析します。 - new は text を指定したときのみ許可されます。 
- sectiontitle
- section が new のときの、新しい節の節名。 - ページ編集とは異なり、これは summary が省略または空のときにはフォールバックしません。 
- disablepp
- 廃止予定です。
- disablelimitreport を代わりに使用してください。 
- 型: 真偽値 (詳細)
- disablelimitreport
- 構文解析の出力で制限レポート (New PP limit report) を省略する。 
- 型: 真偽値 (詳細)
- disableeditsection
- 構文解析の出力で節リンクを省略する。 
- 型: 真偽値 (詳細)
- disablestylededuplication
- Do not deduplicate inline stylesheets in the parser output. 
- 型: 真偽値 (詳細)
- showstrategykeys
- Whether to include internal merge strategy information in jsconfigvars. 
- 型: 真偽値 (詳細)
- generatexml
- 廃止予定です。
- Generate XML parse tree (requires content model - wikitext; replaced by prop=parsetree).
- 型: 真偽値 (詳細)
- preview
- プレビューモードでのパース 
- 型: 真偽値 (詳細)
- sectionpreview
- Parse in section preview mode (enables preview mode too). 
- 型: 真偽値 (詳細)
- disabletoc
- Omit table of contents in output. 
- 型: 真偽値 (詳細)
- useskin
- Apply the selected skin to the parser output. May affect the following properties: text, langlinks, headitems, modules, jsconfigvars, indicators. 
- 値 (次の値のいずれか1つ): apioutput、fallback、minerva、vector、vector-2022
- contentformat
- Content serialization format used for the input text. Only valid when used with text. 
- 値 (次の値のいずれか1つ): application/json、application/octet-stream、application/unknown、application/x-binary、text/css、text/javascript、text/plain、text/unknown、text/x-wiki、unknown/unknown
- contentmodel
- Content model of the input text. If omitted, title must be specified, and default will be the model of the specified title. Only valid when used with text. 
- 値 (次の値のいずれか1つ): GadgetDefinition、Scribunto、css、javascript、json、text、unknown、wikitext
- ページを構文解析する。
- api.php?action=parse&page=Project:Sandbox [サンドボックスで開く]
- ウィキテキストを構文解析
- api.php?action=parse&text={{Project:Sandbox}}&contentmodel=wikitext [サンドボックスで開く]
- Parse wikitext, specifying the page title.
- api.php?action=parse&text={{PAGENAME}}&title=Test [サンドボックスで開く]
- 要約を構文解析します。
- api.php?action=parse&summary=Some+[[link]]&prop= [サンドボックスで開く]