Question

Wikipedia assigns a class (Featured, Good articles, A-class, B-class, etc) to each article. I would like to extract this attribute either from the corpus or using the Media wiki API. Is there a way to find this out?

Is there a way to get a set of articles based on the grade of the article. For example, can I use the API to get 10 Featured Articles?

Was it helpful?

Solution

The MediaWiki software doesn't know anything about the assessments, so you're not going to find a separate method to work with them in the API.

There is a bot that maintains a database of assessments, and shows them on a website, but I don't think this data is accessible in a machine-readable format.

So, I think the best way would be just to use categories: all featured articles are in the category Featured articles and you can get the list of those articles using the API method categorymembers:

https://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Featured%20articles&cmlimit=max

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top