Machine-readable access to the CnidoSite catalogue metadata. Every endpoint below is read-only,
needs no key or registration, and can be returned as JSON or as tab-separated text.
Endpoints
Parameters
| Parameter | Values | Meaning |
resource | see above | Which dataset to return. Omitting it shows this page. |
format | json (default), tsv | Output encoding. tsv is sent as a file download. |
class | e.g. Hydrozoa | Restrict species, coverage and downloads to one taxonomic class. |
Examples
# every species with its class, as tab-separated text
curl -O 'https://cnidosite.org/api.php?resource=species&format=tsv'
# just the Hydrozoa, as JSON
curl 'https://cnidosite.org/api.php?resource=coverage&class=Hydrozoa'
# the full download manifest, then fetch every file it lists
curl 'https://cnidosite.org/api.php?resource=downloads&format=tsv' > manifest.tsv
awk -F'\t' 'NR>1 {print $6}' manifest.tsv | xargs -n1 -P4 curl -O
The
downloads endpoint is the machine-readable equivalent of the
Download page: it lists every file in the collection together with
its size and its direct download URL, so the whole 31 GB collection can be retrieved with a
single loop instead of one button press per file. Files are served by
download_fun.php, which streams them without loading them into memory; for large
transfers
wget or
curl -C - will resume an interrupted download.