[ckan-discuss] Tag_count per group / packagecount in grouplist

Martin Borman martin at verseoverheid.nl
Mon Oct 11 19:24:25 BST 2010

Hi all,

We're integrating CKAN in a seperate website using the API (version 2).
We've encounterd some difficulties. Perhaps one of you can help us out?

Is it possible to get a tag-list, with count, for a specific group, using
the API?
For example, we get the packagelist for Delft, using

To show a taglist alongside this resultset we've only came up with a pretty
inefficient solution; Using the received JSON we count the tags and build
the list by examining each dataset. For the catalog as a whole we can use
$locator/api/2/tag_counts. Is there some way to use this method as well for
a specific group, e.g.
$locator/api/2/search/package?groups=gemeente_delft&tag_counts=1 ?

The same issue we encounter when building a grouplist. It's no problem at
all to show a grouplist. We want to show a packagecount per group as well.
The only way to achieve this seems to be to request a jsonfile per group in
the background, and extract the packagecount. When you paginate per 30
items, this means 30 requests to the CKAN API. This seems very inefficient
to us and perhaps you know a better solution?

Hope you can help us out!

Best Regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-discuss/attachments/20101011/2fd045e2/attachment.htm>

More information about the ckan-discuss mailing list