Chemical Compound Properties API
PubChem identity and properties for each compound name, CAS number, CID, InChIKey or SMILES you give: CID, name, CAS number, formula, molecular weight, exact mass, IUPAC name, SMILES, InChI, InChIKey, XLogP, polar surface area, charge and atom and bond counts. One clean row per compound.
$2 per 1,000 records
You pay only for the records you get. Zero records cost zero. 2,500 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.
Data from pubchem.ncbi.nlm.nih.gov/docs/pug-rest
Get this data
Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.
Try it
Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 2,500 records of this API, no card. Create a free key
For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
- Small runs answer in the same request; longer ones answer
202with a run to poll. fieldsreturns only the fields you name. The examples send the ones picked on this page.Idempotency-Keyis optional. A retry with it is never charged twice.- You pay for records returned. Zero records cost zero.
curl -X POST "https://pullrow.dev/v1/apis/pubchem-compounds/run" \
-H "Authorization: Bearer $PULLROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"names":["caffeine","50-78-2","2519"]},"max_items":50}'Inputs
Send them as input in the request body. Leave one out to use its default.
What's in each record
21 fields: 19 here, 2 technical ones under Technical details.
Basics
- Title
PubChem's name for the compound, such as Caffeine.
Example Caffeine
- Cas number
CAS Registry Number most often cited for the compound, such as 58-08-2; empty when include_cas is off or PubChem has none.
Example 58-08-2
- Molecular formula
Molecular formula in Hill order, such as C8H10N4O2.
Example C8H10N4O2
- Molecular weight
Molecular weight in grams per mole.
Example 194.19
- Exact mass
Exact mass in daltons of the most common isotopes.
Example 194.080376
- Iupac name
Systematic IUPAC name as PubChem computes it.
Example 1,3,7-trimethylpurine-2,6-dione
- Smiles
SMILES with stereochemistry and isotopes.
Example CN1C=NC2=C1C(=O)N(C(=O)N2C)C
- Connectivity smiles
SMILES of the bonds only, without stereochemistry or isotopes.
Example CN1C=NC2=C1C(=O)N(C(=O)N2C)C
- Inchi
Standard InChI identifier.
Example InChI=1S/C8H10N4O2/c1-10-4-9-6-5(10)7(13)12(3)8(14)11(6)2/h4H,1-3H3
- Inchikey
Standard InChIKey, the 27-character hashed InChI, such as RYYVLZVUVIJVGH-UHFFFAOYSA-N.
Example RYYVLZVUVIJVGH-UHFFFAOYSA-N
- Xlogp
Computed octanol-water partition coefficient (XLogP3): higher means more fat-soluble.
Example -0.1
- Tpsa
Topological polar surface area in square angstroms.
Example 58.4
- Complexity
PubChem's structural complexity score.
Example 293
- Total formal charge
Example 0
- H bond donor count
Number of hydrogen bond donors.
Example 0
- H bond acceptor count
Number of hydrogen bond acceptors.
Example 3
- Rotatable bond count
Number of rotatable bonds.
Example 0
- Heavy atom count
Number of atoms other than hydrogen.
Example 14
Links
- Link
The compound's page on PubChem.
Technical detailsField names and types for developers, and the 2 fields hidden above
Hidden by default
These 2 fields come with each record too. They are internal codes, notes about how the record was read or a copy of what was searched for, so the lists above leave them out.
- Search words
queryThe name, CAS number, CID, InChIKey or SMILES as you gave it. - Cid
cidPubChem compound id (CID), such as 2519.
Field names and types
The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.
| Field name | Type | Shown on this page as | Filled |
|---|---|---|---|
query | text | Search words (hidden) | 3 of 3 |
cid | text | Cid (hidden) | 3 of 3 |
url | link | Link | 3 of 3 |
title | text | Title | 3 of 3 |
cas_number | text | Cas number | 3 of 3 |
molecular_formula | text | Molecular formula | 3 of 3 |
molecular_weight | number | Molecular weight | 3 of 3 |
exact_mass | number | Exact mass | 3 of 3 |
iupac_name | text | Iupac name | 3 of 3 |
smiles | text | Smiles | 3 of 3 |
connectivity_smiles | text | Connectivity smiles | 3 of 3 |
inchi | text | Inchi | 3 of 3 |
inchikey | text | Inchikey | 3 of 3 |
xlogp | number | Xlogp | 3 of 3 |
tpsa | number | Tpsa | 3 of 3 |
complexity | number | Complexity | 3 of 3 |
charge | number | Total formal charge | 3 of 3 |
h_bond_donor_count | number | H bond donor count | 3 of 3 |
h_bond_acceptor_count | number | H bond acceptor count | 3 of 3 |
rotatable_bond_count | number | Rotatable bond count | 3 of 3 |
heavy_atom_count | number | Heavy atom count | 3 of 3 |
How it reads the site
Runs on a reader we built and maintain by hand for this site.
Save as pipeline
A pipeline remembers this API, your inputs and the fields you picked. It can run on a schedule and email you the results.
Sample records
| Record | Title | Cas number | Molecular formula | Molecular weight | Exact mass | Iupac name | Smiles | Connectivity smiles | Inchi | Inchikey | Xlogp | Tpsa | Complexity | Total formal charge | H bond donor count | H bond acceptor count | Rotatable bond count | Heavy atom count | Link |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Caffeine | 58-08-2 | C8H10N4O2 | 194.19 | 194.080376 | 1,3,7-trimethylpurine-2,6-dione | CN1C=NC2=C1C(=O)N(C(=O)N2C)C | CN1C=NC2=C1C(=O)N(C(=O)N2C)C | InChI=1S/C8H10N4O2/c1-10-4-9-6-5(10)7(13)12(3)8(14)11(6)2/h4H,1-3H3 | RYYVLZVUVIJVGH-UHFFFAOYSA-N | -0.1 | 58.4 | 293 | 0 | 0 | 3 | 0 | 14 | pubchem.ncbi.nlm.nih.gov/compound/2519 |
| 2 | Formaldehyde | 50-00-0 | CH2O | 30.026 | 30.010565 | formaldehyde | C=O | C=O | InChI=1S/CH2O/c1-2/h1H2 | WSFSSNUMVMOOMR-UHFFFAOYSA-N | 1.2 | 17.1 | 2 | 0 | 0 | 1 | 0 | 2 | pubchem.ncbi.nlm.nih.gov/compound/712 |
| 3 | Aspirin | 50-78-2 | C9H8O4 | 180.16 | 180.042259 | 2-acetyloxybenzoic acid | CC(=O)OC1=CC=CC=C1C(=O)O | CC(=O)OC1=CC=CC=C1C(=O)O | InChI=1S/C9H8O4/c1-6(10)13-8-5-3-2-4-7(8)9(11)12/h2-5H,1H3,(H,11,12) | BSYNRYMUTXBXSQ-UHFFFAOYSA-N | 1.2 | 63.6 | 212 | 0 | 1 | 4 | 3 | 13 | pubchem.ncbi.nlm.nih.gov/compound/2244 |
Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.
Reliability
Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.
Incidents and repairs
How it is kept working What a repair can't do
A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.
- You pay only for records returned. A run that returns none costs nothing.
- Data from PubChem at the U.S. National Library of Medicine, mostly in the public domain. XLogP, polar surface area, complexity and the atom and bond counts are PubChem's own calculations, not measured values. NLM does not endorse this API.
- A name, CAS number or structure PubChem cannot match returns no row, so compare query with your list to find them. Names are matched as whole names, case aside, not as partial words; misspellings and some trade names do not match.
- A name usually matches one compound; the few that match several come back as one row each. Digits alone are read as a PubChem CID.
- cas_number is the CAS Registry Number that PubChem's sources cite most often for the compound, checked by its check digit. PubChem is not the official CAS registry, and salts, mixtures and newer compounds often have none.
- Up to 1,000 lookups per run. PubChem allows at most five requests a second, so requests go one at a time and long lists take a while: each name or structure takes one request and its CAS number another. CIDs are read 100 at a time.
- For a salt, hydrate or mixture the formula and weights cover the whole PubChem record, every part included.
Version history
A run uses the live version unless the request names another one with version.
Manage this API
Only your workspace sees this part.
Automatic repair
Off: a rebuilt version is stored and waits for you in the version history.
Delete this API
Removes the API, its versions and the saved records of its runs. Calls to its address then answer 404. Records already charged stay charged. This cannot be undone.