Chemspace API: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 44: | Line 44: | ||
-H "Content-Type: multipart/form-data" \ | -H "Content-Type: multipart/form-data" \ | ||
-F "SMILES=CC(N)=O" | -F "SMILES=CC(N)=O" | ||
=== By Compound ID === | |||
It can look up by | |||
* CSMB00000000001 - Chemspace ID | |||
* CSC000000065 - old Chemspace ID | |||
* 60-35-5 - CAS | |||
* MFCD06217521 - MFCD | |||
* CSC1=NN=NN1C - SMILES | |||
* BBV-32027078 - vendor ID | |||
Example: | |||
curl -X POST \ | |||
"https://api.chem-space.com/v3/search/text?count=3&page=2&categories=CSMB" \ | |||
-H "Accept: application/json; version=3.1" \ | |||
-H "Authorization: Bearer <access_token>" \ | |||
-H "Content-Type: multipart/form-data" \ | |||
-F "query=CSMB00000000001, CSC000000065, 60-35-5, MFCD06217521, CSC1=NN=NN1C, BBV-32027078" |
Revision as of 22:50, 12 April 2022
This is a quick guide on how to use Chemspace API to get pricing information. Link to Chem-space's API https://api.chem-space.com/docs/
Email info@chem-space.com to obtain API Key
Get Access Token
Now that you have obtained the access token. You will use the command below to get the API Key (please replace <API Key> with your own API Key)
curl -X GET \ "https://api.chem-space.com/auth/token" \ -H "Accept: application/json" \ -H "Authorization: Bearer <API Key>" * Output will look like this {"access_token":"<access_token>", "expires_in":3600, "api_key":"<API Key>" }
Search
Here is a list of catalogs searchable on Chem-Space and their identifiers. You can look up more than one catalogs by specified them under categories argument separated by comma
CSSS (In-stock Screening Compounds) CSMS (Make-On-Demand Screening Compounds) CSSB (In-Stock Building Blocks) CSMB (Make-On-Demand Building Blocks)
By Exact Smiles
Example:
curl -X POST \ "https://api.chem-space.com/v3/search/exact?count=3&page=1&categories=CSCS,CSMB" \ -H "Accept: application/json; version=3.1" \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: multipart/form-data" \ -F "SMILES=CC(N)=O"
By Substructure
Example:
curl -X POST \ "https://api.chem-space.com/v3/search/sub?count=3&page=18&categories=CSSB,CSCS" \ -H "Accept: application/json; version=3.1" \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: multipart/form-data" \ -F "SMILES=CC(N)=O"
By Similarity
Example:
curl -X POST \ "https://api.chem-space.com/v3/search/sim?count=2&page=6&categories=CSSS,CSMS" \ -H "Accept: application/json; version=3.1" \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: multipart/form-data" \ -F "SMILES=CC(N)=O"
By Compound ID
It can look up by
- CSMB00000000001 - Chemspace ID
- CSC000000065 - old Chemspace ID
- 60-35-5 - CAS
- MFCD06217521 - MFCD
- CSC1=NN=NN1C - SMILES
- BBV-32027078 - vendor ID
Example: curl -X POST \ "https://api.chem-space.com/v3/search/text?count=3&page=2&categories=CSMB" \ -H "Accept: application/json; version=3.1" \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: multipart/form-data" \ -F "query=CSMB00000000001, CSC000000065, 60-35-5, MFCD06217521, CSC1=NN=NN1C, BBV-32027078"