Batch Query Chemical Compounds
mychem.chemicals.batch_queryRetrieve annotations for up to 100 chemical compounds in a single request by providing an array of chemical names or identifiers. Returns ChEBI name, ChEMBL preferred name and clinical phase, PubChem CID, molecular formula and weight, DrugBank drug groups, and PharmGKB name for each compound in one call. Ideal for enriching compound lists from drug screening assays, annotating molecule libraries, building pharmacology databases, or cross-referencing chemicals across naming conventions (INN, brand names, IUPAC names). Compounds not found in any database are marked with found=false. Mix different name formats and identifiers freely in a single batch request.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Array of chemical queries to look up in a single request. Each element can be a chemical name, synonym, or identifier (up to 100 entries). Example: ["aspirin", "ibuprofen", "acetaminophen"]. Each query is matched against common names, synonyms, and identifiers. Returns one best-match annotation per query. | |
| fields | No | Comma-separated annotation fields to return for each chemical. Default: chebi.name, chebi.definition, chebi.formula, chebi.mass, chembl.pref_name, chembl.max_phase, chembl.molecule_properties, pubchem.cid, pubchem.molecular_formula, pubchem.molecular_weight, drugbank.name, drugbank.groups, pharmgkb.name. Limit fields for large batches to reduce response size. | |
| scopes | No | Comma-separated fields to search within for each query in the batch. Default: chebi.name,chembl.pref_name,drugbank.name,pubchem.cid — searches across common name fields. Use "chebi.inchikey" to match exact InChIKeys. | chebi.name,chembl.pref_name,drugbank.name,pubchem.cid |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present only when the call failed. Includes error code, message, request_id, and any provider-specific extras. | |
| result | No | Tool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response. |