Wikipedia hub

Wikipedia Contributions API

A user's edits with page, revision, size change, comment and tags.

GET /v1/wikipedia/users/{name}/contributions

1 credit Failed requests are free

About this endpoint

GET /v1/wikipedia/users/Jimbo%20Wales/contributions?lang=en returns data.contributions, one row per edit. Each row has userId, user, temp, pageId, revId, parentId, ns, title, timestamp, new, minor, top, comment, size, sizeDiff and tags. top marks the latest revision of the page, and temp marks an automatically named temporary account.

namespace narrows to one namespace. from and to take ISO 8601 dates or times, and from may not be later than to. A window with from is walked oldest first from that lower bound; to, when given, is the upper bound. A request with only to keeps the newest-first order and returns edits up to that time. limit accepts 1 to 500 rows and cursor continues with data.page.nextCursor. The response echoes name.

A user who exists with no edits is found with empty: true. An unknown user is not_found.

Wikipedia Contributions API FAQ

Does this include edits to every namespace?

By default yes, including talk pages and project pages. Set namespace=0 for articles only, or another namespace id to narrow the list.

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. With both from and to set, rows run oldest first from the lower bound to the upper bound. With only from set, rows run oldest first from that time onward. With only to set, the newest edits up to that time come first. A range with no edits is found with empty set to true.

Why is a user not_found here but found on the user route?

An unknown name is not_found on both routes. A user who exists but has no edits is found with an empty contributions list. Check lookupStatus and empty separately.

How is contribution 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.