Comment on page
Sources
Detail information from the sources, where our compound references are pointing to, can be access programatically through our web services:
- Single source:
https://www.ebi.ac.uk/unichem/api/v1/sources/{source_id}
- All sources:
https://www.ebi.ac.uk/unichem/api/v1/sources/
Every source is assigned a unique numeric identifier in our database, with this ID a single source details can be fetch.
A GET call to /sources/{source_id} where {source_id} is the unique identifier for that source.

Example of get source
Curl
Python
curl --request GET \
--url https://www.ebi.ac.uk/unichem/api/v1/sources/1
import requests
url = "https://www.ebi.ac.uk/unichem/api/v1/sources/1"
payload = ""
response = requests.request("GET", url, data=payload)
print(response.text)
An array of all the sources in our database can be fetch using GET to /sources.

All sources example call
Curl
Python
curl --request GET \
--url https://www.ebi.ac.uk/unichem/api/v1/sources
import requests
url = "https://www.ebi.ac.uk/unichem/api/v1/sources"
payload = ""
response = requests.request("GET", url, data=payload)
print(response.text)
Last modified 1yr ago