This module cannot be used as a Generator.
bkstart: The timestamp to start listing from
bkend: The timestamp to end listing at
bkdir: Direction to list in. (Default:
older: List newest blocks first. Note: bkstart has to be later than bkend.
newer: List oldest blocks first. Note: bkstart has to be before bkend.
bkids: Only list blocks with these IDs
bkusers: Only list blocks of these user names
bkip: List all blocks, including range blocks, that apply to this IP address. You can also specify a CIDR range here, in which case only blocks applying to the entire range will be listed. Cannot be used together with
bkusers. CIDR ranges broader than /16 are not allowed, as range blocks cannot cross /16 boundaries
bklimit: Maximum number of blocks to list (Default: 10)
bkprop: A pipe-separated list of properties to get. They appear as keys of returned dictionary. (Default: id|user|by|timestamp|expiry|reason|flags)
id: The ID of the block
user: The IP address or username that was blocked (does not appear in output for autoblocks)
userid: The id of user who was blocked (does not appear in output for autoblocks) 1.18+
by: The user who applied the block
byid: The id of user who applied the block
timestamp: When the block was applied
expiry: When the block will expire
reason: The reason for the block
range: If an IP range was blocked, the first and last IP the block applies to
- Will appear as
rangeendin the answer, both 0.0.0.0 for registered users. Same as
userfor standalone IPs.
- Will appear as
flags: Flags that apply to the block
- The appropriate flags will appear as keys of returned dictionary with an empty value. No key if the flag is not valid for the block.
automatic: Automatically blocked because of an autoblock (see also action=block)
anononly: Only anonymous edits are blocked
nocreate: Account creation is disabled
autoblock: Automatic blocking is enabled for this block
noemail: Sending e-mail through the wiki is disabled for the blocked user
allowusertalk: The user is allowed to edit his/her own talk page
- Special:Ipblocklist. Only users with oversight permissions can see these blocks. : This block is hidden from
Listing the 3 most recent blocks
<?xml version="1.0" encoding="utf-8"?> <api> <query> <blocks> <block id="4" user="126.96.36.199/16" userid="0" by="Catrope" byid="1" timestamp="2007-11-23T11:44:41Z" expiry="infinity" reason="Bad proxies; these folks will just have to register" rangestart="188.8.131.52" rangeend="184.108.40.206" anononly="" /> <block id="2" user="220.127.116.11" userid="0" by="Catrope" byid="1" timestamp="2007-11-23T11:37:28Z" expiry="infinity" reason="Intimidating behaviour/harassment" rangestart="18.104.22.168" rangeend="22.214.171.124" anononly="" nocreate="" /> <block id="1" user="Vandal01" userid="3" by="Catrope" byid="1" timestamp="2007-11-23T11:36:40Z" expiry="2007-12-23T11:36:40Z" reason="Spamming links to external sites" rangestart="0.0.0.0" rangeend="0.0.0.0" nocreate="" autoblock="" noemail="" /> </blocks> </query> </api>