scientific-skills/database-lookup/references/chebi.md
https://www.ebi.ac.uk/ols4/apihttps://www.ebi.ac.uk/webservices/chebi/2.0/test (SOAP/XML only)https://www.ebi.ac.uk/chebiNone required. All endpoints are public.
No published hard limits. EBI general guidance: reasonable usage.
ChEBI's primary web service is SOAP-based (XML), not REST. For REST-style JSON access, use the EBI OLS4 API which indexes ChEBI as an ontology.
GET https://www.ebi.ac.uk/ols4/api/search?q={query}&ontology=chebi
Example:
GET https://www.ebi.ac.uk/ols4/api/search?q=aspirin&ontology=chebi
Returns JSON with matching ChEBI terms, IDs, definitions, synonyms.
GET https://www.ebi.ac.uk/ols4/api/ontologies/chebi/terms?iri=http://purl.obolibrary.org/obo/CHEBI_{id}
Example:
GET https://www.ebi.ac.uk/ols4/api/ontologies/chebi/terms?iri=http://purl.obolibrary.org/obo/CHEBI_15365
Returns full term details: name, definition, synonyms, xrefs, relationships.
GET https://www.ebi.ac.uk/ols4/api/ontologies/chebi/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FCHEBI_{id}
(Double-encoded IRI in path.)
GET https://www.ebi.ac.uk/ols4/api/ontologies/chebi/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FCHEBI_{id}/parents
GET https://www.ebi.ac.uk/ols4/api/ontologies/chebi/terms/http%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FCHEBI_{id}/children
GET https://www.ebi.ac.uk/ols4/api/ontologies/chebi
{
"response": {
"numFound": 5,
"docs": [
{
"id": "chebi:15365",
"iri": "http://purl.obolibrary.org/obo/CHEBI_15365",
"label": "aspirin",
"description": ["A member of the class of benzoic acids..."],
"short_form": "CHEBI_15365",
"obo_id": "CHEBI:15365",
"ontology_name": "chebi",
"type": "class"
}
]
}
}
If you need chemical-specific data (formula, mass, structure, InChI), use the SOAP service:
https://www.ebi.ac.uk/webservices/chebi/2.0/webservice?wsdlgetCompleteEntity, getLiteEntity, getStructureSearch, getOntologyChildren, getOntologyParentsExample SOAP request for getCompleteEntity:
<soapenv:Body>
<chebi:getCompleteEntity>
<chebi:chebiId>CHEBI:15365</chebi:chebiId>
</chebi:getCompleteEntity>
</soapenv:Body>
Returns: formula, mass, charge, InChI, InChIKey, SMILES, synonyms, database links, ontology parents/children.