API:Allcategories

Get a list of all categories. This differs from list=allpages&alnamespace=14 in that categories without descriptions will be listed and, categories with descriptions but no actual pages may not (e.g., redirects and categories where a page was created but the category was never used). Note: the  list also contains categories that have been deleted and are unused. It is recommended that the list be filtered to those where the size is greater than zero or the category page exists.

Error Codes
None