Thread:Project:Support desk/Retrieving category page using API

I'd like to use the MediaWiki API to retrieve a category page, complete with the links to subcategories and pages. But when I use the technique I use for regular pages, I only get the content of the page (the text I see when I edit the page) and not all the links to subcategories and pages that have that category. Is there a way to get the whole content?

For example, http://www.mediawiki.org/wiki/Category:Tools is a category page.

I can use this query to get its content: http://www.mediawiki.org/w/api.php?action=query&prop=revisions&rvprop=content&format=xml&titles=Category:Tools

But that gives me only the basic content, whereas the Category:Tools page shows me the subcategories and pages and files.

I could use the API:Categorymembers to get the subcategories, pages, and files. But then I'd have to build a page myself from the lists of subcategories and pages returned.

I tried using action=parse, and that expanded templates, but still didn't give me the Subcategories and Pages sections: http://www.mediawiki.org/w/api.php?action=parse&prop=text&format=xml&page=Category:Tools