Prop = extracts does not return all extracts in the WikiMedia API

I would like to use the wikipedia API to return an extract from multiple Wikipedia articles at once. I am trying, for example, to execute the following request (I just randomly selected pageids):

http://en.wikipedia.org/w/api.php?format=xml&action=query&pageids=3258248|11524059&prop=extracts&exsentences=1

But it only contains the extract for the first pageid, not the second. Other properties do not seem to have this limitation. for example

http://en.wikipedia.org/w/api.php?format=xml&action=query&pageids=3258248|11524059&prop=categories

will return categories for both pages. Is this a bug or am I missing something?

+3


source to share


1 answer


Pay attention to the element <query-continue>

. He tells you that in order to receive additional statements, you need to specify excontinue=1

:

http://en.wikipedia.org/w/api.php?format=xml&action=query&pageids=3258248|11524059&prop=extracts&exsentences=1&excontinue=1

You should be able to get both of them by specifying exlimit=max

:



http://en.wikipedia.org/w/api.php?format=xml&action=query&pageids=3258248|11524059&prop=extracts&exsentences=1&exlimit=max

But it doesn't work correctly, I'm not sure why.

By the way, categories have similar restrictions, which is why your category request has <query-continue>

and why it doesn't list all categories of articles.

+10


source







All Articles