Linked Data and RDF

CKAN has extensive support for linked data and RDF. In particular, there is complete and functional mapping of the CKAN dataset schema to linked data formats.

Enabling and Configuring Linked Data Support

In CKAN <= 1.6 please install the RDF extension:

In CKAN >= 1.7, basic RDF support will be available directly in core.


When using the built-in RDF support (CKAN >= 1.7) there is no configuration required. By default requests for RDF data will return the RDF generated from the built-in ‘packages/read.rdf’ template, which can be overridden using the extra-templates directive.

Accessing Linked Data

To access linked data versions just access the API guide in the usual way but set the Accept header to the format you would like to be returned. For example:

curl -L -H "Accept: application/rdf+xml"
curl -L -H "Accept: text/n3"

An alternative method of retrieving the data is to add .rdf to the name of the dataset to download:

curl -L
curl -L

Schema Mapping

There are various vocabularies that can be used for describing datasets:

  • Dublin core: these are the most well-known and basic. Dublin core terms includes the class dct:Dataset.
  • DCAT - vocabulary for catalogues of datasets
  • VoID - vocabulary of interlinked datasets. Specifically designed for describing rdf datasets. Perfect except for the fact that it is focused on RDF
  • SCOVO: this is more oriented to statistical datasets but has a scovo:Dataset class.

At the present CKAN uses mostly DCAT and Dublin Core.

An example schema might look like:

<rdf:RDF xmlns:foaf="" xmlns:owl=""
<dcat:Dataset rdf:about="">
  <owl:sameAs rdf:resource="urn:uuid:424bdc8c-038d-4b44-8f1d-01227e920b69"></owl:sameAs>
  <dct:description>Shark attacks worldwide</dct:description>
  <foaf:homepage rdf:resource=""></foaf:homepage>
  <dct:title>Worldwide Shark Attacks</dct:title>
          <dcat:accessURL rdf:resource=";name=worldwide_shark_attacks&amp;query=select+*+from+`Europe`&amp;apikey="></dcat:accessURL>
          <dcat:accessURL rdf:resource=";name=worldwide_shark_attacks&amp;query=select+*+from+`Australia`&amp;apikey="></dcat:accessURL>
      <foaf:mbox rdf:resource=""></foaf:mbox>
      <foaf:mbox rdf:resource=""></foaf:mbox>
  <dct:rights rdf:resource=""></dct:rights>