Reputation: 471
Using the MediaWiki API I have a query that returns the results I want:
https://en.wikipedia.org/w/api.php?action=query&list=allpages&apfrom=Apple&aplimit=5
How can I modify it to also include the URL for each of the pages that are returned?
I tried adding the "info" property and "url" info, but it does not return additional information:
https://en.wikipedia.org/w/api.php?action=query&list=allpages&apfrom=Apple&aplimit=5&prop=info&inprop=url
Upvotes: 1
Views: 3193
Reputation: 1641
You need to move the parameters you use to get the result to a generator
instead of a list and then use prop=info
and inprop=url
in the query. Like this:
Upvotes: 5