API talk:Lists

rc_id parameter
Would it be possible to add the column 'rc_id' to the recentchanges query report? &#91;user:jldupont&#124;Jean-Lou Dupont] 14:45, 10 July 2007 (UTC)

log_id parameter
Would it be possible to add the column 'log_id' to the logevents query report? &#91;user:jldupont&#124;Jean-Lou Dupont] 14:50, 10 July 2007 (UTC)

Good idea. That way if polling every 2 minutes and a burst of 1000 changes come in, you can tell it the last id (or even unix timestamp) of the last change you received and continue polling from there, confident that you won't lose events.

LogEvents Bug for MW1.11 SVN trunk
The response XML always returns 'logid="0"' Jean-Lou Dupont 21:08, 19 July 2007 (UTC)
 * Filed a bug 10660. --Yurik 22:15, 22 July 2007 (UTC)

Taking to long
takes very long on the first load. I guess this is performance issue. Bryan Tong Minh 21:03, 10 August 2007 (UTC)
 * I think I know why: Title::makeTitle is called for *separately* for *every* title when backlinks/templatelinks/embeddedin is used in generator mode. See here. I'm gonna try to fix that now. --Catrope 18:32, 10 September 2007 (UTC)
 * Hmm, apparently that's not the problem. I'll post a list of SQL queries this request makes and have domas or another DB techie look at it. --Catrope 18:54, 10 September 2007 (UTC)
 * I imported some of those templates from Commons and ran a test request against it:


 * When I ran EXPLAIN against these queries, only the templatelinks part of the first query mentioned using an index. I don't know if that's the problem, though, so I'll ask an expert. --Catrope 19:54, 10 September 2007 (UTC)

Small bug in categorymember?
Does "categorymember" work different from the others? When I try http://en.wikipedia.org/w/api.php?format=xmlfm&action=query&list=embeddedin&eilimit=20&eititle=Template:LGBTProject it returns exactly the same results as http://en.wikipedia.org/w/api.php?format=xmlfm&action=query&list=embeddedin&eilimit=20&eititle=LGBTProject

"categorymember" doesn't seem to be the same - http://en.wikipedia.org/w/api.php?format=xmlfm&action=query&list=categorymembers&cmlimit=20&cmcategory=Category:Compositions_by_Alexander_Glazunov returns nothing, while http://en.wikipedia.org/w/api.php?format=xmlfm&action=query&list=categorymembers&cmlimit=20&cmcategory=Compositions_by_Alexander_Glazunov returns the list of articles. -- SatyrTN 20:40, 18 September 2007 (UTC)

allcategories
Is there not an "action=query&list=allcategories"? Any plans for development? -- SatyrTN 03:18, 8 December 2007 (UTC)

Request for redirect info in backlinks query
Hi,

I see that the backlinks query can already filter results depending if a backlink is a redirect or not (with blfiterredir) but I don't see a way to see in the result if backlinks are actually redirect or not. Could it be added to the API ?

I need to retrieve all backlinks (recursively through redirects), so currently I call recursively the backlinks query and the redirect query. Retrieving the 2 informations in one query would be very useful for me to speed up requests ;)

I quickly looked at the code of the backlinks query and it seems simple to do (I may be overlooking things because I don't know how the API is working) :
 * In run, call $this->addField('page_is_redirect'); if needed.
 * In extractRowInfo, add something like $vals['redirect'] = intval($row->page_is_redirect);.

--NicoV 18:06, 4 January 2008 (UTC)
 * Dude, just use  --Catrope 22:04, 4 January 2008 (UTC)

allpages and apprefix
Hi,

I am trying to use allpages with the apprefix parameter, but so far I have no results at all. Am I doing something wrong or is there a bug ?

Example: http://en.wikipedia.org/w/api.php?action=query&list=allpages&apprefix=Bal&apfrom=bal

Result: No pages at all

Edit: Also, is there a way to request all page titles containing a given word ?

--NicoV 20:06, 13 January 2008 (UTC)


 * Ok, I got the answer: http://en.wikipedia.org/w/api.php?action=query&list=allpages&apprefix=Bal
 * --NicoV 17:56, 14 January 2008 (UTC)

apprefix with namespace
Hello. I dont know if i am wrong, but we can't use namespace in prefix for the moment : I would like to know if its possible to do something like that, because over request, the title param allow to use it, and it more usefull for transwiki tools, because we dont need to encode/decode the namespace. -fr:user:bayo 19:06, 23 January 2008 (UTC)
 * http://en.wikipedia.org/w/api.php?action=query&list=allpages&apprefix=Portal:A (we can't use it)
 * http://en.wikipedia.org/w/api.php?action=query&list=allpages&apprefix=A&apnamespace=100
 * http://fr.wikipedia.org/w/api.php?action=query&bltitle=Mod%C3%A8le%3ARedirection%20jeu%20vid%C3%A9o&list=backlinks
 * It would be very hard to do. It's probably easier if you just fetched the namespace list. --Catrope 21:40, 23 February 2008 (UTC)

Fulltext Search
I would love to be able to use this, but it doesn't appear to work. The example isn't exactly functional either. 

Is this telling me that there are no articles on Wikipedia about Wikipedia?
 * Wikipedia uses the Lucene search engine, which isn't supported by the API yet. On wikis using MediaWiki's built-in search engine, list=search will work. --Catrope 21:38, 23 February 2008 (UTC)

backlinks minus transcluded templates
I'm trying I get the list of all pages that link to PAX9, but minus the pages that only link through the commmonly-transcluded w:Template:Transcription factors. Can't seem to find the right combination of parameters here to do it. Suggestions? 71.136.244.142 08:12, 29 February 2008 (UTC)
 * Just wanted to check again to see if anyone had any thoughts at all about this question. Or perhaps there is a better place to ask?  71.136.244.142 06:37, 4 March 2008 (UTC)
 * You can try the mailing list https://lists.wikimedia.org/mailman/listinfo/mediawiki-api --NicoV 16:01, 4 March 2008 (UTC)

embeddedin
Hello. I would like to know if its possible to order this list by pageid, like Special:WhatLinkHere work ? Sure i can do it myself, but with it for exemple we can request only smallest or biggest id. Maybe it can be something common for pagelist request. Thanks. -fr:user:bayo 12:31, 30 March 2008 (UTC)
 * Backlinks, embeddedin and imageusage are already sorted by page ID. --Catrope 13:34, 30 March 2008 (UTC)
 * That's inexact, because the display is sort by namespace (all categories are on the bottom, the id of the first one is smaller than the id of the last article). -fr:user:bayo 02:47, 2 April 2008 (UTC)

Rangeblocks
Can the API be used to find by which rangeblock an IP is blocked? --Beetstra 14:29, 10 April 2008 (UTC)
 * Not yet, I'll work on that. --Catrope 14:51, 10 April 2008 (UTC)
 * Let me expand on this. I am running unblockbot on IRC (channel #wikipedia-en-unblock).  It would be great if the api could be polled for the rangeblock, would make life for the people watching that channel much easier.  Thanks already!  --Beetstra 15:04, 10 April 2008 (UTC)
 * Similarly, but probably more difficult, autoblocks. I am not sure how they would need to be identified, but also that would be great.  Thanks again!  --Beetstra 15:13, 10 April 2008 (UTC)
 * Alright, this is where we stand now: anyone trying to unblock an IP that's part of a range block will be informed which range it's part of (you need unblock rights, though). Also, list=blocks can be used to find out whether a certain IP was autoblocked (see the  and   parameters). Looking up whether a certain IP is rangeblocked without trying to unblock it is not yet implemented, please request it here (don't forget to set Component to API) if you want it. --Catrope 14:37, 11 April 2008 (UTC)
 * Those are the functions that I already have. What I would like to have is a function to find the range in which it is, but it is merely a service to the admins who are on IRC watching the unblock requests.  They can do the same routine as you describe, but if the bot were to say which range the IP is affected by would result in less clicks and quicker unblock of the users.  I'll consider filing a request, thanks anyway.  --Beetstra 15:44, 11 April 2008 (UTC)

allcategories limited to 500
"allcategories / ac" can return at most 500 categories (MediaWiki 1.12.0). What is the recommended technique for obtaining the full category list? Maiden taiwan 17:53, 10 April 2008 (UTC)
 * Never mind, I found the answer at API:Query. Maiden taiwan 17:56, 10 April 2008 (UTC)