From MediaWiki.org
Jump to: navigation, search
This page is part of the MediaWiki action API documentation.

MediaWiki action API

v · d · e

List all blocks, à la Special:Ipblocklist. 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)
    • 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 rangestart and rangeend in the answer, both for registered users. Same as user for standalone IPs.
    • 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
      • hidden: This block is hidden from Special:Ipblocklist. Only users with oversight permissions can see these blocks.


Listing the 3 most recent blocks

Error Codes[edit]


See also[edit]