UniChem 2.0
New Unichem 2.0 Docs
  • Introduction
  • What's new?
  • Web application
    • Compound Sources Search
    • Connectivity Search
    • Similarity Search
    • Query field requirements
  • API
    • Sources
    • Compound Search
    • Connectivity Search
    • Legacy
  • Downloads
  • Submission of data to UniChem
    • Reasons for data omission
  • Getting in touch
  • Citing UniChem
  • FAQs
  • Definitions
    • What is an Assignment?
    • What is meant by a 'src_id' and a 'src_compound_id' in UniChem ?
    • Glossary of Terms
  • Data protection: Privacy notice for UniChem's public website
Powered by GitBook
On this page
  • Single Source
  • All Sources

Was this helpful?

  1. API

Sources

PreviousAPINextCompound Search

Last updated 2 years ago

Was this helpful?

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/

Single Source

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.

Simple usage example

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)

All Sources

An array of all the sources in our database can be fetch using GET to /sources.

Simple usage example

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)

Detail information on the response payload and usage .

Detail information on the response payload and usage .

here
here
Example of get source
All sources example call