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 [2017/12/05 13:38] flackapi [2017/12/05 23:45] flack
Line 40: Line 40:
 Content-Type: application/json Content-Type: application/json
  
-[ +{ 
-    { +    "count": 2,  
-        "created": "2015-05-18", +    "next": null,  
-        "description": "Gzipped 2D SDF of all purchasable compounds", +    "previous": null 
-        "download_size_gb": 2.2+    "results": [ 
-        "download_url": "https://mcule.s3.amazonaws.com/mcule_purchasable_compounds_150518.sdf.gz", +        
-        "entry_count": 11695894, +            "description": "All purchasable, in stock & virtual compounds",  
-        "name": "mcule_purchasable_compounds" +            "entry_count": 35772718,  
-    }+            "files":
-    { +                { 
-        "created": "2015-05-18", +                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_full_170918.sdf.gz",  
-        "description": "Gzipped 2D SDF of in stock compounds with known or unknown exact stock amount", +                    "file_type": "sdf.gz",  
-        "download_size_gb": 1.4+                    "file_type_display": "2D SDF (sdf.gz)",  
-        "download_url": "https://mcule.s3.amazonaws.com/mcule_in_stock_compounds_150518.sdf.gz", +                    "size_mb": 5762 
-        "entry_count": 5827052+                },  
-        "name": "mcule_in_stock_compounds+                { 
-    }, +                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_full_170918.smiles.gz",  
-    { +                    "file_type": "smiles.gz",  
-        "created": "2015-05-18", +                    "file_type_display": "SMILES (smi.gz)" 
-        "description": "Gzipped 2D SDF of in stock compounds with known exact stock amount", +                    "size_mb": 462 
-        "download_size_gb": 1.2+                } 
-        "download_url": "https://mcule.s3.amazonaws.com/mcule_known_stock_amount_compounds_150518.sdf.gz", +            ],  
-        "entry_count": 4922295, +            "last_updated": "2017-09-18",  
-        "name": "mcule_known_stock_amount_compounds" +            "name": "Mcule Purchasable (full)" 
-    }+        },  
-    { +        { 
-        "created": "2015-08-20", +            "description": "All purchasable, in stock compounds",  
-        "description": "Gzipped 2D SDF of purchasable compounds with known prices", +            "entry_count": 5648837,  
-        "download_size_gb": 2.2+            "files":
-        "download_url": "https://mcule.s3.amazonaws.com/mcule_instant_quotable_compounds_150820.sdf.gz", +                { 
-        "entry_count": 11533450, +                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_in_stock_170918.sdf.gz",  
-        "name": "mcule_instant_quotable_compounds" +                    "file_type": "sdf.gz",  
-    }+                    "file_type_display": "2D SDF (sdf.gz)",  
-    { +                    "size_mb": 1311 
-        "created": "2014-07-21", +                },  
-        "description": "Gzipped csv (delimiter: tabof all compounds with mcule ID, standard InChI and InChIKey", +                { 
-        "download_size_gb": 0.4+                    "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_in_stock_170918.smiles.gz",  
-        "download_url": "https://mcule.s3.amazonaws.com/mcule_inchies_140721.csv.gz", +                    "file_type": "smiles.gz",  
-        "entry_count": 7334938, +                    "file_type_display": "SMILES (smi.gz)",  
-        "name": "mcule_inchies+                    "size_mb": 84 
-    +                } 
-]+            ],  
 +            "last_updated": "2017-09-18",  
 +            "name": "Mcule Purchasable (in stock)
 +        
 +    ] 
 +}
 </code> </code>
  
Line 145: Line 150:
     "std_inchi": "InChI=1S/C15H11N3O2S2/c1-20-15(19)12-9-17-13(22-12)6-5-10-8-18-14(21-10)11-4-2-3-7-16-11/h2-9H,1H3",      "std_inchi": "InChI=1S/C15H11N3O2S2/c1-20-15(19)12-9-17-13(22-12)6-5-10-8-18-14(21-10)11-4-2-3-7-16-11/h2-9H,1H3", 
     "stereo_type": "none",      "stereo_type": "none", 
-    "url": "http://mcule.com/MCULE-9380369173/"+    "url": "https://mcule.com/MCULE-9380369173/" 
 +
 +</code> 
 + 
 +===== InChIKey lookup ===== 
 +== Endpoint: == 
 +<code>/lookup/<inchi_key></code> 
 + 
 +== Example API request: == 
 +<code> 
 +http https://mcule.com/api/v1/lookup/inchikey/WVRLGAPZMSKMGL-UHFFFAOYSA-N --print HBhb 
 +</code> 
 + 
 +== Request: == 
 +<code> 
 +GET /api/v1/lookup/inchikey/WVRLGAPZMSKMGL-UHFFFAOYSA-N HTTP/1.1 
 +Accept: */* 
 +Accept-Encoding: gzip, deflate 
 +</code> 
 + 
 +== Response: == 
 +<code> 
 +HTTP/1.1 200 OK 
 +Allow: GET, HEAD, OPTIONS 
 +Content-Encoding: gzip 
 +Content-Type: application/json 
 + 
 +
 +    "results":
 +        { 
 +            "mcule_id": "MCULE-9380369173",  
 +            "smiles": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O",  
 +            "url": "https://mcule.com/MCULE-9380369173/" 
 +        } 
 +    ] 
 +
 +</code> 
 + 
 + 
 +===== Single query search / lookup ===== 
 +== Endpoint: == 
 +<code>/search/lookup/?query=<your_query></code> 
 + 
 +Where the query can be an mcule ID, SMILES, InChI or InChIKey identifier. 
 + 
 +== Example API request: == 
 +<code> 
 +http 'https://mcule.com/api/v1/search/lookup/?query=COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O' --print HBhb 
 +</code> 
 + 
 +== Request: == 
 +<code> 
 +GET /api/v1/search/lookup/?query=COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O HTTP/1.1 
 +Accept: */* 
 +Accept-Encoding: gzip, deflate 
 +</code> 
 + 
 +== Response: == 
 +<code> 
 +HTTP/1.1 200 OK 
 +Allow: GET, HEAD, OPTIONS 
 +Content-Encoding: gzip 
 +Content-Type: application/json 
 + 
 +
 +    "results":
 +        { 
 +            "mcule_id": "MCULE-9380369173",  
 +            "smiles": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O",  
 +            "url": "https://mcule.com/MCULE-9380369173/" 
 +        } 
 +    ]
 } }
 </code> </code>
Line 302: Line 378:
             "mcule_id": "MCULE-9380369173",              "mcule_id": "MCULE-9380369173", 
             "smiles": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O",              "smiles": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O", 
-            "url": "http://mcule.com/MCULE-9380369173/"+            "url": "https://mcule.com/MCULE-9380369173/"
         },          }, 
         {         {
Line 308: Line 384:
             "mcule_id": "MCULE-4016901520",              "mcule_id": "MCULE-4016901520", 
             "smiles": "CC1=C(C(N2CC3C(CCC3N)C2)=O)SC(CC2=CC=CC=C2)=N1",              "smiles": "CC1=C(C(N2CC3C(CCC3N)C2)=O)SC(CC2=CC=CC=C2)=N1", 
-            "url": "http://mcule.com/MCULE-4016901520/"+            "url": "https://mcule.com/MCULE-4016901520/"
         },          }, 
         {         {
Line 314: Line 390:
             "mcule_id": "MCULE-7428195288",              "mcule_id": "MCULE-7428195288", 
             "smiles": "C1([C@H](C(C)C)NC(CCCC[C@H]2CCSS2)=O)NC2=C(C=CC=C2)N=1",              "smiles": "C1([C@H](C(C)C)NC(CCCC[C@H]2CCSS2)=O)NC2=C(C=CC=C2)N=1", 
-            "url": "http://mcule.com/MCULE-7428195288/"+            "url": "https://mcule.com/MCULE-7428195288/"
         },          }, 
         {         {
Line 320: Line 396:
             "mcule_id": "MCULE-1259420189",              "mcule_id": "MCULE-1259420189", 
             "smiles": "CCCCC1=CC=C(CC(N(CC2CCN(C)CC2)C)=O)C=C1",              "smiles": "CCCCC1=CC=C(CC(N(CC2CCN(C)CC2)C)=O)C=C1", 
-            "url": "http://mcule.com/MCULE-1259420189/"+            "url": "https://mcule.com/MCULE-1259420189/"
         }         }
     ]     ]
Line 372: Line 448:
             "mcule_id": "MCULE-9380369173",              "mcule_id": "MCULE-9380369173", 
             "smiles": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O",              "smiles": "COC(C1SC(C=CC2SC(C3=NC=CC=C3)=NC=2)=NC=1)=O", 
-            "url": "http://mcule.com/MCULE-9380369173/"+            "url": "https://mcule.com/MCULE-9380369173/"
         },          }, 
         {         {
Line 383: Line 459:
             "mcule_id": "MCULE-4016901520",              "mcule_id": "MCULE-4016901520", 
             "smiles": "CC1=C(C(N2CC3C(CCC3N)C2)=O)SC(CC2=CC=CC=C2)=N1",              "smiles": "CC1=C(C(N2CC3C(CCC3N)C2)=O)SC(CC2=CC=CC=C2)=N1", 
-            "url": "http://mcule.com/MCULE-4016901520/"+            "url": "https://mcule.com/MCULE-4016901520/"
         },          }, 
         {         {
Line 394: Line 470:
             "mcule_id": "MCULE-7428195288",              "mcule_id": "MCULE-7428195288", 
             "smiles": "C1([C@H](C(C)C)NC(CCCC[C@H]2CCSS2)=O)NC2=C(C=CC=C2)N=1",              "smiles": "C1([C@H](C(C)C)NC(CCCC[C@H]2CCSS2)=O)NC2=C(C=CC=C2)N=1", 
-            "url": "http://mcule.com/MCULE-7428195288/"+            "url": "https://mcule.com/MCULE-7428195288/"
         },          }, 
         {         {
Line 405: Line 481:
             "mcule_id": "MCULE-1259420189",              "mcule_id": "MCULE-1259420189", 
             "smiles": "CCCCC1=CC=C(CC(N(CC2CCN(C)CC2)C)=O)C=C1",              "smiles": "CCCCC1=CC=C(CC(N(CC2CCN(C)CC2)C)=O)C=C1", 
-            "url": "http://mcule.com/MCULE-1259420189/"+            "url": "https://mcule.com/MCULE-1259420189/"
         }         }
     ]     ]
  
 </code> </code>
api.txt · Last modified: 2024/05/10 08:12 by bkovats