The XTools Page API endpoints offer data related to a single page.
Interactive OpenAPI docs are at xtools.wmcloud.org/api. These on-wiki docs are meant to supplement it. |
Article info
/api/page/articleinfo/{project}/{article}
Get basic information about the history of a page.
Parameters
project
(required) – Project domain or database name.article
(required) – Full page title.
Examples
Get basic information about Albert Einstein:
- https://xtools.wmcloud.org/api/page/articleinfo/en.wikipedia.org/Albert_Einstein
Prose
/api/page/prose/{project}/{article}
Get statistics about the prose (characters, word count, etc.) and referencing of a page. See user documentation for how the algorithm works.
Parameters
project
(required) – Project domain or database name.article
(required) – Full page title.
Examples
Get prose statistics of Albert Einstein:
- https://xtools.wmcloud.org/api/page/prose/en.wikipedia.org/Albert_Einstein
Links
/api/page/links/{project}/{article}
Get the number of in and outgoing links and redirects to the given page.
Parameters
project
(required) – Project domain or database name.article
(required) – Full page title.
Examples
Get links statistics of Albert Einstein:
- https://xtools.wmcloud.org/api/page/links/en.wikipedia.org/Albert_Einstein
Top editors
/api/page/top_editors/{project}/{article}/{start}/{end}/{limit}
Get the top editors to a page by edit count. You can optionally pass in ?nobots=1
to exclude bots from the results.
Parameters
project
(required) – Project domain or database name.article
(required) – Full page title.start
– Start date in the formatYYYY-MM-DD
.end
– End date in the formatYYYY-MM-DD
.limit
– Number of results to return. Default 20, maximum 1000.
Examples
Get the top editors to the English Wikipedia article Albert Einstein:
- https://xtools.wmcloud.org/api/page/top_editors/en.wikipedia/Albert_Einstein
Same as above, but return 50 results:
- https://xtools.wmcloud.org/api/page/top_editors/en.wikipedia/Albert_Einstein///50
Get the top 50 editors in 2017 to the English Wikipedia article Albert Einstein, excluding bots:
- https://xtools.wmcloud.org/api/page/top_editors/en.wikipedia/Albert_Einstein/2017-01-01/2017-12-31/50?nobots=1
Assessments
/api/page/assessments/{project}/{pages}
Get assessment data of the given articles, including the overall quality classifications, along with a list of the WikiProjects and their classifications and importance levels. You can optionally pass in ?classonly=1
to get only the overall quality assessment.
Parameters
project
(required) – Project domain or database name.pages
(required) – One or more full page titles, separated by pipes|
.
Examples
Get the assessment data on the English Wikipedia articles Albert Einstein and Bob Dylan:
- https://xtools.wmcloud.org/api/page/assessments/enwiki/Albert_Einstein|Bob_Dylan
- https://xtools.wmcloud.org/api/page/assessments/en.wikipedia/Albert_Einstein|Bob_Dylan
Same as above, but get only the overall quality assessments:
- https://xtools.wmcloud.org/api/page/assessments/en.wikipedia.org/Albert_Einstein|Bob_Dylan?classonly=1
Bot data
/api/page/bot_data/{project}/{page}/{start}/{end}
Get data about bots that have edited a page.
Parameters
project
(required) – Project domain or database name.page
(required) – Full page title.start
– Start date in the formatYYYY-MM-DD
.end
– End date in the formatYYYY-MM-DD
.
Examples
Get data about bots that have edited Albert Einstein.
- https://xtools.wmcloud.org/api/page/bot_data/enwiki/Albert_Einstein
(Semi-)automated edits
/api/page/autoamted_edits/{project}/{page}/{start}/{end}
Get counts of (semi-)automated tools that were used to edit a page.
Note: While the data provided by this API is accurate, the corresponding output in the Page History tool is not as accurate due to a bug.
Parameters
project
(required) – Project domain or database name.page
(required) – Full page title.start
– Start date in the formatYYYY-MM-DD
.end
– End date in the formatYYYY-MM-DD
.
Examples
Get counts of tools used to edit Albert Einstein.
- https://xtools.wmcloud.org/api/page/automated_edits/enwiki/Albert_Einstein