Forum:Exporting using api.php

I am trying to export stuff from another wiki into a new wiki. The problem is that I also want to export certain redirects, a feature that Special:Export does not support. Is there any way to have the api.php interface output in the export/import XML format?