NCI CACTUS Resolver API
Free NCI CACTUS Chemical Identifier Resolver with no key: convert any chemical name, CAS number, InChI or SMILES into any other representation. One URL, plain text response.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the NCI CACTUS Resolver API?
The NCI CACTUS Chemical Identifier Resolver is a free, key-free service that translates between chemical representations. Give it a name, CAS registry number, InChI, InChIKey or SMILES in the URL path and ask for any other form — SMILES, InChI, molecular formula, molecular weight, IUPAC name or a structure image.
The Chemical Identifier Resolver has been run by the US National Cancer Institute's CADD group for well over a decade, and its interface is about as simple as an API gets: the URL is the query. `/chemical/structure/aspirin/smiles` returns `CC(=O)Oc1ccccc1C(O)=O` as plain text, with no JSON envelope, no key and no parameters. That makes it trivially usable from a shell script, a spreadsheet or a one-line fetch.
Its strength is the breadth of what it accepts on the input side. Trade names, common names, CAS numbers, InChIKeys and SMILES all resolve, drawing on NCI's own compound collections plus name-to-structure conversion, which means it handles many informal names that a strict IUPAC parser rejects. That leniency is also the caution: a lookup service resolves what it has seen, so an ambiguous or mistyped name may quietly return a different compound rather than an error. For systematic IUPAC names specifically, an algorithmic parser such as OPSIN is the more predictable tool. This is a long-running academic service without a formal uptime commitment, so cache results and handle slow responses.
Quick facts
- Base URL
https://cactus.nci.nih.gov/chemical/structure- Authentication
- No API key or account. The resolver is provided by the NCI CADD Group as a public research service; it asks for reasonable use and offers no service level guarantee.
- Rate limit
- No published limit, but this is a modest academic server. Throttle bulk conversions and cache results, which never change for a given input.
- Pricing
- Free, with no registration.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the NCI CACTUS Resolver API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Convert the common name aspirin to a SMILES string
GET https://cactus.nci.nih.gov/chemical/structure/aspirin/smiles
curl 'https://cactus.nci.nih.gov/chemical/structure/aspirin/smiles'const res = await fetch("https://cactus.nci.nih.gov/chemical/structure/aspirin/smiles");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://cactus.nci.nih.gov/chemical/structure/aspirin/smiles", timeout=20)
res.raise_for_status()
print(res.json())CC(=O)Oc1ccccc1C(O)=OParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
identifier | path segment | Required | The input: a chemical name, CAS number, InChI, InChIKey, SMILES or NSC number. URL-encode names with spaces. aspirin |
representation | path segment | Required | The output form: `smiles`, `stdinchi`, `stdinchikey`, `formula`, `mw`, `iupac_name`, `cas`, `names`, `image` and more. smiles |
(format) .json / .xml | path suffix | Optional | Append to the representation for a structured wrapper instead of plain text. smiles.json |
(operator) twirl | path segment | Optional | Alternative endpoints render 2D and 3D structure views rather than returning identifiers. twirl |
Response fields
(body)text- The requested representation as plain text with no envelope. A SMILES query returns just the SMILES string.
(404 body)text- An HTML error page when the identifier does not resolve, rather than a structured error object.
(names representation)text- Newline-delimited list of every synonym the resolver knows for the structure.
(mw representation)text- Molecular weight as a bare decimal number.
What you can build with the NCI CACTUS Resolver API
- Convert a spreadsheet of chemical names to SMILES for cheminformatics work
- Resolve a CAS registry number to a structure
- Generate InChIKeys for deduplicating a compound list
- Look up a molecular formula or weight from a trade name
- Normalise messy chemical names from lab records
Common errors and how to fix them
404 with an HTML body
The identifier did not resolve.
Fix: The service returns HTML error pages, not JSON. Check the status code rather than trying to parse the body, and try an alternative identifier such as the CAS number.
Wrong compound returned
The name was ambiguous and the resolver picked a match.
Fix: Verify by round-tripping — convert the returned SMILES back to `names` and check your original name appears. For systematic names, use an algorithmic parser instead.
Timeout or slow response
This is a small academic server under variable load.
Fix: Set a generous timeout, retry once, and cache every result. Conversions are deterministic, so a cache never goes stale.
Broken URL with special characters
Chemical names contain commas, brackets and spaces.
Fix: URL-encode the identifier segment fully. Unencoded brackets in SMILES input are a frequent cause of silent failures.
NCI CACTUS Resolver API — frequently asked questions
Is the Chemical Identifier Resolver free?
Yes, free with no key or registration. It is a public research service from the National Cancer Institute's CADD group, offered without a formal uptime guarantee.
What formats can it convert between?
It accepts names, CAS numbers, InChI, InChIKey, SMILES and NSC numbers as input, and produces SMILES, standard InChI and InChIKey, molecular formula, molecular weight, IUPAC name, synonym lists and structure images as output.
How is this different from OPSIN?
OPSIN algorithmically parses systematic IUPAC names, so it handles names it has never seen but rejects trade names and slang. The CACTUS resolver is a lookup over compound collections, so it resolves common and trade names but can only return what it holds. They complement each other.
Can I use it for bulk conversion?
Only gently. It is a modest academic server with no rate limit published but limited capacity. Throttle your requests, cache every result, and consider a local toolkit such as RDKit for genuinely large batches.
Tools that pair with this API
Molar Mass Calculator
Work out the molar mass of any chemical formula in g/mol, with a per-element breakdown. Handles brackets, hydrates and a grams-to-moles converter.
Empirical Formula Calculator
Turn percent composition or measured masses into an empirical formula, then scale it to the molecular formula using the compound's molar mass.
Interactive Periodic Table
Explore all 118 elements in the standard layout. Click any element for its atomic weight, group, period, block, electron configuration and state.
NCI CACTUS Resolver is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.