-
-
Notifications
You must be signed in to change notification settings - Fork 92
API end‐points
benoit74 edited this page Oct 3, 2025
·
7 revisions
MWOffliner needs to have access to the module API (/w/load.php
by default, controlled with --mwModulePath
) and action API (/w/api.php
by default, controlled with --mwActionApiPath
).
Since 1.16, ActionParse is the default renderer and it uses only these two APIs. Other renderers one additional API.
MWoffliner supports the following renderers to retrieve HTML:
-
Wikimedia only:
-
WikimediaDesktop
- Description: Uses standard Wikimedia API to retrieve article HTML
- Screen: Desktop
- URL: for example https://en.wikipedia.org/api/rest_v1/page/html/Foobar
- Availability: Wikimedia instances only
- CLI parameter: none
-
WikimediaMobile
- Description: Wikimedia API to retrieve article HTML for Wikipedia mobile apps
- Screen: Mobile
- URL: for example https://en.wikipedia.org/api/rest_v1/page/mobile-html/Foobar
- Availability: Wikimedia instances only
- CLI parameter: none
-
-
MediaWiki:
-
VisualEditor
- Description: Mediawiki API to provide HTML for the Visual Editor (extension)
- Screen: Desktop
- URL: for example https://en.wikipedia.org/w/api.php?action=visualeditor&mobileformat=html&format=json&paction=parse&formatversion=2&page=Foobar
- Availability: needs the VisualEditor extention installed
- CLI parameter: same
--mwActionApiPath
mentioned above
-
RestApi
- Description: REST API to retrieve HTML, providing HTML generated by PHP Parsoid
- Screen: Desktop
- URL: for example https://en.wikipedia.org/w/rest.php/v1/page/Foobar/html
- Availability: configurable by admin
- CLI parameter:
--mwRestApiPath
-
ActionParse
- Desription: Standard API to retrieve HTML, newly providing HTML generated by PHP Parsoid
- Screen: Depends on skin responsiveness,
- URL: for example https://en.wikipedia.org/w/api.php?action=parse&format=json&prop=text|modules|jsconfigvars|headhtml&parsoid=1&formatversion=2&page=Foobar
- Availability: always on support Mediawikis
- CLI parameter: same
--mwActionApiPath
mentioned above
-