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:34] flack
Line 42: Line 42:
 [ [
     {     {
-        "created": "2015-05-18", +        "description": "All purchasable, in stock & virtual compounds",  
-        "description": "Gzipped 2D SDF of all purchasable compounds", +        "entry_count": 35772718,  
-        "download_size_gb": 2.2+        "files":
-        "download_url": "https://mcule.s3.amazonaws.com/mcule_purchasable_compounds_150518.sdf.gz", +            { 
-        "entry_count": 11695894+                "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_full_170918.sdf.gz",  
-        "name": "mcule_purchasable_compounds+                "file_type": "sdf.gz",  
-    },+                "file_type_display": "2D SDF (sdf.gz)",  
 +                "size_mb": 5762 
 +            },  
 +            { 
 +                "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_full_170918.smiles.gz",  
 +                "file_type": "smiles.gz",  
 +                "file_type_display": "SMILES (smi.gz)",  
 +                "size_mb": 462 
 +            } 
 +        ],  
 +        "last_updated": "2017-09-18",  
 +        "name": "Mcule Purchasable (full)
 +    }, 
     {     {
-        "created": "2015-05-18", +        "description": "All purchasable, in stock compounds",  
-        "description": "Gzipped 2D SDF of in stock compounds with known or unknown exact stock amount", +        "entry_count": 5648837,  
-        "download_size_gb": 1.4+        "files":
-        "download_url": "https://mcule.s3.amazonaws.com/mcule_in_stock_compounds_150518.sdf.gz", +            { 
-        "entry_count": 5827052, +                "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_in_stock_170918.sdf.gz",  
-        "name": "mcule_in_stock_compounds" +                "file_type": "sdf.gz",  
-    }+                "file_type_display": "2D SDF (sdf.gz)",  
-    { +                "size_mb": 1311 
-        "created": "2015-05-18", +            },  
-        "description": "Gzipped 2D SDF of in stock compounds with known exact stock amount", +            
-        "download_size_gb": 1.2, +                "download_url": "https://mcule.s3.amazonaws.com/database/mcule_purchasable_in_stock_170918.smiles.gz",  
-        "download_url": "https://mcule.s3.amazonaws.com/mcule_known_stock_amount_compounds_150518.sdf.gz", +                "file_type": "smiles.gz",  
-        "entry_count": 4922295, +                "file_type_display": "SMILES (smi.gz)",  
-        "name": "mcule_known_stock_amount_compounds" +                "size_mb": 84 
-    }, +            } 
-    +        ],  
-        "created": "2015-08-20", +        "last_updated": "2017-09-18",  
-        "description": "Gzipped 2D SDF of purchasable compounds with known prices", +        "name": "Mcule Purchasable (in stock)
-        "download_size_gb": 2.2, +    }
-        "download_url": "https://mcule.s3.amazonaws.com/mcule_instant_quotable_compounds_150820.sdf.gz", +
-        "entry_count": 11533450, +
-        "name": "mcule_instant_quotable_compounds" +
-    }+
-    { +
-        "created": "2014-07-21", +
-        "description": "Gzipped csv (delimiter: tab) of all compounds with mcule ID, standard InChI and InChIKey", +
-        "download_size_gb": 0.4+
-        "download_url": "https://mcule.s3.amazonaws.com/mcule_inchies_140721.csv.gz"+
-        "entry_count": 7334938+
-        "name": "mcule_inchies+
-    }+
 ] ]
 </code> </code>
Line 145: Line 145:
     "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 373:
             "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 379:
             "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 385:
             "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 391:
             "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 443:
             "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 454:
             "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 465:
             "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 476:
             "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