Wikipedia hub

Wikipedia Category Members API

Members of a category with sort keys, timestamps and the category counts.

GET /v1/wikipedia/categories/{title}/members

1 credit Failed requests are free

About this endpoint

GET /v1/wikipedia/categories/Category%3ALiving%20people/members?lang=en returns data.members, one row per member. Each row has pageId, ns, title, sortKeyPrefix, type and timestamp. type is page, subcat or file, and timestamp is when the member joined the category.

data.category holds size, pages, files, subcats and hidden when the counts are available. data.complete is false when the counts are temporarily unavailable, while members is still the full page. Set type=page, subcat or file to narrow the members. sort is sortkey (the default) or timestamp.

Pass the title with its Category: prefix. limit accepts 1 to 500 and cursor continues with data.page.nextCursor. A category that exists with no members is found with empty: true; a category that does not exist is not_found.

Wikipedia Category Members API FAQ

Do I include the Category prefix?

Yes. Pass Category:Living people as the title, URL-encoded in the path. A bare Living people is a different title and may be not_found.

Why is complete false?

The member list is still complete for the page, but the category counts are temporarily unavailable. category may then be null. The rows in members are unaffected.

Can I walk a whole category?

Yes. Follow data.page.nextCursor while data.page.hasMore is true. Each page is a separate request. Use type to include or skip subcategories and files.

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