[ckan-dev] Using CKAN API to access list of data sets returned for a search query for Linked Open Data Cloud

Timothy Lebo lebot at rpi.edu
Fri May 4 18:30:20 UTC 2012


Sarasi Lalithsena,

The following curl command will get you an RDF listing of all CKAN datasets in the lodcloud group:

curl -H "Content-type: text/turtle" -d ' <http://ckan.net/group/lodcloud> a <http://purl.org/twc/vocab/datafaqs#CKANGroup> .' http://sparql.tw.rpi.edu/services/datafaqs/core/select-datasets/by-ckan-group

It returns something like the following.

Regards,
Tim Lebo


@prefix dcterms: <http://purl.org/dc/terms/> .

<http://ckan.net/group/lodcloud> a <http://purl.org/twc/vocab/datafaqs#DatasetCollection>;
    dcterms:hasPart <http://thedatahub.org/dataset/2000-us-census-rdf>,
        <http://thedatahub.org/dataset/aemet>,
        <http://thedatahub.org/dataset/agrovoc-skos>,
        <http://thedatahub.org/dataset/amsterdam-museum-as-edm-lod>,
        <http://thedatahub.org/dataset/archiveshub-linkeddata>,
        <http://thedatahub.org/dataset/austrian_ski_racers>,
        <http://thedatahub.org/dataset/b3kat>,
        <http://thedatahub.org/dataset/bbc-music>,
        <http://thedatahub.org/dataset/bbc-programmes>,
        <http://thedatahub.org/dataset/bbc-wildlife-finder>,
        <http://thedatahub.org/dataset/beneficiaries-of-the-european-commission>,
        <http://thedatahub.org/dataset/bibbase>,
        <http://thedatahub.org/dataset/bible-ontology>,
        <http://thedatahub.org/dataset/bio2rdf-affymetrix>,
        <http://thedatahub.org/dataset/bio2rdf-cas>,

…
…
...

<http://thedatahub.org/dataset/2000-us-census-rdf> a <http://purl.org/twc/vocab/datafaqs#CKANDataset>,
        <http://www.w3.org/ns/dcat#Dataset> .

<http://thedatahub.org/dataset/aemet> a <http://purl.org/twc/vocab/datafaqs#CKANDataset>,
        <http://www.w3.org/ns/dcat#Dataset> .

<http://thedatahub.org/dataset/agrovoc-skos> a <http://purl.org/twc/vocab/datafaqs#CKANDataset>,
        <http://www.w3.org/ns/dcat#Dataset> .


On May 4, 2012, at 12:41 PM, Sarasi Lalithsena wrote:

> Hi All,
> 
> I need some help for using CKAN api to get the data sets returned for a search query by CKAN.
> 
> First of all I would like to know that the list of data sets returned by CKAN for a search
> query is a ranked list or not.
> 
> When I tried to follow the example queries given in "http://docs.ckan.org/en/latest/api-tutorial.html"
> page for Seach it throws an internal server error. Am I missing something or is there any other way to do it?
> Specifically I am only interested for Linked Open Data sets so is there any way that I can get
> only those information.
> 
> Thanks In Advance
> Regards
> Sarasi Lalithsena
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20120504/9c52fd1e/attachment-0001.html>


More information about the ckan-dev mailing list