Snipget.ai

Validate a CAS Registry Number

Exact
chemistry_cas_validate

Deterministic and authoritative — the canonical answer for this input.

Validate a CAS Registry Number's format and check digit, fully locally (no upstream call). confidence 1.0 = format and check digit valid; 0.7 = valid format but wrong check digit (likely a transcription error); 0.0 = not a CAS format. Batch via chemistry_cas_validate_batch. Charges 1 cost_unit.

Parameters

casstringrequired

The CAS Registry Number to validate (e.g. '50-78-2').

Call it

curl -X POST https://api.snipget.ai/v1/chemistry/cas/validate \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"cas":"50-78-2"}'

The Batch tab sends up to 1000 inputs in one call via /v1/chemistry/cas/validate/batch.

Example response

{
  "input": "50-78-2",
  "cas": "50-78-2",
  "is_valid": true,
  "format_valid": true,
  "check_digit_valid": true,
  "expected_check_digit": 2
}

FAQ

What does this check?

It checks that a CAS Registry Number has the right shape and that its check digit is correct. The check digit catches most typos and transcription errors before they get into your data.

What do the confidence levels mean?

Confidence 1.0 means the format and check digit are both valid, 0.7 means the format is right but the check digit is wrong (likely a mistyped digit), and 0.0 means it is not a CAS number format at all.

Is this exact?

Yes. It is a deterministic local checksum, the same calculation CAS uses, so the same number always gives the same verdict. It runs offline with no lookup.

Does a valid result mean the compound actually exists?

No. This only confirms the number is well-formed and the check digit adds up. It does not confirm a real compound is registered under it. To resolve an actual compound, use chemistry_compound_lookup with query_type cas.

What does a bad input return?

Anything that is not a CAS format comes back with confidence 0 and a why_invalid reason, not an error. A wrong check digit returns the expected_check_digit so you can spot the typo.

Related tools