Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Cross-references compound IDs across 20+ chemistry databases via the UniChem REST API, translating InChIKeys and source-specific IDs.
24% 100%+76 ptsof test cases passed
Passed 25 of 25 test cases with the skill, and 6 of 25 without it.
I need to retrieve the complete catalogue of available database sources from EBI's UniChem web service. Write a Python function that queries the catalogue endpoint and extracts each database's numeric ID and long name into a pandas DataFrame.
Sends an HTTP GET request to https://www.ebi.ac.uk/unichem/api/v1/sources.
3 of 3 safety checks passed
UniChem is a chemical structure cross-referencing service from EMBL-EBI that links compound records across 20+ public chemistry databases using InChI-based identifiers. It maps a single chemical entity to its corresponding IDs in ChEMBL, DrugBank, PubChem, ChEBI, PDB (RCSB and PDBe), SureChEMBL, HMDB, DrugCentral, BindingDB, and others. Access is via a free REST API at https://www.ebi.ac.uk/unichem/api/v1/ - no API key required. Important: every cross-reference query is sent as POST with a JSON body; only the catalogue endpoint GET /sources is implemented as a GET.
pip install requests pandas matplotlib
The UniChem /compounds endpoint is POST-only - GET returns 405 Method Not Allowed. Submit a JSON body {type: inchikey, compound: KEY} and read per-database hits from compounds[0][sources]. Each source record carries an id (numeric database ID) and a compoundId (the ID in that database).
import requests
UNICHEM_API = "https://www.ebi.ac.uk/unichem/api/v1"
Next to this one in the catalogue, plus more from the same author.