On Mon, Dec 24, 2012 at 8:56 AM, NetizenApps netizenapps@gmail.com wrote:
I found that using title to query is not reliable as I have seen titles changing when more articles with same/similar titles are being added. Some of the older titles now lead to generic page stating this title might mean one of the following in the list and a list of article pages links are shown below this message. . I want to avoid getting redirected to this generic page and always stay on the article page as I plan to show this Wikipedia content on my numerous sub-domain home pages.
You're not actually being redirected. It's just that the old page was moved and a new page created at the old title.
Is there a page id that I can use which doesn't change at all and is always associate to same article? If so, how can I query the page id using current titles? Any examples and pointers is very much appreciated.
There's the pageid, which can be queried using pageids instead of titles.[1] Note though that if the page is deleted and then undeleted (or recreated), a new pageid may be assigned.
[1]: e.g. https://en.wikipedia.org/w/api.php?action=query&pageids=15580374