I'm interested in the biggest number of revisions I can get through a single request. The documentation here http://en.wikipedia.org/w/api.php says that rvlimit would be a good parameter to pass if you want to fetch some revisions of an article and you want to set the number of revisions you receive :
rvlimit - limit how many revisions will be returned (enum) No more than 500 (5000 for bots) allowed.
I tried that myself and only got to at most 50 revisions per request. Can I get more than 50 revisions per request ? I understand that the program I'm running must be identified as a bot. Do I have to make an account for it and set in the notify wikipedia that it is a bot ? How can this notification be made ? What other 'benefits' does a bot have ?
Thank you
2009/6/20 randomcoder1@gmail.com
I'm interested in the biggest number of revisions I can get through a single request. The documentation here http://en.wikipedia.org/w/api.php says that rvlimit would be a good parameter to pass if you want to fetch some revisions of an article and you want to set the number of revisions you receive :
rvlimit - limit how many revisions will be returned (enum) No more than 500 (5000 for bots) allowed.
I tried that myself and only got to at most 50 revisions per request. Can I get more than 50 revisions per request ?
There's a simple trick to always get as many revisions as the API will let you: set rvlimit=max (this works for other xxlimit parameters too). The reason you can only get 50 is probably that you're passing rvprop=content, which has stricter limits because content fetching is expensive.
I understand that the program I'm running must be identified as a bot. Do I have to make an account for it and set in the notify wikipedia that it is a bot ? How can this notification be made ? What other 'benefits' does a bot have ?
The account your bot uses needs to be given bot rights. I have no idea what the criteria for that are or what the procedure is for applying for them, that's a community thing. Accounts with bot rights also get the option of marking their edits as bot edits, which means they'll be hidden from Special:Recentchanges unless you click "Show bots".
Roan Kattouw (Catrope)
Roan Kattouw (Catrope)
Roan Kattouw wrote:
The reason you can only get 50 is probably that you're passing rvprop=content, which has stricter limits because content fetching is expensive.
That's true.
The account your bot uses needs to be given bot rights. I have no idea what the criteria for that are or what the procedure is for applying for them, that's a community thing. Accounts with bot rights also get the option of marking their edits as bot edits, which means they'll be hidden from Special:Recentchanges unless you click "Show bots".
Are bots priviledged in terms of how many revisions the can request with action=query at a time ? Compared to a normal user who hasn't logged in I mean.
2009/6/20 randomcoder1@gmail.com
action=query at a time ? Compared to a normal user who hasn't logged in I mean.
Yes, for them the limit is raised to 500 IIRC. Also note that sysops have the same rights as bot with regard to API limits.
Roan Kattouw (Catrope)
mediawiki-api@lists.wikimedia.org