← Back to Safety DB

Database Architecture

3,906 entities · 3 layers · 16 tiers · All canonical v4.0.0 · Updated 2026-03-26

1,879
Compounds
959
Materials
1,262
Products

Data Hierarchy

Everything traces to compounds. Materials are what things are made of. Products are what people buy.

Compounds (1,879)
hq-c-{org|ino|mix}-NNNNNN · 3 tiers
"What is this at the molecular level?"
↓ composition cross-refs
Materials (959)
hq-m-{str|sfc|chm|env|adv}-NNNNNN · 5 tiers · 28 sub-tiers
"What's it made of? What does it leach/offgas/degrade into?"
↓ material cross-refs
Products (514)
hq-p-{hom|bdy|fod|chd|out|pet|wer|spe}-NNNNNN · 8 tiers · 25 sub-tiers
"What am I holding / wearing / feeding my family?"

Compound Tiers (3)

ORGOrganic compounds — carbon-containing molecules with valid CAS1,464
INOInorganic — metals, minerals, radioactive, no-carbon formulae164
MIXMixtures / classes — PFAS, particulates, nanotubes, compound groups49

Material Tiers (5 × 28 sub-tiers)

STRStructural — polymers, rubber/foam, metals/glass/ceramics, building/composites189
SFCSurface — textiles, coatings, paper/packaging, adhesives/sealants111
CHMChemical — industrial, agricultural, food, consumer, medical, water, transport310
ENVEnvironmental — air, soil, water contamination, waste, occupational, ecological196
ADVAdvanced — electronics, batteries, nuclear, nanomaterials, bioprocess153

Product Tiers (8 × 25 sub-tiers)

HOMHome — surfaces, furniture, cleaning, air quality89
BDYBody — skin care, hair care, oral care, cosmetics69
FODFood/Water — cookware, storage, packaging, water quality55
CHDChildren — feeding/formula, toys, hygiene/diapers26
OUTOutdoor — gear, recreation, garden14
PETPet — food/bowls, flea/tick treatments10
WERWear — clothing, textile care10
SPESpecialized — medical, automotive, occupational, electronics12

ID Format

EntityFormatExampleSchema
Compoundhq-c-{org|ino|mix}-NNNNNNhq-c-org-000001 (Glyphosate)v4.0.0
Materialhq-m-{str|sfc|chm|env|adv}-NNNNNNhq-m-str-000001 (PVC)v4.0.0
Producthq-p-{hom|bdy|fod|chd|out|pet|wer|spe}-NNNNNNhq-p-fod-000001 (Non-stick cookware)v4.0.0

HQ IDs are free, permanent, and crossref to CAS, PubChem CID, DTXSID, InChIKey, UNII, ChEBI, Wikidata QID, and more.

API Access

EndpointAuthExample
Single compoundFree/api/compound/hq-c-org-000001
CAS lookupFree/api/compound/cas/1071-83-6
Single materialFree/api/material/hq-m-str-000001
Single productFree/api/product/hq-p-fod-000001
Full-text searchFree/api/search?q=phthalate
SVG badgeFree/api/badge/hq-c-org-000001
List / filterAPI Key/api/compounds?risk=high&context=dog
BatchAPI Key/api/compounds/batch?ids=hq-c-org-000001,hq-c-org-000006

Free: 200 req/day. Developer ($29/mo): 10K/day. Pro ($99/mo): 100K/day. Get a key →

File Structure

data/
├── registry.json              Master registry (4,100 entities, 16 per-tier next_available keys)
├── viewer-manifest.json       Pre-built viewer data (all entities + risk + tier)
├── _indexes/                  Pre-built API search indexes (6 files)
├── compounds/
│   ├── manifest.json          [{id, name, class, cas}] × 1,879
│   └── hq-c-{org|ino|mix}-*.json
├── materials/
│   ├── manifest.json          [{id, name, tier, sub_tier, risk}] × 959
│   └── hq-m-{str|sfc|chm|env|adv}-*.json
└── products/
    ├── manifest.json          [{id, name, tier, sub_tier, risk}] × 1,262
    └── hq-p-{hom|bdy|fod|chd|out|pet|wer|spe}-*.json

Data Sources & Enrichment Architecture

SourceRoleStatusFields Covered
PubChem PUG REST/ViewPrimaryActiveSMILES, MW, LogP, GHS, melting/boiling/density, xrefs (ChEBI, ChEMBL)
Rule-based derivationSupplementaryActiveVuln pops, alternatives, safety contexts, EDC stamps, env fate
EPA CompTox (CTX) APIBackupDownToxCast bioactivity, CPDat functional use, OPERA predictions, ToxVal NOAEL/LD50
IARC MonographsStatic referenceCachedCarcinogenicity classifications
Wikidata SPARQLCross-referenceActiveWikidata QIDs, external identifiers
OEHHA Prop 65Static referenceCachedCalifornia Prop 65 listings

CTX API key preserved for restoration. When CTX returns, 498 post-cliff compounds will receive ToxCast, CPDat, and OPERA data. See tracking/ENRICHMENT-ROADMAP.md §6 for recovery plan.