API reference
Science lookups
Live science lookups (PubChem, ChEMBL, Open Targets, UniProt, RCSB PDB) with source attribution on every result. Structures (SMILES, InChI) are sent to these sources only for API keys created with allow_structure_search.
On this page
Resolve compound names with PubChem
POST/api/v1/lookup/pubchem
API key or token
SMILES, CID and title for up to 20 compound names. Only the names are sent; a SMILES or InChI given as a name returns structure_egress_not_allowed and is not sent.
Request body
application/json · PubchemLookupRequest
| Field | Type | Description |
|---|---|---|
names[]required | string[] | Up to 20 compound names (each 1-100 characters). Limits: |
Example request
curl -X POST "https://api.cognichem.com/api/v1/lookup/pubchem" \
-H "X-Api-Key: $COGNICHEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"names": [
"aspirin"
]
}'from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.lookup.pubchem(["aspirin"])
print(result)Python SDK pip install cognichem-client (1.1 or later). from_env() reads COGNICHEM_API_KEY.
Responses
Successful Response · application/json · PubchemLookupResponse
| Field | Type | Description |
|---|---|---|
attributionrequired | string | |
compounds[]required | CompoundItem[] | |
compounds.cid | integer | null | |
compounds.licenserequired | string | |
compounds.namerequired | string | |
compounds.other_cids[] | integer[] | null | |
compounds.smiles | string | null | |
compounds.source | string | Default: |
compounds.statusrequired | string | One of: |
compounds.title | string | null | |
compounds.url | string | null |
{
"attribution": "Data from PubChem (NCBI), ...",
"compounds": [
{
"cid": 2244,
"license": "Public domain (NCBI); ...",
"name": "aspirin",
"smiles": "CC(=O)OC1=CC=CC=C1C(=O)O",
"source": "PubChem",
"status": "found",
"title": "Aspirin",
"url": "https://pubchem.ncbi.nlm.nih.gov/compound/2244"
}
]
}Errors are RFC 7807 problem details (application/problem+json) with status, title, detail, request_id, and a retryability hint (validation, auth, quota, conflict, upstream, timeout, or terminal). Handling errors
| Status | When |
|---|---|
400 | Invalid input or business rule violation. |
401 | Missing or invalid credentials. |
402 | Wallet cannot cover the Assistant turn hold. |
403 | Authenticated but not allowed to access the resource. |
404 | Resource not found or not owned by the user. |
409 | Conflict (e.g. idempotency key reuse with a different body). |
413 | Request body or workflow spec exceeds size caps. |
422 | Request body or query failed validation. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
503 | This source is disabled on the server (base URL unset). |
Look up ChEMBL molecules, targets and activities
POST/api/v1/lookup/chembl
API key or token
molecule / target / *_activities send only IDs and names. similarity / substructure send SMILES only for an API key with allow_structure_search on; otherwise every item returns structure_egress_not_allowed and nothing is sent.
Request body
application/json · ChemblLookupRequest
| Field | Type | Description |
|---|---|---|
limit | integer | null | Rows per query (default 10). Limits: |
operationrequired | string | One of: |
queries[]required | string[] | IDs or names (<= 100 characters); SMILES (<= 500) for similarity / substructure, which run only for keys with allow_structure_search. Limits: |
threshold | integer | null | similarity only: percent (70). Limits: |
Example request
curl -X POST "https://api.cognichem.com/api/v1/lookup/chembl" \
-H "X-Api-Key: $COGNICHEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 5,
"operation": "molecule",
"queries": [
"CHEMBL25"
]
}'from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.lookup.chembl("molecule", ["CHEMBL25"])
print(result)Python SDK pip install cognichem-client (1.1 or later). from_env() reads COGNICHEM_API_KEY.
Responses
Successful Response · application/json · LookupResponse
| Field | Type | Description |
|---|---|---|
attributionrequired | string | |
results[]required | LookupItem[] | |
results.data | any | |
results.licenserequired | string | |
results.operationrequired | string | |
results.query | string | null | |
results.record_id | string | null | |
results.release | string | null | |
results.sourcerequired | string | |
results.statusrequired | string | One of: |
results.title | string | null | |
results.url | string | null |
{
"attribution": "Data from ChEMBL (EMBL-EBI), CC BY-SA 3.0 Unported. ...",
"results": [
{
"data": {
"smiles": "CC(=O)Oc1ccccc1C(=O)O"
},
"license": "CC BY-SA 3.0",
"operation": "molecule",
"query": "CHEMBL25",
"record_id": "CHEMBL25",
"release": "ChEMBL_35",
"source": "ChEMBL",
"status": "found",
"title": "ASPIRIN",
"url": "https://www.ebi.ac.uk/chembl/explore/compound/CHEMBL25"
}
]
}Errors are RFC 7807 problem details (application/problem+json) with status, title, detail, request_id, and a retryability hint (validation, auth, quota, conflict, upstream, timeout, or terminal). Handling errors
| Status | When |
|---|---|
400 | Invalid input or business rule violation. |
401 | Missing or invalid credentials. |
402 | Wallet cannot cover the Assistant turn hold. |
403 | Authenticated but not allowed to access the resource. |
404 | Resource not found or not owned by the user. |
409 | Conflict (e.g. idempotency key reuse with a different body). |
413 | Request body or workflow spec exceeds size caps. |
422 | Request body or query failed validation. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
503 | This source is disabled on the server (base URL unset). |
Look up Open Targets associations and drugs
POST/api/v1/lookup/targets
API key or token
Target-disease associations and drugs by gene symbol, Ensembl or EFO ID.
Request body
application/json · TargetsLookupRequest
| Field | Type | Description |
|---|---|---|
limit | integer | null | Rows per query (default 10). Limits: |
operationrequired | string | One of: |
queries[]required | string[] | Up to 20 IDs or names (each 1-100 characters). Limits: |
Example request
curl -X POST "https://api.cognichem.com/api/v1/lookup/targets" \
-H "X-Api-Key: $COGNICHEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "target_diseases",
"queries": [
"EGFR"
]
}'from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.lookup.targets("target_diseases", ["EGFR"])
print(result)Python SDK pip install cognichem-client (1.1 or later). from_env() reads COGNICHEM_API_KEY.
Responses
Successful Response · application/json · LookupResponse
| Field | Type | Description |
|---|---|---|
attributionrequired | string | |
results[]required | LookupItem[] | |
results.data | any | |
results.licenserequired | string | |
results.operationrequired | string | |
results.query | string | null | |
results.record_id | string | null | |
results.release | string | null | |
results.sourcerequired | string | |
results.statusrequired | string | One of: |
results.title | string | null | |
results.url | string | null |
{
"attribution": "Data from ChEMBL (EMBL-EBI), CC BY-SA 3.0 Unported. ...",
"results": [
{
"data": {
"smiles": "CC(=O)Oc1ccccc1C(=O)O"
},
"license": "CC BY-SA 3.0",
"operation": "molecule",
"query": "CHEMBL25",
"record_id": "CHEMBL25",
"release": "ChEMBL_35",
"source": "ChEMBL",
"status": "found",
"title": "ASPIRIN",
"url": "https://www.ebi.ac.uk/chembl/explore/compound/CHEMBL25"
}
]
}Errors are RFC 7807 problem details (application/problem+json) with status, title, detail, request_id, and a retryability hint (validation, auth, quota, conflict, upstream, timeout, or terminal). Handling errors
| Status | When |
|---|---|
400 | Invalid input or business rule violation. |
401 | Missing or invalid credentials. |
402 | Wallet cannot cover the Assistant turn hold. |
403 | Authenticated but not allowed to access the resource. |
404 | Resource not found or not owned by the user. |
409 | Conflict (e.g. idempotency key reuse with a different body). |
413 | Request body or workflow spec exceeds size caps. |
422 | Request body or query failed validation. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
503 | This source is disabled on the server (base URL unset). |
Look up UniProtKB entries
POST/api/v1/lookup/uniprot
API key or token
UniProtKB entries by accession, or search by gene / protein name.
Request body
application/json · UniprotLookupRequest
| Field | Type | Description |
|---|---|---|
operationrequired | string | One of: |
organism | string | null | search only: organism name or NCBI taxon ID (9606 = human). Limits: |
queries[]required | string[] | Up to 20 IDs or names (each 1-100 characters). Limits: |
Example request
curl -X POST "https://api.cognichem.com/api/v1/lookup/uniprot" \
-H "X-Api-Key: $COGNICHEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "search",
"organism": "9606",
"queries": [
"EGFR"
]
}'from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.lookup.uniprot("search", ["EGFR"])
print(result)Python SDK pip install cognichem-client (1.1 or later). from_env() reads COGNICHEM_API_KEY.
Responses
Successful Response · application/json · LookupResponse
| Field | Type | Description |
|---|---|---|
attributionrequired | string | |
results[]required | LookupItem[] | |
results.data | any | |
results.licenserequired | string | |
results.operationrequired | string | |
results.query | string | null | |
results.record_id | string | null | |
results.release | string | null | |
results.sourcerequired | string | |
results.statusrequired | string | One of: |
results.title | string | null | |
results.url | string | null |
{
"attribution": "Data from ChEMBL (EMBL-EBI), CC BY-SA 3.0 Unported. ...",
"results": [
{
"data": {
"smiles": "CC(=O)Oc1ccccc1C(=O)O"
},
"license": "CC BY-SA 3.0",
"operation": "molecule",
"query": "CHEMBL25",
"record_id": "CHEMBL25",
"release": "ChEMBL_35",
"source": "ChEMBL",
"status": "found",
"title": "ASPIRIN",
"url": "https://www.ebi.ac.uk/chembl/explore/compound/CHEMBL25"
}
]
}Errors are RFC 7807 problem details (application/problem+json) with status, title, detail, request_id, and a retryability hint (validation, auth, quota, conflict, upstream, timeout, or terminal). Handling errors
| Status | When |
|---|---|
400 | Invalid input or business rule violation. |
401 | Missing or invalid credentials. |
402 | Wallet cannot cover the Assistant turn hold. |
403 | Authenticated but not allowed to access the resource. |
404 | Resource not found or not owned by the user. |
409 | Conflict (e.g. idempotency key reuse with a different body). |
413 | Request body or workflow spec exceeds size caps. |
422 | Request body or query failed validation. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
503 | This source is disabled on the server (base URL unset). |
Look up RCSB PDB entries
POST/api/v1/lookup/pdb
API key or token
PDB entries by ID, or search by UniProt accession or free text.
Request body
application/json · PdbLookupRequest
| Field | Type | Description |
|---|---|---|
limit | integer | null | Rows per query (default 10). Limits: |
operationrequired | string | One of: |
queries[]required | string[] | Up to 20 IDs or names (each 1-100 characters). Limits: |
Example request
curl -X POST "https://api.cognichem.com/api/v1/lookup/pdb" \
-H "X-Api-Key: $COGNICHEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "entry",
"queries": [
"1M17"
]
}'from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.lookup.pdb("entry", ["1M17"])
print(result)Python SDK pip install cognichem-client (1.1 or later). from_env() reads COGNICHEM_API_KEY.
Responses
Successful Response · application/json · LookupResponse
| Field | Type | Description |
|---|---|---|
attributionrequired | string | |
results[]required | LookupItem[] | |
results.data | any | |
results.licenserequired | string | |
results.operationrequired | string | |
results.query | string | null | |
results.record_id | string | null | |
results.release | string | null | |
results.sourcerequired | string | |
results.statusrequired | string | One of: |
results.title | string | null | |
results.url | string | null |
{
"attribution": "Data from ChEMBL (EMBL-EBI), CC BY-SA 3.0 Unported. ...",
"results": [
{
"data": {
"smiles": "CC(=O)Oc1ccccc1C(=O)O"
},
"license": "CC BY-SA 3.0",
"operation": "molecule",
"query": "CHEMBL25",
"record_id": "CHEMBL25",
"release": "ChEMBL_35",
"source": "ChEMBL",
"status": "found",
"title": "ASPIRIN",
"url": "https://www.ebi.ac.uk/chembl/explore/compound/CHEMBL25"
}
]
}Errors are RFC 7807 problem details (application/problem+json) with status, title, detail, request_id, and a retryability hint (validation, auth, quota, conflict, upstream, timeout, or terminal). Handling errors
| Status | When |
|---|---|
400 | Invalid input or business rule violation. |
401 | Missing or invalid credentials. |
402 | Wallet cannot cover the Assistant turn hold. |
403 | Authenticated but not allowed to access the resource. |
404 | Resource not found or not owned by the user. |
409 | Conflict (e.g. idempotency key reuse with a different body). |
413 | Request body or workflow spec exceeds size caps. |
422 | Request body or query failed validation. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
503 | This source is disabled on the server (base URL unset). |
Look up PubChem experimental properties
POST/api/v1/lookup/properties
API key or token
Measured boiling point, vapor pressure, density and similar values by CID or compound name. Each value carries its supplier and licence; values from suppliers without an allowed licence are dropped and counted in data.excluded.
Request body
application/json · PropertiesLookupRequest
| Field | Type | Description |
|---|---|---|
limit | integer | null | Values per property (default 3). Limits: |
operationrequired | "experimental" | |
properties[] | string[] | null | Properties to return (default: boiling / melting point, density, vapor pressure, heat of vaporization, viscosity, surface tension). 'other' holds critical constants and other measured values. One of: |
queries[]required | string[] | Up to 20 PubChem CIDs or compound names. Limits: |
Example request
curl -X POST "https://api.cognichem.com/api/v1/lookup/properties" \
-H "X-Api-Key: $COGNICHEM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "experimental",
"properties": [
"boiling_point",
"vapor_pressure"
],
"queries": [
"methanol"
]
}'from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.lookup.properties(
["methanol"],
properties=["boiling_point", "vapor_pressure"],
)
print(result)Python SDK pip install cognichem-client (1.1 or later). from_env() reads COGNICHEM_API_KEY.
Responses
Successful Response · application/json · LookupResponse
| Field | Type | Description |
|---|---|---|
attributionrequired | string | |
results[]required | LookupItem[] | |
results.data | any | |
results.licenserequired | string | |
results.operationrequired | string | |
results.query | string | null | |
results.record_id | string | null | |
results.release | string | null | |
results.sourcerequired | string | |
results.statusrequired | string | One of: |
results.title | string | null | |
results.url | string | null |
{
"attribution": "Data from ChEMBL (EMBL-EBI), CC BY-SA 3.0 Unported. ...",
"results": [
{
"data": {
"smiles": "CC(=O)Oc1ccccc1C(=O)O"
},
"license": "CC BY-SA 3.0",
"operation": "molecule",
"query": "CHEMBL25",
"record_id": "CHEMBL25",
"release": "ChEMBL_35",
"source": "ChEMBL",
"status": "found",
"title": "ASPIRIN",
"url": "https://www.ebi.ac.uk/chembl/explore/compound/CHEMBL25"
}
]
}Errors are RFC 7807 problem details (application/problem+json) with status, title, detail, request_id, and a retryability hint (validation, auth, quota, conflict, upstream, timeout, or terminal). Handling errors
| Status | When |
|---|---|
400 | Invalid input or business rule violation. |
401 | Missing or invalid credentials. |
402 | Wallet cannot cover the Assistant turn hold. |
403 | Authenticated but not allowed to access the resource. |
404 | Resource not found or not owned by the user. |
409 | Conflict (e.g. idempotency key reuse with a different body). |
413 | Request body or workflow spec exceeds size caps. |
422 | Request body or query failed validation. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
503 | This source is disabled on the server (base URL unset). |