[Mediawiki-api] Is a given article in a category?

Brad Jorsch b-jorsch at alum.northwestern.edu
Mon Oct 11 02:51:44 UTC 2010


On Sun, Oct 10, 2010 at 07:50:43PM -0400, Roy Smith wrote:
> Lacking such intuition, is
> there any better mechanism in the API other than an exhaustive search
> through the category tree?

No. Note that enwiki has many *un*intuitive category chains as well. For
example, you might not expect [[Death Valley]] to be in [[:Category:Bodies
of water]], but it is:
* [[Death Valley]] is in [[:Category:Death Valley National Park]]
* ... which is in [[:Category:Northern Mojave-Mono Lake region]]
* ... which is in [[:Category:Watersheds of California]]
* ... which is in [[:Category:Watersheds of the United States]]
* ... which is in [[:Category:Watersheds]]
* ... which is in [[:Category:Rivers]]
* ... which is in [[:Category:Bodies of water]]



More information about the Mediawiki-api mailing list