API

This section documents the CKAN API, for developers who want to write code that interacts with CKAN and its data.

The CKAN API is a powerful RPC-style API that exposes the core functions of CKAN to API clients. All of the core functionality of a CKAN website (everything you can do with the web interface and more) can be used by external code that calls the CKAN API. For example, using the CKAN API, your application can:

Get JSON-formatted lists of datasets from a site, or other CKAN groups:
/opendata/catalog/api/3/action/package_list
/opendata/catalog/api/3/action/group_list
/opendata/catalog/api/3/action/tag_list

Get a full JSON representation of a dataset, resource, or other object:
/opendata/catalog/api/3/action/package_show?id=flea market
/opendata/catalog/api/3/action/tag_show?id=Tourism
opendata/catalog/api/3/action/group_show?id=commerce

Find packages or resources that match a query:
/opendata/catalog/api/3/action/package_search?q=flea market
/opendata/catalog/api/3/action/resource_search?query=name:Installations%20Sports.kml

To obtain detailed information on the CKAN API, access the url:
http://docs.ckan.org/en/latest/api/