Search code examples
apiwikipediawikipedia-apirevision

Is there a clean way to retrive the quality assessment of a Wikipedia article using any given revid or oldid?


Is there a way to retrieve the corresponding quality assessment of a Wikipedia article just before a revision is committed? One example of interest is to look into when did this page reached FA-class?

From the View history tab (or through API calls), one can retrieve the full list of revisions. Then, how to identify the quality assessment of the article seconds before each revision is committed?

If there is not a readily available API call, please advise what to look for when exploring the View history page. For example:

  • What type of markers on the page shall indicate that the quality assessment of an article has changed/improved?

Solution

  • https://en.wikipedia.org/w/api.php?action=help&modules=query%2Bpageassessments will give you the current ratings, but it will be more work to find out when these changed. Featured and good articles get {{featured article}} or {{good article}} added to them and you can find when these were first added using wikiblame: http://wikipedia.ramselehof.de/wikiblame.php?user_lang=en&lang=en&project=wikipedia&article=Kevin+Beattie&needle=%7B%7Bfeatured+article%7D%7D&skipversions=0&ignorefirst=0&limit=500&offmon=9&offtag=17&offjahr=2019&searchmethod=int&order=desc&user=. That's not available as an API though, so if you want to automate it you will have to grab each revision and check if the template was present and work out when it was added that way. If you're interested in the longer quality history, you will need to look through the talk pages e.g. https://en.wikipedia.org/wiki/Talk:Kevin_Beattie as this is where the quality information is stored. You will need to find a way of searching the revisions and detecting when the |class= parameter changes.