Hi Matthew, we found the same thing. I didn't spend much time trying to work it out, just strip out the w/page/# part of the link. We have a "wikilinker" app that you paste in a page and it takes this out, so the link looks better in e-mail.
I'm really replying to find out what you are working on. We parse the exports as well. We organise our wiki into an upturned tree, with the first set of branches defining the "Chapters" of the wiki - technical, process, system etc. Then every page has an "up" link in it which allows us to parse all the pages and build this tree. We currently do this offline in a W32 app. Users find it hard to find what they are looking for, so we also build a HTML table of contents that we have as a page, so they can see how the wiki hangs together.
We don't currently use the API, but are looking for others who are delving into the innards to bounce ideas off of.
We also produce a mesh of cross links from pages and also broken links. We are hoping to parse the raw useage data to give quick feedback on hot and cold parts of the wiki and would be interesting in how / what people use to visualize their wikis.