Datasets

ChEBI RDF

ChEBI (Chemical Entities of Biological Interest) is a freely accessible, ontology-driven database of ‘small molecular entities’, including their chemical structures, names, definitions, roles, and biological relationships. It provides manually curated, non-proprietary data supported by links to external resources and is widely used in chemical biology and bioinformatics

Dataset specifications

Tags
Drug/Chemical
Provenance Original
Registration Added by RDF portal
Data provider
  • European Bioinformatics Institute
Creator
  • European Bioinformatics Institute
Issued 2026-11-11
Licenses
  • Creative Commons License (CC BY 4.0), and governed by EMBL-EBI’s terms of use and Long-term data preservation policy.
Version Release 257
Download /website/download/#chebi
SPARQL Endpoint https://rdfportal.org/ebi/sparql

Dataset statistics

Triples
9947012
Subjects
1396057
Properties
40
Objects
2423981
Classes
7

SPARQL example queries

Example 1

Run on Endpoint
# Search for chemical entities by name or synonym.

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX oboinowl: <http://www.geneontology.org/formats/oboInOwl#>

SELECT DISTINCT ?compound ?label ?matched_name
FROM <http://rdf.ebi.ac.uk/dataset/chebi>
WHERE {
  VALUES ?keyword { "glucose" }

  ?compound a owl:Class ;
            rdfs:label ?label ;
            (rdfs:label|oboinowl:hasExactSynonym|oboinowl:hasRelatedSynonym)
              ?matched_name .

  FILTER(CONTAINS(LCASE(STR(?matched_name)), LCASE(?keyword)))
  FILTER NOT EXISTS { ?compound owl:deprecated true }
}
ORDER BY ?label ?compound
LIMIT 100

Example 2

Run on Endpoint
# Retrieve all descendant classes of a specified ChEBI class.

PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT DISTINCT ?compound ?label
FROM <http://rdf.ebi.ac.uk/dataset/chebi>
WHERE {
  VALUES ?parent { obo:CHEBI_33709 }

  ?compound rdfs:subClassOf+ ?parent ;
            rdfs:label ?label .

  FILTER(isIRI(?compound))
  FILTER(?compound != ?parent)
  FILTER NOT EXISTS { ?compound owl:deprecated true }
}
ORDER BY ?label ?compound
LIMIT 100

Example 3

Run on Endpoint
# Retrieve roles explicitly assigned to a specified chemical entity.

PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

SELECT DISTINCT ?compound ?label ?role ?role_label
FROM <http://rdf.ebi.ac.uk/dataset/chebi>
WHERE {
  VALUES ?compound { obo:CHEBI_17234 }

  ?compound rdfs:label ?label ;
            rdfs:subClassOf ?restriction .

  ?restriction a owl:Restriction ;
               owl:onProperty obo:RO_0000087 ;
               owl:someValuesFrom ?role .

  ?role rdfs:label ?role_label .
}
ORDER BY ?role_label

Example 4

Run on Endpoint
# Retrieve external database cross-references for a specified ChEBI entry.

PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX oboinowl: <http://www.geneontology.org/formats/oboInOwl#>

SELECT DISTINCT ?compound ?label ?xref
FROM <http://rdf.ebi.ac.uk/dataset/chebi>
WHERE {
  VALUES ?compound { obo:CHEBI_17234 }

  ?compound rdfs:label ?label ;
            oboinowl:hasDbXref ?xref .
}
ORDER BY ?xref

Example 5

Run on Endpoint
# Retrieve the definition, molecular formula, charge, mass, and structure identifiers for a specified ChEBI entry.

PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX chemrof: <https://w3id.org/chemrof/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT DISTINCT ?compound ?label ?definition
                ?formula ?charge ?mass ?smiles ?inchi ?inchikey
FROM <http://rdf.ebi.ac.uk/dataset/chebi>
WHERE {
  VALUES ?compound { obo:CHEBI_17234 }

  ?compound rdfs:label ?label .

  OPTIONAL { ?compound obo:IAO_0000115 ?definition . }
  OPTIONAL { ?compound chemrof:generalized_empirical_formula ?formula . }
  OPTIONAL { ?compound chemrof:charge ?charge . }
  OPTIONAL { ?compound chemrof:mass ?mass . }
  OPTIONAL { ?compound chemrof:smiles_string ?smiles . }
  OPTIONAL { ?compound chemrof:inchi_string ?inchi . }
  OPTIONAL { ?compound chemrof:inchi_key_string ?inchikey . }
}

Schema diagram

Schema diagram for chebi
Schema diagram for chebi