Call Javascript API to list items in a collection

Reading the Javascript API docs here ...
there is reference to Plain Old Webserver.

But on trying to install POW I see that POW is incompatible with Firefox 40. What should I use instead of POW to get collectionID?

From the docs ..

Get the items for a particular collection

var Zotero = Components.classes[";1"] .getService(Components.interfaces.nsISupports).wrappedJSObject;
var collectionid =; // or some other way of finding the collectionID here
var collection = z.Collections.get(collectionid);
var items = collection.getChildItems();
// or you can obtain an array of itemIDs instead:
var itemids = collection.getChildItems(true);
  • What collection are you trying to retrieve the ID for? What criteria is this based on? In general, you should post coding questions on
  • The only point I was making is that Javascript API docs refers to "POW" but that option (5 years old) can't now be installed on latest Firefox 40.

    I'll now move future dev questions to

Sign In or Register to comment.