Actually, it looks like I was wrong. According to Rillke, you can do it in a single query by using a generator:
https://commons.wikimedia.org/w/api.php?action=query&generator=categorymembers&gcmtype=file&gcmtitle=Category:Coins_in_the_Walters_Art_Museum&prop=info|imageinfo&gcmlimit=100&iiprop=url&iiurlwidth=120&iirulheight=120

Ryan Kaldari

On 9/6/12 5:57 PM, vjkumar wrote:
I am  trying to get by media API query the url of thumbnail, image and
description for all images in the following category web page:
http://commons.wikimedia.org/wiki/Category:Coins_in_the_Walters_Art_Museum

I tried the following query:

http://commons.wikimedia.org/w/api.php?format=xml&action=query&list=categorymembers&cmtitle=Category:Coins_in_the_Walters_Art_Museum

which produced an XML output which gave me all the Image file names.
With a file name I am able to construct the url for this file.

For example with
  "File:Ethiopian - Coin Depicting an Anonymous King - Walters 59793 -
Reverse.jpg" 

I am able to construct the URL for the image as
http://commons.wikimedia.org/wiki/File:Ethiopian_-_Coin_Depicting_an_Anonymous_King_-_Walters_59793_-_Obverse.jpg.

However I would like to get the thumbnail url,  Title and the description
for the images in this category with a query and get the output in  XML   or
JSON format . Is it possible to construct such a query?
Thanks.
The XML output is given below:


<?xml version="1.0"?>
-<api>-<query>-<categorymembers><cm title="File:Ethiopian - Coin Depicting
an Anonymous King - Walters 59793 - Obverse.jpg" ns="6"
pageid="18842729"/><cm title="File:Ethiopian - Coin Depicting an Anonymous
King - Walters 59793 - Reverse.jpg" ns="6" pageid="18842732"/><cm
title="File:Ethiopian - One of Two Coins Depicting Ousanas and an Anonymous
King - Walters 59794.jpg" ns="6" pageid="18809697"/><cm title="File:Greek -
Apollo - Walters 59533.jpg" ns="6" pageid="18787772"/><cm title="File:Greek
- Athena - Walters 59519 - Obverse.jpg" ns="6" pageid="18801612"/><cm
title="File:Greek - Athena - Walters 59519 - Reverse.jpg" ns="6"
pageid="18801616"/><cm title="File:Greek - Athena - Walters 59702 -
Back.jpg" ns="6" pageid="18787788"/><cm title="File:Greek - Persephone -
Walters 59693.jpg" ns="6" pageid="18787786"/><cm title="File:Greek -
Tetradrachme with King Nicodemus II - Walters 59723 - Back.jpg" ns="6"
pageid="18787795"/><cm title="File:Matthes Gebel - Medal of Arnold and
Nicholas Wenck - Walters 59480 - Obverse.jpg" ns="6"
pageid="18839416"/></categorymembers></query>-<query-continue><categorymembers
cmcontinue="file|7e524f4d414e202d20434f494e2057495448204120484950504f504f54414d555320414e4420504f525452414954204f46204f544143494c494120534556455241202d2057414c54455253203539373531202d204241434b2e4a50470a524f4d414e202d20434f494e2057495448204120484950504f504f54414d555320414e4420504f525452414954204f46204f544143494c494120534556455241202d2057414c54455253203539373531202d204241434b2e4a5047|18787799"/></query-continue></api>



--
View this message in context: http://wikimedia.7.n6.nabble.com/Api-Query-for-thumbnail-images-title-etc-in-a-category-tp4984759.html
Sent from the WikiMedia Commons mailing list archive at Nabble.com.

_______________________________________________
Commons-l mailing list
Commons-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/commons-l