Wikipedia Revisions API
A page's edit history with users, sizes, comments, tags and content hashes.
GET /v1/wikipedia/pages/{title}/revisions1 credit Failed requests are free
About this endpoint
GET /v1/wikipedia/pages/{title}/revisions?lang=en&limit=50 returns data.revisions and a data.page cursor block. Each revision has id, parentId, user, userId, timestamp, size, comment, tags and sha1, plus minor, bot, anon, temp, contentModel and flags. anon marks an IP editor and temp marks an automatically named temporary account.
from and to take ISO 8601 dates or times and are an inclusive window. dir=older (the default) walks from the newer edge toward older revisions; dir=newer walks the other way. The window is swapped when the direction needs it, so from earlier than to does not return a false empty list. Pass cursor from data.page.nextCursor to continue, and stop when data.page.hasMore is false. A missing title is not_found; a title with no revisions in the range is found with empty: true.
Wikipedia Revisions API FAQ
How do I read the newest revisions first?
Leave from unset and keep the default dir=older. The newest revision comes first and each page continues toward older revisions through data.page.nextCursor.
How do I read a date range?
Set from and to as ISO 8601 dates or times. Date-only values are read as midnight UTC; a time must include a zone such as Z or +02:00. A range with no revisions is found with empty set to true, not not_found.
What is in one revision row?
id, parentId, user and userId, timestamp, size, comment, tags and sha1, plus minor, bot, anon, temp, contentModel and flags. anon marks an IP editor and temp marks an automatically named temporary account. Hidden fields can be null. This route swaps a reversed from and to; the pageviews and contributions routes refuse one instead.
How is revision paging billed?
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. Each paginated page is a separate billed request.
Other Wikipedia endpoints
- PageGET /v1/wikipedia/pages/{title}
- Pages by titleGET /v1/wikipedia/pages
- Page contentGET /v1/wikipedia/pages/{title}/content
- History statsGET /v1/wikipedia/pages/{title}/history-stats
- BacklinksGET /v1/wikipedia/pages/{title}/backlinks
- LinksGET /v1/wikipedia/pages/{title}/links
- LanguagesGET /v1/wikipedia/pages/{title}/languages
- MediaGET /v1/wikipedia/pages/{title}/media