# Cusip validate

`cusip-validate` · version 1.0.0 · Identifiers & check digits · free, no key needed

Validate a 9-character CUSIP's Modulus 10 Double Add Double check digit and parse its issuer, issue and PPN marker.

**Use when you need to: validate a cusip · check cusip check digit · is this cusip number valid.**

## Decide before calling

Read the [versioned contract](/v1/tools/cusip-validate/versions/1.0.0) and the supported scope below. Reuse `cusip-validate@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `cusip-validate@1.0.0` for validate a cusip. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- validate a cusip
- check cusip check digit
- is this cusip number valid
- cusip checksum validator
- parse cusip issuer and issue code
- double add double check digit for a security
- is this a private placement cusip

## Not supported

- looking up which company or security a CUSIP actually identifies
- validating a 12-character ISIN that embeds a CUSIP (see isin-validate)
- generating a fresh CUSIP for a new issuer

## Behavior

- cusip must be exactly 9 characters: no case folding, no trimming. Any other length is reason wrong_length, checked first.
- issuer (characters 1-6), issue (7-8) and check_digit (9) are the raw positional substrings, and is_ppn is computed from characters 1-8, whenever cusip is exactly 9 characters, regardless of charset or check-digit validity; all four are null only when length already failed.
- Characters 1-8 must each be a digit, an uppercase letter, or one of * @ # (values 36, 37, 38); character 9 must be a digit, else reason invalid_character.
- is_ppn is true when any of characters 1-8 is exactly * @ or #, a private placement number.
- Check digit: for characters 1-8 (1-indexed), take the value (digit as itself; A=10...Z=35; * = 36, @ = 37, # = 38); double the value at even positions (2,4,6,8); reduce the (possibly doubled) value by summing its own two digits; sum all 8 results; expected check digit is (10 - sum mod 10) mod 10. A mismatch is reason check_digit_mismatch.
- valid is true only when length, charset and the check digit all pass, in that order; only one reason is ever returned.

## Input

- `cusip` (string, required): min length 1; max length 9

## Output

- `valid` (boolean, required)
- `reason` (one of null, "wrong_length", "invalid_character", "check_digit_mismatch", required)
- `issuer` (string or null, required): min length 6; max length 6
- `issue` (string or null, required): min length 2; max length 2
- `check_digit` (string or null, required): min length 1; max length 1
- `is_ppn` (boolean or null, required)

## Limits

- max cusip bytes: 9

## Example

Request input:

```json
{
  "cusip": "037833100"
}
```

Response:

```json
{
  "result": {
    "valid": true,
    "reason": null,
    "issuer": "037833",
    "issue": "10",
    "check_digit": "0",
    "is_ppn": false
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "cusip-validate",
  "version": "1.0.0",
  "input": {
    "cusip": "037833100"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/cusip-validate/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"cusip":"037833100"}'
```

The machine-readable contract is at [/v1/tools/cusip-validate/versions/1.0.0](/v1/tools/cusip-validate/versions/1.0.0).

### CLI

```sh
node cli.mjs run cusip-validate 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Isin validate](/tools/isin-validate): Validate a 12-character ISIN's ISO 6166 Luhn check digit and parse its country prefix, NSIN and NSIN scheme.
- [Iso6346 container validate](/tools/iso6346-container-validate): Validate an 11-character ISO 6346 container number's mod-11 check digit and split the owner code, category and serial.
- [Sedol validate](/tools/sedol-validate): Validate a 7-character SEDOL's weighted modulus 10 check digit and report whether it is a legacy all-numeric code.
- [Iban validate](/tools/iban-validate): Validate an IBAN's country, registry length, BBAN structure and MOD 97-10 check digits, and parse its bank/branch code.
- [Iccid validate](/tools/iccid-validate): Validate a 19/20-digit ICCID's Luhn check digit, require the 89 major industry id, split issuer/account digits.
- [Imo number validate](/tools/imo-number-validate): Validate a 7-digit IMO ship identification number's weighted mod-10 check digit, with or without the 'IMO ' prefix.
