{"id":"isbn-validate","version":"1.0.0","description":"Validate an ISBN-10 (mod 11, X allowed) or ISBN-13 (EAN mod 10) check digit and return the other form when it exists.","supported_operations":["validate an isbn","check isbn check digit","convert isbn 10 to isbn 13","convert isbn 13 to isbn 10","is this isbn valid","isbn checksum validator","does this book barcode pass its check digit"],"unsupported_operations":["hyphenating an ISBN into its registration group / registrant / publication segments (needs range data)","looking up which book an ISBN actually identifies","validating an ISSN or ISMN (see issn-validate / ismn-validate)"],"semantics":["Normalization: remove every '-' and ' ' from isbn first; the 17-byte limit and 1-byte minimum apply to the original, unstripped isbn.","Character counting: every length, position and 'character' counts Unicode code points, not UTF-16 code units, so the echoed isbn10, isbn13 and prefix_ean never split a surrogate pair.","format is isbn10 when the stripped value is exactly 10 characters, isbn13 when exactly 13, and null (reason wrong_length) otherwise.","isbn10 charset: characters 1-9 digits, character 10 digit or uppercase X (no case folding). isbn13 charset: all 13 characters digits. A violation is reason invalid_character, checked once format is set.","isbn13-only: once the charset passes, characters 1-3 must be '978' or '979', and characters 1-4 must not be '9790' (979-0 is allocated to the ISMN under ISO 10957 and is never an ISBN), else reason unknown_prefix.","isbn10 check: sum of d_i*(11-i) for i=1..9 must be 0 mod 11 once the check character is included; a mismatch is reason check_digit_mismatch. isbn13 check (only reached when the prefix is recognized): the EAN weight-1,3 sum over all 13 digits must be a multiple of 10.","prefix_ean is 978 (constant) when format is isbn10, or the raw 3-character prefix when format is isbn13; both populated whenever format is non-null.","isbn13 is populated whenever format is isbn10 and characters 1-9 are all digits (regardless of character 10), or whenever format is isbn13 and the charset passes (regardless of prefix or its own check digit); isbn10 is the unconditional raw echo of the stripped input when format is isbn10, or, when format is isbn13 with charset passing and prefix_ean 978, characters 4-12 plus a freshly computed mod-11 check character (null for prefix 979).","valid is true only when format is set, the charset passes, (for isbn13) the prefix is recognized, and the check digit passes, in that order; only one reason is ever returned."],"limits":{"max_isbn_bytes":17},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["isbn"],"properties":{"isbn":{"type":"string","minLength":1,"maxLength":17}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","reason","format","isbn10","isbn13","prefix_ean"],"properties":{"valid":{"type":"boolean"},"reason":{"type":["string","null"],"enum":[null,"wrong_length","invalid_character","unknown_prefix","check_digit_mismatch"]},"format":{"type":["string","null"],"enum":[null,"isbn10","isbn13"]},"isbn10":{"type":["string","null"],"minLength":10,"maxLength":10},"isbn13":{"type":["string","null"],"minLength":13,"maxLength":13},"prefix_ean":{"type":["string","null"],"minLength":3,"maxLength":3}}},"examples":[{"input":{"isbn":"0-7475-3269-9"},"output":{"valid":true,"reason":null,"format":"isbn10","isbn10":"0747532699","isbn13":"9780747532699","prefix_ean":"978"}},{"input":{"isbn":"9791234567896"},"output":{"valid":true,"reason":null,"format":"isbn13","isbn10":null,"isbn13":"9791234567896","prefix_ean":"979"}}],"execute_url":"/v1/tools/isbn-validate/versions/1.0.0/execute"}