I've been looking for a way to query the wikipedia api based on a search string for a list of articles with the following properties:
- Title
- Snippet/Description
- One or more images related to the article.
I also have to make the query using jsonp.
I've tried using the list=search parameter
But it seems to ignore the prop=images, I've also tried variations using the prop=imageinfo and prop=pageimages. But they all give me the same result as just using the list=search.
I've also tried action=opensearch
http://en.wikipedia.org/w/api.php?action=opensearch&search=test&limit=10&format=xml
Which gives me exactly what I want when i set format=xml, but returns a simple array of page titles when using format=json and therefore fails because of the jsonp requirement.
Is there another approach to doing this? I'd really like to solve this in a single request rather than make the first search request and then a second request for the images using titles=x|y|z
list
and aprop
query together. – Smear