Skip to main content

ChEMBL Web Service Update 2: JSONP Support


We posted earlier in the week about some behind the scenes changes we had made to our Web Services. Having read that post (if you missed the post and use our Web Services please take a look), you will know we setup a temporary base URL to allow users to test the new ChEMBL API powered services. The base URL is:

https://www.ebi.ac.uk/chemblws2

We have made it straightforward for users to test the new services as all current methods are available using the new base URL. As well as maintaining existing functionality, we have also been able to add a couple of new features, the first of which is JSONP support. Those familiar with web application development will be familiar with the issue of requesting data from a domain different from that of the domain the web application is running. This type of data requested is prevented by the web browser, due to the enforcement of the same-origin policy. This is an important security concept, but there are times when it being able pull data in from a trusted source enhances the functionality of the web application and makes the life of the developer much easier. Adding JSONP support to the ChEMBL Web Services allows users to now pull ChEMBL data into their web pages with minimal effort. So how do you add JSONP support? Simple, you add an extra argument to the to Web Service call which provides the name of a callback function, which is then used to wrap the regular JSON response.

Currently you can request a JSON response with the following URL:


To create a JSONP response you add the callback argument parameter (Note, you do not need to include .json and the callback argument can be any value):


We hope you find this useful and if you have any questions get in touch.

The ChEMBL Team

Comments

Chris said…
Is it possible to use this to get data for a list of CHEMLid?
Mark Davies said…
At the moment there is no method for submitting a list of chembl_ids, you would need to script something to loop through a list.

Once we have pushed the Web Services running under the temporary chemblws2 URL to live we will be doing a full review of all our Web Services and the ability to submit a list of chembl_ids is functionality we will definitely consider adding.

Popular posts from this blog

SureChEMBL2.0 announcement

  Dear SureChEMBL users,   Last year, we asked for your feedback on what you wanted to see next from SureChEMBL. Your input didn’t disappear into the void—quite the opposite! While it may have seemed quiet on the surface, we've been working hard behind the scenes: fixing bugs, implementing new features, and laying the groundwork for major improvements.   Today, we’re excited to share that we’ve reached a significant milestone—and we’re marking the occasion with a new name. Without further delay... 🎉 SureChEMBL 2.0 is here! 🎉 What’s New in SureChEMBL 2.0? This release marks a major evolution of the system we inherited over a decade ago. We've replaced several core components of the pipeline—from annotation, to compound registration, to data provision. When we introduced the new SureChEMBL architecture in December 2023, we promised a system that would be “easier to support, and it should make it much easier to develop and deliver new functionalities”. Now, we're d...

Download the SureChEMBL2.0 data: major update!

    Dear SureChEMBL users, This is our second blog post from our series related to SureChEMBL2.0. If you missed the first one , you should take 5 minutes to read it. We know that for many of you, not being able to download new patent data from SureChEMBL for several months has had a significant impact on your work. Please rest assured that halting the data release was not a decision taken lightly. Continuing to develop on legacy software had reached a breaking point and could no longer be sustained within our current resource constraints.  In terms of SureChEMBL downloads, we were previously offering three types, all focused on patent compounds but differing in update frequency and content: MAP files: TSV files released quarterly, listing all compound–patent relationships identified in that period, along with the locations of the compounds within the patents.

 Compound data dump: SDF or TXT files, also released quarterly, containing only the compounds found in that perio...

ChEMBL 34 is out!

We are delighted to announce the release of ChEMBL 34, which includes a full update to drug and clinical candidate drug data. This version of the database, prepared on 28/03/2024 contains:         2,431,025 compounds (of which 2,409,270 have mol files)         3,106,257 compound records (non-unique compounds)         20,772,701 activities         1,644,390 assays         15,598 targets         89,892 documents Data can be downloaded from the ChEMBL FTP site:  https://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/releases/chembl_34/ Please see ChEMBL_34 release notes for full details of all changes in this release:  https://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/releases/chembl_34/chembl_34_release_notes.txt New Data Sources European Medicines Agency (src_id = 66): European Medicines Agency's data correspond to EMA drugs prior to 20 January 2023 (excluding ...

Even more RDKit in SureChEMBL2.0!

      Dear SureChEMBL users, Welcome to the third blog post in our SureChEMBL2.0 series! If you missed the previous ones [ 1 , 2 ], be sure to check them out when you have a moment.   Today, we're diving into what has changed under the hood of SureChEMBL!   At the end of last year, we announced the integration of RDKit for compound depiction and various types of chemistry searches. But of course, we didn’t stop there. In line with our goal to simplify the service architecture, but also to improve the data quality, we’ve decided to follow the lead of our sister resource ChEMBL in how we manage compound structures.   What’s Changing? SureChEMBL handles compound structures at several stages in the pipeline. Regardless of how a compound is identified in a patent, the first step is to standardise its structure — and we’re now using the ChEMBL standardiser for this. Next, we register compounds using an RDKit-based hash , which helps us avoid introducing duplica...

SureChEMBL gets a facelift

    Dear SureChEMBL users, Over the past year, we’ve introduced several updates to the SureChEMBL platform, focusing on improving functionality while maintaining a clean and intuitive design. Even small changes can have a big impact on your experience, and our goal remains the same: to provide high-quality patent annotation with a simple, effective way to find the data you need. What’s Changed? After careful consideration, we’ve redesigned the landing page to make your navigation smoother and more intuitive. From top to bottom: - Announcements Section: Stay up to date with the latest news and updates directly from this blog. Never miss any update! - Enhanced Search Bar: The main search bar is still your go-to for text searches, still with three pre-filter radio buttons to quickly narrow your results without hassle. - Improved Query Assistant: Our query assistant has been redesigned and upgraded to help you craft more precise queries. It now includes five operator options: E...