Page MenuHomePhabricator

Discrepancy between documentation and reality
Closed, InvalidPublic

Description

With the BM wikipedia, and possibly others too, there is a discrepancy between the documentation and API response.

When making a request for redirects, the documentation say the limit is "500 (5,000 for bots)" https://bm.wikipedia.org/w/api.php?action=help&modules=query%2Bredirects
https://en.wikipedia.org/w/api.php?action=help&modules=query%2Bredirects

When making a request for more than 50 articles on the BM wiki, we get an error stating the limit is 50:

{ code: 'too-many-titles',
     info:
      'Too many values supplied for parameter "titles". The limit is 50.',
     '*':
      'See https://bm.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.' },
  servedby: 'mw1314' }

E.g. URL: Louisville_(Kentucky)|Albuquerque|Long_Beach|Colorado_Springs|Cleveland|Arlington_(Texas)|Bakersfield|Honolulu|Anaheim|Corpus_Christi|Lexington_(Kentucky)|Anchorage|Buffalo_(New_York)|Cincinnati|La_Baule-Escoublac|Gu%C3%A9rande|Corsept|La_Bernerie-en-Retz|Chauv%C3%A9|Les_Moutiers-en-Retz|Ch%C3%A9m%C3%A9r%C3%A9|Brains|Cheix-en-Retz|Bouaye|La_Montagne|La_Plaine-sur-Mer|Cou%C3%ABron|La_Chapelle-sur-Erdre|Abbaretz|Basse-Goulaine|Carquefou|La_Marne|Machecoul-Saint-M%C3%AAme|Bouguenais|Avessac|Conquereuil|Derval|Gu%C3%A9men%C3%A9-Penfao|Jans|La_Grigonnais|Jou%C3%A9-sur-Erdre|La_Meilleraye-de-Bretagne|Grand-Auvern%C3%A9|Iss%C3%A9|Les_Touches|Casson|Erbray|Louisfert|Ch%C3%A2teaubriant|Juign%C3%A9-des-Moutiers|Divatte-sur-Loire|Le_Cellier|Couff%C3%A9 | Hyperlinked

Original issue: https://github.com/openzim/mwoffliner/issues/592

Event Timeline

Legoktm subscribed.

The rdlimit on https://bm.wikipedia.org/w/api.php?action=help&modules=query%2Bredirects is the limit of response values. The 50 limit you're running into is how many titles you can provide. This is documented at https://bm.wikipedia.org/w/api.php?action=help&modules=query where titles says "Maximum number of values is 50 (500 for bots)."