User Tools

Site Tools


api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
api [2021/06/18 11:55] – [Multiple queries exact search] flackapi [2021/09/15 07:18] – [Compound list details] flack
Line 345: Line 345:
 http 'https://mcule.com/api/v1/compound/MCULE-9380369173/prices/?amounts=15,20' "Authorization: Token <your_token>" --print HBhb http 'https://mcule.com/api/v1/compound/MCULE-9380369173/prices/?amounts=15,20' "Authorization: Token <your_token>" --print HBhb
 </code> </code>
 +
 +
 +===== Compound list details =====
 +
 +With this endpoint you can get compound details information for multiple compound mcule IDs in a single API call.
 +
 +== Endpoint: ==
 +<code>/compounds/</code>
 +
 +== Basic API request: ==
 +<code>
 +echo '{"mcule_ids": ["MCULE-7655747555","MCULE-5912414227"]}' | http https://mcule.com/api/v1/compounds/ "Authorization: Token <your_token>" --print HBhb
 +</code>
 +
 +
 +== Example API request: ==
 +<code>
 +echo '{"mcule_ids": ["MCULE-7655747555","MCULE-5912414227","MCULE-2570263241"], "price_amounts": [1,5,10], "components": true, "availability": true}' | http https://mcule.com/api/v1/compounds/ "Authorization: Token <your_token>" --print HBhb
 +</code>
 +
 +== Request: ==
 +<code>
 +POST /api/v1/compounds/ HTTP/1.1
 +Authorization: Token <your_token>
 +Content-Type: application/json
 +
 +{
 +    "availability": true,
 +    "components": true,
 +    "mcule_ids": [
 +        "MCULE-7655747555",
 +        "MCULE-5912414227",
 +        "MCULE-2570263241"
 +    ],
 +    "price_amounts": [
 +        1,
 +        5,
 +        10
 +    ]
 +}
 +</code>
 +
 +== Response: ==
 +<code>
 +HTTP/1.1 200 OK
 +Content-Type: application/json
 +
 +{
 +    "count": 3,
 +    "results": [
 +        {
 +            "mcule_id": "MCULE-7655747555",
 +            "smiles": "C1C=C(F)C=C(C2=NC=C(C#N)C=N2)C=1",
 +            "inchi_key": "ZXSZUCRVSWGKCX-UHFFFAOYSA-N",
 +            "best_prices": [],
 +            "mol": "\n  mcule   14092123302D\n\n 15 16  0  0  0  0  0  0  0  0999 V2000\n    8.1579    0.0000    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.7983    0.7849    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.7983    2.3549    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    8.1579    3.1400    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    9.5175    2.3549    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    9.5175    0.7849    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n   10.8773    3.1400    0.0000 F    0  0  0  0  0  0  0  0  0  0  0\n    5.4386    3.1400    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.0789    2.3549    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    2.7192    3.1400    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    2.7192    4.7100    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.0789    5.4950    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    5.4386    4.7100    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    1.3597    5.4950    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    0.0000    6.2800    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n  1  2  2  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  2  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  2  0  0  0  0\n  6  1  1  0  0  0  0\n  5  7  1  0  0  0  0\n  3  8  1  0  0  0  0\n  8  9  1  0  0  0  0\n  9 10  2  0  0  0  0\n 10 11  1  0  0  0  0\n 11 12  2  0  0  0  0\n 12 13  1  0  0  0  0\n 13  8  2  0  0  0  0\n 11 14  1  0  0  0  0\n 14 15  3  0  0  0  0\nM  END",
 +            "availability": {
 +                "confirmed_amount": null,
 +                "availability_type": "in stock",
 +                "confirmed_amount_unit": "mg"
 +            },
 +            "std_inchi": "InChI=1S/C11H6FN3/c12-10-3-1-2-9(4-10)11-14-6-8(5-13)7-15-11/h1-4,6-7H",
 +            "url": "https://mcule.com/MCULE-7655747555/",
 +            "properties": {
 +                "rotatable_bonds": 1,
 +                "h_bond_donors": 0,
 +                "logp": 2.15438,
 +                "r3_violations": 0,
 +                "ct_bonds": 0,
 +                "undef_stereocenters": 0,
 +                "stereocenters": 0,
 +                "rings": 2,
 +                "heavy_atoms": 15,
 +                "r5_violations": 0,
 +                "heteroatoms": 4,
 +                "hydrogens": 6,
 +                "unknown_ct_bonds": 0,
 +                "non_organic_atoms": 0,
 +                "psa": 49.57,
 +                "known_stereocenters": 0,
 +                "atoms": 21,
 +                "unknown_stereocenters": 0,
 +                "halogen_atoms": 1,
 +                "known_ct_bonds": 0,
 +                "h_bond_acceptors": 3,
 +                "refractivity": 52.141,
 +                "mol_mass": 199.183,
 +                "o_and_n_atoms": 3,
 +                "undef_ct_bonds": 0,
 +                "components": 1
 +            },
 +            "stereo_type": "none",
 +            "components": [],
 +            "formula": "C11H6FN3"
 +        },
 +        {
 +            "mcule_id": "MCULE-5912414227",
 +            "smiles": "CN1C(C2N(C(C3N=CC=C(C4CC4)C=3)=O)CCCCC2)=CC=C1",
 +            "inchi_key": "LIJVUQWKZXRMJJ-UHFFFAOYSA-N",
 +            "best_prices": [
 +                {
 +                    "currency": "USD",
 +                    "amount": 1,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 310,
 +                    "unit": "mg"
 +                },
 +                {
 +                    "currency": "USD",
 +                    "amount": 5,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 330,
 +                    "unit": "mg"
 +                },
 +                {
 +                    "currency": "USD",
 +                    "amount": 10,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 355,
 +                    "unit": "mg"
 +                }
 +            ],
 +            "mol": "\n  mcule   14092123302D\n\n 24 27  0  0  0  0  0  0  0  0999 V2000\n    8.4758    5.5126    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.6618    5.6478    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    7.2928    6.3856    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.4771    6.2627    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.3419    5.4488    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.0742    5.0687    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.1972    4.2529    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.9855    4.0098    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    8.2869    3.2418    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.8744    2.5274    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    7.0585    2.4043    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.4539    2.9656    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    6.5154    3.7883    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    5.8010    4.2008    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    5.8010    5.0258    0.0000 O    0  0  0  0  0  0  0  0  0  0  0\n    5.0866    3.7883    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    5.0866    2.9632    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.3721    2.5507    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.6576    2.9632    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.6576    3.7883    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.3721    4.2008    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    4.3721    1.7257    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.7845    1.0113    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.9596    1.0113    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  2  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  2  0  0  0  0\n  2  6  1  0  0  0  0\n  6  7  1  0  0  0  0\n  7  8  1  0  0  0  0\n  8  9  1  0  0  0  0\n  9 10  1  0  0  0  0\n 10 11  1  0  0  0  0\n 11 12  1  0  0  0  0\n 12 13  1  0  0  0  0\n  7 13  1  0  0  0  0\n 13 14  1  0  0  0  0\n 14 15  2  0  0  0  0\n 14 16  1  0  0  0  0\n 16 17  2  0  0  0  0\n 17 18  1  0  0  0  0\n 18 19  2  0  0  0  0\n 19 20  1  0  0  0  0\n 20 21  2  0  0  0  0\n 16 21  1  0  0  0  0\n 18 22  1  0  0  0  0\n 22 23  1  0  0  0  0\n 23 24  1  0  0  0  0\n 22 24  1  0  0  0  0\nM  END",
 +            "availability": {
 +                "confirmed_amount": null,
 +                "availability_type": "potentially purchasable",
 +                "confirmed_amount_unit": "mg"
 +            },
 +            "std_inchi": "InChI=1S/C20H25N3O/c1-22-12-5-7-18(22)19-6-3-2-4-13-23(19)20(24)17-14-16(10-11-21-17)15-8-9-15/h5,7,10-12,14-15,19H,2-4,6,8-9,13H2,1H3",
 +            "url": "https://mcule.com/MCULE-5912414227/",
 +            "properties": {
 +                "rotatable_bonds": 4,
 +                "h_bond_donors": 0,
 +                "logp": 3.9929,
 +                "r3_violations": 4,
 +                "ct_bonds": 0,
 +                "undef_stereocenters": 1,
 +                "stereocenters": 1,
 +                "rings": 4,
 +                "heavy_atoms": 24,
 +                "r5_violations": 0,
 +                "heteroatoms": 4,
 +                "hydrogens": 25,
 +                "unknown_ct_bonds": 0,
 +                "non_organic_atoms": 0,
 +                "psa": 38.13,
 +                "known_stereocenters": 0,
 +                "atoms": 49,
 +                "unknown_stereocenters": 0,
 +                "halogen_atoms": 0,
 +                "known_ct_bonds": 0,
 +                "h_bond_acceptors": 4,
 +                "refractivity": 99.3685,
 +                "mol_mass": 323.431,
 +                "o_and_n_atoms": 4,
 +                "undef_ct_bonds": 0,
 +                "components": 1
 +            },
 +            "stereo_type": "absolute",
 +            "components": [],
 +            "formula": "C20H25N3O"
 +        },
 +        {
 +            "mcule_id": "MCULE-2570263241",
 +            "smiles": "CN1C(C2N(C(C3=C4C(NN=C4)=NC=C3)=O)CCCCC2)=CC=C1",
 +            "inchi_key": "MIRPCBGHLNQNNH-UHFFFAOYSA-N",
 +            "best_prices": [
 +                {
 +                    "currency": "USD",
 +                    "amount": 1,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 310,
 +                    "unit": "mg"
 +                },
 +                {
 +                    "currency": "USD",
 +                    "amount": 5,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 330,
 +                    "unit": "mg"
 +                },
 +                {
 +                    "currency": "USD",
 +                    "amount": 10,
 +                    "purity": 90,
 +                    "delivery_time_working_days": 30,
 +                    "price": 355,
 +                    "unit": "mg"
 +                }
 +            ],
 +            "mol": "\n  mcule   14092123302D\n\n 24 27  0  0  0  0  0  0  0  0999 V2000\n    3.0777    5.0348    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.6016    4.3976    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    4.4252    4.4469    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.7266    3.6789    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    4.0893    3.1549    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.3941    3.5991    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    2.6261    3.2977    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    2.0213    3.8587    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    1.2056    3.7359    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    0.7931    3.0214    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    1.0945    2.2533    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    1.8828    2.0103    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    2.5645    2.4749    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    3.2789    2.0625    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.9934    2.4749    0.0000 O    0  0  0  0  0  0  0  0  0  0  0\n    3.2789    1.2374    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.9934    0.8250    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.9934   -0.0001    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.2789   -0.4125    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    2.5645   -0.0001    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    1.7798   -0.2549    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    1.2949    0.4125    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    1.7798    1.0798    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    2.5645    0.8250    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  2  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  2  0  0  0  0\n  2  6  1  0  0  0  0\n  6  7  1  0  0  0  0\n  7  8  1  0  0  0  0\n  8  9  1  0  0  0  0\n  9 10  1  0  0  0  0\n 10 11  1  0  0  0  0\n 11 12  1  0  0  0  0\n 12 13  1  0  0  0  0\n  7 13  1  0  0  0  0\n 13 14  1  0  0  0  0\n 14 15  2  0  0  0  0\n 14 16  1  0  0  0  0\n 16 17  1  0  0  0  0\n 17 18  2  0  0  0  0\n 18 19  1  0  0  0  0\n 19 20  2  0  0  0  0\n 20 21  1  0  0  0  0\n 21 22  1  0  0  0  0\n 22 23  2  0  0  0  0\n 23 24  1  0  0  0  0\n 16 24  2  0  0  0  0\n 20 24  1  0  0  0  0\nM  END",
 +            "availability": {
 +                "confirmed_amount": null,
 +                "availability_type": "potentially purchasable",
 +                "confirmed_amount_unit": "mg"
 +            },
 +            "std_inchi": "InChI=1S/C18H21N5O/c1-22-10-5-7-15(22)16-6-3-2-4-11-23(16)18(24)13-8-9-19-17-14(13)12-20-21-17/h5,7-10,12,16H,2-4,6,11H2,1H3,(H,19,20,21)",
 +            "url": "https://mcule.com/MCULE-2570263241/",
 +            "properties": {
 +                "rotatable_bonds": 3,
 +                "h_bond_donors": 1,
 +                "logp": 2.9918,
 +                "r3_violations": 3,
 +                "ct_bonds": 0,
 +                "undef_stereocenters": 1,
 +                "stereocenters": 1,
 +                "rings": 4,
 +                "heavy_atoms": 24,
 +                "r5_violations": 0,
 +                "heteroatoms": 6,
 +                "hydrogens": 21,
 +                "unknown_ct_bonds": 0,
 +                "non_organic_atoms": 0,
 +                "psa": 66.81,
 +                "known_stereocenters": 0,
 +                "atoms": 45,
 +                "unknown_stereocenters": 0,
 +                "halogen_atoms": 0,
 +                "known_ct_bonds": 0,
 +                "h_bond_acceptors": 6,
 +                "refractivity": 96.5542,
 +                "mol_mass": 323.392,
 +                "o_and_n_atoms": 6,
 +                "undef_ct_bonds": 0,
 +                "components": 1
 +            },
 +            "stereo_type": "absolute",
 +            "components": [],
 +            "formula": "C18H21N5O"
 +        }
 +    ]
 +}
 +</code>
 +
 +Fields:
 +  * **mcule_ids**: Required. List of mcule IDs. Only compound level mcule IDs are accepted, e.g.: MCULE-7655747555. Mcule IDs that represent other [[structurelevels|structure levels]] (e.g. MCULE-7655747555-0, MCULE-7655747555-0-0, P-611592727) are not accepted.
 +  * **availability**: Optional. Default: false. Whether to return availability information in the response. If you don't need this information you can set it to false (or just leave it out from the request) in order to get a quicker response. Collecting this information can take some time. 
 +  * **components**: Optional. Default: true. Whether to return components information in the response in case the compound has multiple components. If you don't need this information you can set it to false in order to get a slightly quicker response. 
 +  * **price_amounts**: Optional. Default: None. List of amounts (in mg) to return best prices for. Please note that collecting pricing information is an expensive operation.
 +
 +Limits:
 +  * **mcule_ids**: The size of this list is limited to 500. If you specify the **price_amounts** field the limit is reduced to 100 since collecting pricing information is an expensive operation.
 +  * **price_amounts**: The size of this list is limited to 5. 
 +
  
  
api.txt · Last modified: 2023/06/03 07:19 by flack