Molecule Tutorials - Herong's Tutorial Examples - v1.26, by Herong Yang
Call ChEMBL Data Web Service Directly
Provides a tutorial example on how to call ChEMBL data Web services directly with the 'curl' command.
If you want to call ChEMBL Web Services directly with HTTPS GET/POST protocols, you can follow this tutorial.
1. Make sure you have "curl" installed on your computer.
2. Get a list of all records of a given resource with a GET request.
(syntax) curl https://www.ebi.ac.uk/chembl/api/data/{resource} (example) herong$ curl https://www.ebi.ac.uk/chembl/api/data/molecule <response> <molecules> <molecule> <molecule_chembl_id>CHEMBL6329</molecule_chembl_id> <molecule_properties> <alogp>2.11</alogp> <aromatic_rings>3</aromatic_rings> <full_molformula>C17H12ClN3O3</full_molformula> <full_mwt>341.75</full_mwt> </molecule_properties> <molecule_structures> <canonical_smiles>Cc1cc(-n2ncc(=O)[nH]...</canonical_smiles> <molfile> ...
3. Get a single resource with the resource id.
(syntax) curl https://www.ebi.ac.uk/chembl/api/data/{resource}/{id} (example) herong$ curl https://www.ebi.ac.uk/chembl/api/data/molecule/CHEMBL6329 <molecule> <molecule_chembl_id>CHEMBL6329</molecule_chembl_id> <molecule_properties> <alogp>2.11</alogp> <aromatic_rings>3</aromatic_rings> <full_molformula>C17H12ClN3O3</full_molformula> <full_mwt>341.75</full_mwt> </molecule_properties> <molecule_structures> <canonical_smiles>Cc1cc(-n2ncc(=O)[nH]...</canonical_smiles> <molfile> ...
4. Filter resource records with a keyword.
(syntax) curl https://www.ebi.ac.uk/chembl/api/data/{resource}/search?q={keyword} (example) herong$ curl https://www.ebi.ac.uk/chembl/api/data/molecule/search?q=aspirin <response> <molecules> <molecule> <cross_references> <molecule> <xref_id>aspirin</xref_id> <xref_name>aspirin</xref_name> <xref_src>DailyMed</xref_src> </molecule> ...
5. Filter with resource records with other filters:
https://www.ebi.ac.uk/chembl/api/data/target?pref_name__iregex=(cdk1|cdk2) https://www.ebi.ac.uk/chembl/api/data/target?target_type__exact=SINGLE+PROTEIN
6. Get result in JSON format.
(syntax) curl https://www.ebi.ac.uk/chembl/api/data/{resource}?format=json (example) herong$ curl https://www.ebi.ac.uk/chembl/api/data/molecule?format=json
For more information, see ChEMBL Data Web Services specifications at https://chembl.gitbook.io/chembl-interface-documentation/web-services/chembl-data-web-services.
Table of Contents
Molecule Names and Identifications
Nucleobase, Nucleoside, Nucleotide, DNA and RNA
►ChEMBL Database - European Molecular Biology Laboratory
►Call ChEMBL Data Web Service Directly
ChEMBL Data Resource - molecule
ChEMBL Data Resource - activity
ChEMBL Data Resource - document
ChEMBL Data Resource - chembl_id_lookup
chembl_webresource_client - Python Client
chembl_webresource_client - Usage Examples
chembl_webresource_client - RetryError Exception
PubChem Database - National Library of Medicine
INSDC (International Nucleotide Sequence Database Collaboration)
HGNC (HUGO Gene Nomenclature Committee)