XTools/API

The XTools features a rich API for much of the data available through the web interface. Out of courtesy we ask you make requests synchronously – as in one full round trip – before making a new request. Please leave an informative user agent in your request so we can contact you if we need to.

Response format
All endpoints will return the requested parameters (such as,  , etc.), the requested data, followed by the   of how long the request took to process in seconds.

Check the examples in the documentation for the exact format of each endpoint. All data is returned as JSON, in addition to other formats as noted.

This API is not versioned. Make note of warnings in the response that will announce deprecations and future changes.

Errors and warnings
Error messages will be given  key. Flash messages may also be shown with the keys,   or. Keep an eye out for  in particular, which will announce deprecations.

To ensure performance and stability, most endpoints related to users will return an error if the user has made an exceptionally high number of edits.

OpenAPI Specification
Version 3.18.0 will introduce the first OpenAPI Specification of the XTools API. For the sake of consistency, many of the endpoints will have new standardized responses, and a few endpoints will be renamed or removed. XTools 3.18.0 is expected to be released on or soon after July 5, 2023. If there are any concerns with these changes or the target release date, please report them at Talk:XTools or by emailing tools.xtools[at]toolforge.org.

Here is a summary of the breaking changes:

Common to all APIs


 * All  properties are now named.
 * All  properties are now named , and this returns a boolean, not an integer.
 * All  properties are now named.

Project API


 * The  and   endpoints will be removed. Use ,   and   instead.
 * The  endpoint results are now nested under the   property.

Page API


 * The  endpoint is removed. Use   instead.
 * The  endpoint results are now nested under the   property.

User API


 * The  endpoint will be removed. Use   instead.
 * The  endpoint now always groups results by namespace, even if a specific namespace was provided. Before, it only grouped by namespace if   was provided as the value for the   parameter.
 * The  endpoint
 * Now always groups results by namespace, even if a specific namespace was provided. Before, it only grouped by namespace if  was provided as the value for the   parameter.
 * Each page has the properties  (whether the page is deleted or not), ,  ,  ,   (boolean),  ,  ,  ,   (current length of the page),  , and   (with keys  ,  ,   and  ).
 * property is no longer included, as this represents the importance level of only a single WikiProjects and not the page overall.
 * and  properties are removed. Use   instead and do your own formatting as desired.
 * property has been removed.
 * The  endpoint
 * Now returns the  property instead of.
 * The  property is replaced by , which has the keys  ,  ,   and.
 * The  property has been removed.
 * The  property is now a boolean instead of an integer.
 * The  property is now a boolean instead of an integer.

Errors


 * All fatal errors (not warnings) will be in the format specified by RFC 7807, with at minimum,   and   properties. Warnings will still be an array under the   property.

Endpoints

 * Project API
 * Normalize project
 * Namespaces
 * Page assessments
 * Page assessments configuration
 * Automated tools
 * Admins and user groups
 * Admin statistics
 * Patroller statistics
 * Steward statistics
 * Largest pages
 * User API
 * Simple edit count
 * Number of pages created
 * Pages created
 * Automated edit counter
 * Non-automated edits
 * Automated edits
 * Automated tools
 * Edit summaries
 * Top edits
 * Category edit counter
 * Log counts
 * Namespace totals
 * Month counts
 * Time card
 * Page API
 * Article info
 * Prose
 * Links
 * Top editors
 * Assessments
 * Bot data
 * (Semi-)automated edits
 * Quote API
 * Random quote
 * Single quote
 * All quotes