MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/API
prop=extracts (ex)
- This module requires read rights.
- Source: TextExtracts
- License: GPL-2.0-or-later
Returns plain-text or limited HTML extracts of the given pages.
Parameters:
- exchars
How many characters to return. Actual text returned might be slightly longer.
- The value must be between 1 and 1,200.
- Type: integer
- exsentences
How many sentences to return.
- The value must be between 1 and 10.
- Type: integer
- exlimit
How many extracts to return. (Multiple extracts can only be returned if exintro is set to true.)
- No more than 20 (20 for bots) allowed.
- Type: integer or max
- Default: 20
- exintro
Return only content before the first section.
- Type: boolean (details)
- explaintext
Return extracts as plain text instead of limited HTML.
- Type: boolean (details)
- exsectionformat
How to format sections in plaintext mode:
- plain
- No formatting.
- wiki
- Wikitext-style formatting (== like this ==).
- raw
- This module's internal representation (section titles prefixed with <ASCII 1><ASCII 2><section level><ASCII 2><ASCII 1>).
- One of the following values: plain, wiki, raw
- Default: wiki
- excontinue
When more results are available, use this to continue.
- Type: integer
Example:
- Get a 175-character extract
- api.php?action=query&prop=extracts&exchars=175&titles=Therion [open in sandbox]
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
IP: 3.133.123.140
Start request GET /mediawiki/api.php?action=help&modules=query%2Bextracts
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
USER-AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HOST: zero-k.info
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*
CONNECTION: close[localisation] LocalisationCache: using store LCStoreDB
[session] SessionManager using store SqlBagOStuff
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "3.133.123.140",
"UserAgent": "Mozilla\/5.0 AppleWebKit\/537.36 (KHTML, like Gecko; compatible; ClaudeBot\/1.0; +claudebot@anthropic.com)",
"ChronologyProtection": false,
"ChronologyPositionIndex": 0,
"ChronologyClientId": false
}[DBConnection] Wikimedia\Rdbms\LoadBalancer::lazyLoadReplicationPositions: executed chronology callback.
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[session] SessionBackend "c1ielcomvossbsj3pa5tb7htu58hn4h5" is unsaved, marking dirty in constructor
[session] SessionBackend "c1ielcomvossbsj3pa5tb7htu58hn4h5" save: dataDirty=1 metaDirty=1 forcePersist=0
[cookie] already deleted setcookie: "wikidb229_mw__session", "", "1715249207", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_UserID", "", "1715249207", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_Token", "", "1715249207", "/", "", "", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1715249207", "/", "", "", "1"
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
[MessageCache] MessageCache using store SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.
[ContentHandler] Created handler for wikitext: WikitextContentHandler
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
ParserFactory: using preprocessor: Preprocessor_Hash
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct