Search by InChIKey
POST
/inchikey
Headers
Name
Value
Content-Type
application/json
Body
Name
Type
Description
InChIKey
string
27-character hash code derived from an InChI (complete or partial)
limit
integer
Optional parameter that specifies how many results should be returned. Valid values range from 1 to 100. Defaults to 10.
GraphQL schema
query ByInChIKey ($inchikey: String!, $limit: Int = 10) {
molecules (InChIKey: $inchikey, limit: $limit) { # Here described fields to include in the response
CID
IUPAC
SMILES
InChI
InChIKey
synonyms
}
}
Response
OK response from API:
{
"molecules": [
{
"CID": 39912,
"IUPAC": "(2S)-2-[4-(2-methylpropyl)phenyl]propanoic acid",
"SMILES": "C[C@@H](C1=CC=C(C=C1)CC(C)C)C(=O)O",
"InChI": "InChI=1S/C13H18O2/c1-9(2)8-11-4-6-12(7-5-11)10(3)13(14)15/h4-7,9-10H,8H2,1-3H3,(H,14,15)/t10-/m0/s1",
"InChIKey": "HEFNNWSXXWATRW-JTQLQIEISA-N",
"synonyms": [
"(S)-(+)-Ibuprofen",
...
]
},
...
]
}
Requests example
import requests
payload = {
"query": """query ByInChIKey ($inchikey: String!, $limit: Int = 10) {
molecules (InChIKey: $inchi_key, limit: $limit) {
CID
IUPAC
SMILES
InChI
InChIKey
synonyms
}
}""",
"variables": {"inchikey": "HEFNNWSXXWATRW-JTQLQIEISA-N"}
}
resp = requests.post(
url=API_URL,
json=payload,
)
print(resp.json())
Last updated