"ChemSpider" (Service Connection)
Connect to the ChemSpider API using the Wolfram Language to query extensive data on chemical structures and their properties.
Connecting & Authenticating
Requests
Search Compounds
"Search" — search by chemical identifier (name, SMILES, InChI, or InChIKey), molecular formula, or mass
"Query" | (required) | search query |
"SortBy" | None | fields to order by | |
"StartIndex" | 1 | start index | |
MaxItems | 10 | number of elements to return |
"Formula" | (required) | formula to search by | |
"Databases" | (required) | list of databases to use | |
"StartIndex" | 1 | start index | |
MaxItems | 10 | number of elements to return |
"Mass" | (required) | mass value to search by | |
"Range" | (required) | range of mass used for the search | |
"Databases" | (required) | list of databases to use | |
"StartIndex" | 1 | start index | |
MaxItems | 10 | number of elements to return |
Compound Information
"CompoundInformation" — get record details (CSID, StdInChIKey, StdInChI, SMILES) by ID
"ID" | (required) | ChemSpider ID | |
"Fields" | All | list of fields to return |
Compound Thumbnail
"CompoundThumbnail" — get an image of the compound
"ID" | (required) | ChemSpider ID |
Find Corresponding Chemical Identifiers
"Convert" — translate between identifier types
"Query" | (required) | search query | |
"InputFormat" | (required) | input format | |
"OutputFormat" | (required) | output format |
List of Data Sources
"Databases" — get a list of all data sources used in ChemSpider
Validate an InChIKey
"InChIKeyQ" — check if the specified argument is a valid InChIKey
"InChIKey" | (required) | InChIKey string to validate |
Compound Molecule
"CompoundMOL" — get the molecule of a compound
"ID" | (required) | ChemSpider ID |
Parameter Details
string | simple string | |
{"InChI",string} | International Chemical Identifier | |
{"InChIKey",string} | International Chemical Identifier key | |
{"Name",string} | compund name | |
{"SMILES",string} | SMILES string |
"ID" | identifier | |
"MolecularWeight" | molecular weight | |
"ReferenceCount" | reference count | |
"DataSourceCount" | data source count | |
"PubMedCount" | PubMed count | |
"RSCCount" | RSC count |
"AverageMass" | average mass | |
"CommonName" | common name | |
"DataSourceCount" | data source count | |
"Formula" | formula | |
"InChI" | International Chemical Identifier | |
"InChIKey" | International Chemical Identifier key | |
"MOL2D" | 2D MDL MOL file | |
"MOL3D" | 3D MDL MOL file | |
"MolecularWeight" | molecular weight | |
"MonoisotopicMass" | monoisotopic mass | |
"NominalMass" | nominal mass | |
"PubMedCount" | PubMed count | |
"ReferenceCount" | reference count | |
"RSCCount" | RSC count | |
"SMILES" | SMILES string | |
"StdInChI" | standard InChI | |
"StdInChIKey" | standard InChI key |
"InChI" | International Chemical Identifier | |
"InChIKey" | International Chemical Identifier key | |
"SMILES" | SMILES string |
"InChI" | International Chemical Identifier | |
"InChIKey" | International Chemical Identifier key | |
"MOL" | MDL MOL file | |
"SMILES" | SMILES string |
Examples
Basic Examples (1)
Create a new connection by launching an authentication dialog:
Get a sample of available databases:
Search for a structure by name or keyword:
Search for a compound ID by InChI:
Search for a compound ID by SMILES:
Search for compounds with a molecular mass within a given range:
Get full information about a compound:
Get specific fields about a compound's information:
For a given InChI code, get the corresponding MOL file:
Check if an InChIKey is valid: