CCDB can be accessed through an Application programming interface (API), which allows easy data retrieval.
The API can be used either from a web browser or from an external program such as a Perl/Python/R script.
Data is accessible through the URL http://ccdb.tau.ac.il/services/ , followed by specific suffixes, as described below.
The URLs format is (case sensitive):
http://ccdb.tau.ac.il/services/<output type>/?<taxonomic rank>=<query>&format=<output format>
where variables in chevrons should be replaced by values according to user request, as follows:
available values are: countsFull and statistics.
These allow retrieval of full or partial information for each row, respectively. Species statistics includes full resolved name, with the minimum, maximum, and median count, as well as a distribution of all available counts for this name. The distribution is presented as the count with its prevalence (percentage) such that, for example, in the case the recorded counts for a taxon are n = 20, 20, 30, 30, the distribution will be written as 20=0.5_30=0.5.
available values are: species , genus , family , majorGroup
available delimiters for species : space and underscore (examples: Aloe_vera or Aloe vera)
value must be respective to the taxonomic rank chosen, the name of a genus, family, or majorGroup
available values are: xml,json,csv
To retrieve full information of all counts in the genus Aloe in json format, access the URL:
To retrieve full information of all counts in the family Bryaceae in xml format, access the URL:
To retrieve statistics of all counts of Bryophytes in csv format:
To retrieve statistics of all counts of Aloe vera in xml format:
Accessing the API using an automatic script is done by retrieving the data from a URL, constructed according to the format described above.
For example, in Python 3, the following function may be used to retrieve full information for a given genus in JSON format:
response = urllib.request.urlopen('http://ccdb.tau.ac.il/services/countsFull/?genus=' + genus + '&format=json')
And the equivalent subroutine in Perl 5 is:
my $genus = $_;
my $response = get("http://ccdb.tau.ac.il/services/countsFull/?genus=$genus&format=json");