API

This site provides instructions for the access of one or multiple ontologies.

Download one ontology via Archivo

Examples

Example 1 (default) Download the latest version of the Cinelab ontology as RDFXML
curl -L "http://archivo.dbpedia.org/download?o=http://advene.org/ns/cinelab/ld"

Example 2 Download the latest version of the Cinelab ontology as Turtle
curl -L "http://archivo.dbpedia.org/download?o=http://advene.org/ns/cinelab/ld&f=ttl"

Example 3 Download a specific version of the Datashapes ontology as RDFXML
curl -L "http://archivo.dbpedia.org/download?o=http://datashapes.org/dash&v=2020.07.16-115638"

API pattern explained

http://archivo.dbpedia.org/download?o={ontology-URI}&f={file-extension}&v={timestamp}

with: Another way is searching your ontology in the complete list of Archivo ontologies which also provides the latest download links.

Download multiple ontologies

Databus Collections

Archivo is powered by DBpedia Databus, which enables the creation of collection (custom data catalogues). Custom collections can be created and edited here. A few useful collections were already created: Additionally the files in a collection can be downloaded with a few simple bash commands (can be copied from each specific collection page):
# load the query of a collection via curl
query=$(curl -H "Accept:text/sparql" <COLLECTION-URI>)

# fetch the files via wget
files=$(curl -H "Accept: text/csv" --data-urlencode "query=${query}" https://databus.dbpedia.org/repo/sparql | tail -n+2 | sed 's/"//g')
while IFS= read -r file ; do wget $file; done <<< "$files"

Setup SPARQL enpoint

Virtuoso quickstart docker of the DBpedia Stack starts a Virtuoso instance and all latest ontologies will be deployed automagically by feeding the collection URI. Requirements for this are a proper installation of docker and docker-compose on your machine.
Example: Load latest versions of official ontology graphs in an virtuoso endpoint.
git clone https://github.com/dbpedia/virtuoso-sparql-endpoint-quickstart.git
cd virtuoso-sparql-endpoint-quickstart
COLLECTION_URI=https://databus.dbpedia.org/denis/collections/latest_ontologies_as_nt VIRTUOSO_ADMIN_PASSWD=secret docker-compose up

NOTE: The Virtuoso SPARQL endpoint will be available at http://localhost:8890/sparql.

Other alternatives