SNRL API
Authentication
Every request needs an API key in the X-API-Key header. Create a key (free) in the Developer Console — it's shown once at creation.
curl -H "X-API-Key: cpd_live_your_key" "https://snrl.in/v1/search?q=acetone"
Get an API key →
Try it live →
Base URL & format
Base URL: https://snrl.in/v1. All responses are JSON. Errors return an HTTP status with a {"detail": "..."} body.
| Status | Meaning |
|---|---|
| 401 | Missing / invalid / revoked key |
| 403 | Key lacks the required scope |
| 429 | Rate limit or daily quota exceeded (see Retry-After) |
Rate limits
- A short-window rate limit per key (smooths bursts).
- A daily quota of 5,000 calls per key, resetting at 00:00 UTC.
- Track your usage in the Console. Need more? Get in touch.
Endpoints
Full-text search over products. A CAS number, UN number, or H-code routes to an exact match; free text is fuzzy over names, synonyms, and ingredients.
| Query param | Description |
|---|---|
| q | Search text, CAS (67-64-1), or hazard code (H225) |
| hazard_code | Filter to a GHS H-code (e.g. H350) |
| signal_word | Filter by Danger or Warning |
| manufacturer_id, category, country, language | Additional filters |
| sort | relevance (default), name, revision_date, manufacturer |
| page, size | Pagination (defaults 1, 20; max size 100) |
Returns {total, page, size, items, facets}.
curl -H "X-API-Key: KEY" "https://snrl.in/v1/search?q=toluene"
Type-ahead suggestions. Params: q (partial text, required) and size (1–25, default 10). Returns a JSON array of strings.
curl -H "X-API-Key: KEY" "https://snrl.in/v1/search/suggest?q=aceto"
Search the authoritative chemical registry (~20k substances, ECHA Annex VI + PubChem) — this is the identity + GHS data behind the site, far larger than the product catalog. Fuzzy name/synonym, exact CAS/H-code, with filters and facets. Each hit carries a provenance badge (harmonised vs. aggregated).
| Query param | Description |
|---|---|
| q | Name, synonym, CAS (108-88-3), or H-code |
| hazard_code | Filter to an H-code (e.g. H350) |
| pictogram | Filter to a GHS pictogram (e.g. GHS08) |
| use | Filter by EPA CDR use tag |
| hpv | true → only High Production Volume substances |
| size | 1–100 (default 20) |
curl -H "X-API-Key: KEY" "https://snrl.in/v1/substances?q=toluene"
One substance's authoritative identity + GHS classification and provenance, by CAS number.
curl -H "X-API-Key: KEY" "https://snrl.in/v1/substances/108-88-3"
List products, newest first, cursor-paginated. Returns {items, next_cursor}.
| Query param | Description |
|---|---|
| limit | 1–200 (default 50) |
| cursor | Opaque cursor from a prior next_cursor |
curl -H "X-API-Key: KEY" "https://snrl.in/v1/products?limit=5"
A product and its active version — identity, GHS signal word / pictograms / H-statements, composition (CAS + concentration), and the source SDS link.
curl -H "X-API-Key: KEY" "https://snrl.in/v1/products/<uuid>"
Every SDS revision we've captured for a product (append-only version history).
Tools & client examples
- Interactive API reference — try every endpoint live in the browser with your key.
- OpenAPI 3.0 spec — generate a typed client (openapi-generator, etc.).
- Postman collection — import, set
apiKey, run.
Python
import requests
r = requests.get(
"https://snrl.in/v1/search",
params={"q": "toluene", "size": 5},
headers={"X-API-Key": "cpd_live_your_key"},
)
for hit in r.json()["items"]:
print(hit["name"], hit.get("signal_word"))
JavaScript (fetch)
const res = await fetch(
"https://snrl.in/v1/search?" + new URLSearchParams({ q: "toluene", size: "5" }),
{ headers: { "X-API-Key": "cpd_live_your_key" } },
);
const { items } = await res.json();
console.log(items.map((h) => h.name));
No-key endpoints
The free web search is also directly callable without a key (IP rate-limited): /v1/public/search?q=, /v1/public/substances/{cas}, and /v1/public/stats. The keyed API above adds product detail, version history, suggestions, and higher limits.