We are pleased to announce that we have updated the ChEMBL RESTful Web Service API (application programming interface) with some more of the features that you - the ChEMBL users - have requested.
In particular, we have added support for the:
- Retrieval of compounds by Canonical SMILES string using HTTP POST *.
- Retrieval of compounds containing a particular substructure, as given by a Canonical SMILES string using HTTP POST *.
- Retrieval of a list of compounds similar, at a given cutoff percentage Tanimoto similarity, to one represented by a given Canonical SMILES string using HTTP POST *.
- Retrieval of larger compound images, as given by a compound ChEMBLID. The retrieved image can be easily re-sized using the 'dimensions' attribute of the endpoint. See the example URLs below.
- Inclusion of a 'synonyms' property on ChEMBL compound resources. This property will be set for compounds for which there are synonyms available.
- Retrieve a compound image - https://www.ebi.ac.uk/chemblws/compounds/CHEMBL192/image
- Retrieve a compound image sized to specific dimensions - https://www.ebi.ac.uk/chemblws/compounds/CHEMBL192/image?dimensions=220
In addition to the API changes we have also updated the ChEMBL Java client to take advantage of the new features provided by the API. These updates include:
- Methods to invoke the additional HTTP POST API endpoints (searching for compounds based on SMILES matches, common substructures and similarity to a given percentage Tanimoto similarity). Examples of the new client methods in use are available on the Example.java class on the API documentation page.
The new client can be downloaded from: https://www.ebi.ac.uk/chembl/extra/chemblrestws/chemblRestClient-1.0.5.jar
As always, you're feedback and suggestions for improving the API are most welcome. Please e-mail: firstname.lastname@example.org.
* These additions are in response to a bug in sending SMILES data via the URL - some SMILES instances, such as those containing triple bonds, make use of characters which are reserved characters in the specification for Uniform Resource Locators (URLs). For API requests involving SMILES, API user's can choose to either URL encode their SMILES input before submitting the request to the HTTP GET endpoint or use the new HTTP POST endpoint and send the SMILES data in the body of the HTTP request rather than in the URL.