[Mediawiki-api] How to retrieve display page title with "query" API?
Pierre-Olivier Latour
pol at cooliris.com
Wed May 26 13:30:47 UTC 2010
Hi all,
How can I use the wikipedia "query" API to retrieve the display title of a page with the proper lowercase / uppercase? For instance, if I call:
http://en.wikipedia.org/w/api.php?action=query&prop=info&titles=IPad&format=xmlfm
I get back:
<?xml version="1.0"?>
<api>
<query>
<pages>
<page pageid="25970423" ns="0" title="IPad" touched="2010-05-26T13:22:43Z" lastrevid="364291567" counter="0" length="56739" />
</pages>
</query>
</api>
The raw page title is indeed "IPad" but the display one should be "iPad"? Is there any way I can get the display title?
I don't want to use the "parse" API (which has a nice "displaytitle" property) as it returns way too much data.
In any case, it seems a "prop" option for "displaytitle" in the "query" API would be a nice addition and it would be consistent with the properties you can retrieve with the "parse" API.
-Pol
________________________________
Pierre-Olivier Latour
pol at cooliris.com
More information about the Mediawiki-api
mailing list