Wikipedia History Stats API
Edit and editor counts plus the first revision for one page.
GET /v1/wikipedia/pages/{title}/history-stats1 credit Failed requests are free
About this endpoint
GET /v1/wikipedia/pages/{title}/history-stats?lang=en returns data.edits, data.editors, data.firstRevision and data.complete. edits is the number of revisions, and editors is the number of distinct editors. firstRevision uses the same row shape as the revisions route: id, user, timestamp, size, comment and tags.
editsCapped and editorsCapped are true when a count is capped instead of exact. complete is true when both counts are available; if a count request fails, complete is false and that count is null while the rest of the answer is still returned. A missing title is lookupStatus: not_found and the counts are null.
Wikipedia History Stats API FAQ
What do the capped flags mean?
editsCapped or editorsCapped is true when the count stops at Wikipedia's maximum instead of being exact. The count is still useful as a lower bound, but do not present a capped value as exact.
Why is complete false?
complete is false only when a count is temporarily unavailable. edits or editors is then null, and firstRevision is still returned. The answer is partial, not an error.
What is the first revision?
firstRevision is the oldest revision of the page, with its id, user, timestamp, size, comment and tags. It is null only when the page has no revision to return, which is why a missing page is not_found instead.
Can I get the full revision list?
Use GET /v1/wikipedia/pages/{title}/revisions for the paged history. The history-stats route is the small summary: two counts and the first revision.
How many credits does history stats cost?
Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
Other Wikipedia endpoints
- PageGET /v1/wikipedia/pages/{title}
- Pages by titleGET /v1/wikipedia/pages
- Page contentGET /v1/wikipedia/pages/{title}/content
- RevisionsGET /v1/wikipedia/pages/{title}/revisions
- BacklinksGET /v1/wikipedia/pages/{title}/backlinks
- LinksGET /v1/wikipedia/pages/{title}/links
- LanguagesGET /v1/wikipedia/pages/{title}/languages
- MediaGET /v1/wikipedia/pages/{title}/media