0

Wikimedia Commons has categories, for instance https://commons.wikimedia.org/wiki/Category:Dogs
This category has sub-categories, and sub-sub-categories, etc.

I want to get a list of all sub-categories.

enter image description here

Is there a tool to get this full list as text for the category of my choice?
Copying from the web interface is not realistic as there are too many arrows to click.

I am especially interested in Wikimedia Commons.

The API has a subcat operation which gets sub-categories: https://commons.wikimedia.org/w/api.php?action=query&list=categorymembers&cmtype=subcat&cmtitle=Category:Dogs&format=json but I would prefer to use an existing tool rather than creating my own, especially given the probable edge cases such as infinite category loops.

  • PetScan is not a solution because it returns articles, not categories.
  • Search is not a solution because it searches for categories with "dogs" in the name, rather than sub-categories, so it would not find Terriers for instance.